|
@@ -5,16 +5,15 @@ import (
|
|
|
"fmt"
|
|
|
"github.com/gin-gonic/gin"
|
|
|
"hongze/hongze_yb/global"
|
|
|
- "hongze/hongze_yb/utils"
|
|
|
"strings"
|
|
|
)
|
|
|
|
|
|
var (
|
|
|
- OK_CODE = 200 //业务成功
|
|
|
- FAIL_CODE = 400 //业务错误
|
|
|
- TOKEN_ERROR_CODE = 401 //toke异常
|
|
|
- NO_AUTH = 403 //没有权限
|
|
|
- SPECIFIC_FAIL_CODE = 4001 // 业务指定错误
|
|
|
+ OK_CODE = 200 //业务成功
|
|
|
+ FAIL_CODE = 400 //业务错误
|
|
|
+ TOKEN_ERROR_CODE = 401 //toke异常
|
|
|
+ NO_AUTH = 403 //没有权限
|
|
|
+ SPECIFIC_FAIL_CODE = 4001 // 业务指定错误
|
|
|
REPORT_NOT_RELEASE_CODE = 4002 // 报告未发布错误
|
|
|
)
|
|
|
|
|
@@ -50,9 +49,12 @@ func result(code int, resultData ResultData, c *gin.Context) {
|
|
|
global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
c.JSON(code, resultData)
|
|
|
} else {
|
|
|
+ //global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
+ //encryptResult := utils.DesBase64Encrypt(jsonByte)
|
|
|
+ //c.JSON(code, string(encryptResult))
|
|
|
+
|
|
|
global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
- encryptResult := utils.DesBase64Encrypt(jsonByte)
|
|
|
- c.JSON(code, string(encryptResult))
|
|
|
+ c.JSON(code, resultData)
|
|
|
}
|
|
|
c.Abort()
|
|
|
}
|
|
@@ -174,4 +176,4 @@ func NotReleaseMsg(msg, errMsg string, c *gin.Context) {
|
|
|
ErrMsg: errMsg,
|
|
|
}
|
|
|
result(200, resultData, c)
|
|
|
-}
|
|
|
+}
|