不转译
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
@@ -374,8 +375,11 @@ func (c *ApiController) GetPrintMsg(dataMap map[string]interface{}) (data, errCo
|
||||
} else if printMsg == nil {
|
||||
return "", model.ErrCodeGeneralFailed, fmt.Errorf("未查询到该消息! msg_id: %v", msgID)
|
||||
} else {
|
||||
if byteData, err := json.Marshal(printMsg); err == nil {
|
||||
data = string(byteData)
|
||||
bf := bytes.NewBuffer([]byte{})
|
||||
jsonEncoder := json.NewEncoder(bf)
|
||||
jsonEncoder.SetEscapeHTML(false)
|
||||
if err2 := jsonEncoder.Encode(printMsg); err2 == nil {
|
||||
data = bf.String()
|
||||
} else {
|
||||
return "", model.ErrCodeGeneralFailed, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user