Explorar o código

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

renjiaojiao %!s(int64=2) %!d(string=hai) anos
pai
achega
fb60ccd2b8
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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("未查询到分类")