Browse Source

后台获取消息分类接口修改

renjiaojiao 2 years ago
parent
commit
fb60ccd2b8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/customerService/newsController.go

+ 5 - 0
src/customerService/newsController.go

@@ -199,6 +199,11 @@ func SendMessageApi(context *admin.Context) (interface{}, error) {
 func GetMsgType(context *admin.Context) (interface{}, error) {
 	types := util.MessageDB.SelectBySql("SELECT msg_type,msg_name AS name,group_id FROM `message_class` WHERE background_send = 1 ")
 	if types != nil && len(*types) > 0 {
+		tp := []map[string]interface{}{}
+		for _, v := range *types {
+			v["msg_type"] = qutil.InterfaceToStr(v["msg_type"])
+			tp = append(tp, v)
+		}
 		return types, nil
 	}
 	return nil, errors.New("未查询到分类")