aa
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
@@ -373,12 +375,12 @@ 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); err2 == nil {
|
||||
// data = strings.Replace(bf.String(), "\n", "", strings.LastIndex(bf.String(), "\n"))
|
||||
//} 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
|
||||
|
||||
Reference in New Issue
Block a user