|
@@ -41,14 +41,14 @@ func result(code int, resultData ResultData, c *gin.Context) {
|
|
|
//记录错误日志
|
|
|
if resultData.ErrMsg != "" {
|
|
|
logSlice = append(logSlice, fmt.Sprint("ErrMsg:", resultData.ErrMsg))
|
|
|
- global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
+ //global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
}
|
|
|
|
|
|
// 测试环境不加密
|
|
|
if global.CONFIG.Serve.RunMode == "debug" {
|
|
|
c.JSON(code, resultData)
|
|
|
} else {
|
|
|
- //global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
+ global.LOG.Info(strings.Join(logSlice, ";"))
|
|
|
encryptResult := utils.DesBase64Encrypt(jsonByte)
|
|
|
c.JSON(code, string(encryptResult))
|
|
|
}
|
|
@@ -146,8 +146,8 @@ func SpecificFail(data interface{}, message string, c *gin.Context) {
|
|
|
// FailMsg 操作失败
|
|
|
func FailMsg(msg, errMsg string, c *gin.Context) {
|
|
|
resultData := ResultData{
|
|
|
- Code: FAIL_CODE,
|
|
|
- Msg: msg,
|
|
|
+ Code: FAIL_CODE,
|
|
|
+ Msg: msg,
|
|
|
ErrMsg: errMsg,
|
|
|
}
|
|
|
result(200, resultData, c)
|