From 7c968cb91c01a90a539a04eee2137e039405e4fe Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Thu, 15 Jul 2021 09:39:24 +0800 Subject: [PATCH] aa --- controllers/api_controller.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/controllers/api_controller.go b/controllers/api_controller.go index a5d68dbef..bf542581e 100644 --- a/controllers/api_controller.go +++ b/controllers/api_controller.go @@ -1,9 +1,7 @@ package controllers import ( - "bytes" "crypto/md5" - "encoding/json" "fmt" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxstore/cms" @@ -375,12 +373,6 @@ func (c *ApiController) GetPrintMsg(dataMap map[string]interface{}) (printMsg *c } else if printMsg == nil { return printMsg, model.ErrCodeGeneralFailed, fmt.Errorf("未查询到该消息! msg_id: %v", msgID) } else { - bf := bytes.NewBuffer([]byte{}) - jsonEncoder := json.NewEncoder(bf) - jsonEncoder.SetEscapeHTML(false) - if err2 := jsonEncoder.Encode(printMsg.Content); err2 == nil { - printMsg.Content = strings.Replace(bf.String(), "\n", "", strings.LastIndex(bf.String(), "\n")) - } return printMsg, model.ErrCodeGeneralFailed, err } return printMsg, errCode, err