فهرست منبع

fix(消息): 消息调整

lk 2 سال پیش
والد
کامیت
ac5fe2bddf

+ 2 - 4
opms_admin/app/service/sys_message.go

@@ -134,15 +134,13 @@ func (s *MessageService) Create(req *model.CreateSysMessageReq) (err error) {
 	for _, v := range gset.NewStrSetFrom(sendMsgType).Slice() {
 		switch v {
 		case "10": // 10:websocket
-			//go BatchSendMessageNotify(userIds, *data)
-			s.handleMsgBySetting(userIds, data)
+			go BatchSendMessageNotify(userIds, *data)
 			fmt.Println(v, "10")
 		case "20": // 20:邮件
 			go s.BatchSendUserEmailMsg(userIds, data.MsgTitle, data.MsgContent)
 			fmt.Println(v, "20")
 		case "30": // 30:钉钉
-			//go s.BatchSendUserDingTalkTextMsg(userIds, data.MsgTitle, data.MsgContent)
-			s.handleMsgBySetting(userIds, data)
+			go s.BatchSendUserDingTalkTextMsg(userIds, data.MsgType, data.MsgContent)
 			fmt.Println(v, "30")
 		case "40": // 40:微信小程序订阅消息
 

+ 1 - 4
opms_admin/config/config.toml

@@ -60,7 +60,4 @@
     host="hwsmtp.exmail.qq.com"
     port="465"
     user="likai@dashoo.cn"
-    password="LLLkkk0210"
-
-[message]
-    type="dingding" # dingding / websocket
+    password="LLLkkk0210"

+ 2 - 2
opms_parent/app/service/plat/plat_followup_comment.go

@@ -82,11 +82,11 @@ func (s *followupCommentService) Create(req *model.AddPlatFollowupCommentReq) (e
 
 	msg := g.MapStrStr{
 		"msgTitle":    "跟进记录评论提醒",
-		"msgContent":  fmt.Sprintf("<p>%v %v 评论:%v</p>", followup.TargetName, platFollowupComment.CreatedName, platFollowupComment.Content),
+		"msgContent":  fmt.Sprintf("%v %v 评论:%v", followup.TargetName, platFollowupComment.CreatedName, platFollowupComment.Content),
 		"msgType":     "20",
 		"recvUserIds": recvUserIds,
 		"msgStatus":   "10",
-		"sendType":    "10",
+		"sendType":    "30",
 	}
 	if err := service.CreateSystemMessage(msg); err != nil {
 		g.Log().Error("消息提醒异常:", err)