|
@@ -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("未查询到分类")
|