|
@@ -15,6 +15,7 @@ var (
|
|
|
TOKEN_ERROR_CODE = 401 //toke异常
|
|
|
NO_AUTH = 403 //没有权限
|
|
|
SPECIFIC_FAIL_CODE = 4001 // 业务指定错误
|
|
|
+ REPORT_NOT_RELEASE_CODE = 4002 // 报告未发布错误
|
|
|
)
|
|
|
|
|
|
type ResultData struct {
|
|
@@ -162,4 +163,14 @@ type BaseResponse struct {
|
|
|
Success bool `description:"true 执行成功,false 执行失败"`
|
|
|
IsSendEmail bool `json:"-" description:"true 发送邮件,false 不发送邮件"`
|
|
|
IsAddLog bool `json:"-" description:"true 新增操作日志,false 不新增操作日志" `
|
|
|
+}
|
|
|
+
|
|
|
+// NotReleaseMsg 报告未发布错误
|
|
|
+func NotReleaseMsg(msg, errMsg string, c *gin.Context) {
|
|
|
+ resultData := ResultData{
|
|
|
+ Code: REPORT_NOT_RELEASE_CODE,
|
|
|
+ Msg: msg,
|
|
|
+ ErrMsg: errMsg,
|
|
|
+ }
|
|
|
+ result(200, resultData, c)
|
|
|
}
|