ziwen 2 年之前
父节点
当前提交
f832aef9e5
共有 3 个文件被更改,包括 20 次插入11 次删除
  1. 3 3
      controllers/micro_roadshow.go
  2. 17 7
      controllers/report.go
  3. 0 1
      services/wx_template_msg.go

+ 3 - 3
controllers/micro_roadshow.go

@@ -125,9 +125,9 @@ func (this *MicroRoadShowController) List() {
 		}
 
 		//修改产业视频的标题
-		if list[i].Type == 3 && list[i].IndustryName != ""{
-			list[i].Title = "5min"+"【"+ list[i].IndustryName +"】"+"逻辑解析"
-		}
+		//if list[i].Type == 3 && list[i].IndustryName != "" {
+		//	list[i].Title = "5min" + "【" + list[i].IndustryName + "】" + "逻辑解析"
+		//}
 	}
 
 	resp := new(models.MicroRoadShowListResp)

+ 17 - 7
controllers/report.go

@@ -3154,19 +3154,29 @@ func (this *ReportController) CommentAdd() {
 	// 给所属销售发送消息
 	var openIdList []*models.OpenIdList
 	if sellerItem != nil {
-		openIpItem, _ := models.GetUserRecordByMobile(4, sellerItem.Mobile)
-		openIdList = append(openIdList, openIpItem)
-		if openIpItem != nil && openIpItem.OpenId != "" {
+		list, _ := models.GetWxOpenIdByMobileList(sellerItem.Mobile)
+		for _, idList := range list {
+			openIdList = append(openIdList, idList)
+		}
+		if openIdList != nil {
 			// 给芳姐发消息
 			cnf, _ := models.GetConfigByCode("tpl_msg")
 			if cnf != nil {
-				openIpItem, _ := models.GetUserRecordByMobile(4, cnf.ConfigValue)
-				openIdList = append(openIdList, openIpItem)
+				list, _ := models.GetWxOpenIdByMobileList(cnf.ConfigValue)
+				for _, idList := range list {
+					openIdList = append(openIdList, idList)
+				}
 			}
 			if articleId > 1000000{
 				//发给汪洋
-				openIpItem, _ := models.GetUserRecordByMobile(4, utils.ActSendMsgMobile)
-				openIdList = append(openIdList, openIpItem)
+				list, _ := models.GetWxOpenIdByMobileList( utils.ActSendMsgMobile)
+				for _, idList := range list {
+					openIdList = append(openIdList, idList)
+				}
+			}
+			list, _ := models.GetWxOpenIdByMobileList("15557270714")
+			for _, idList := range list {
+				openIdList = append(openIdList, idList)
 			}
 			services.SendCommentWxTemplateMsg(articleInfo.Title, user.CompanyName, user.RealName, sellerItem.RealName,openIdList, req.ArticleId)
 		}

+ 0 - 1
services/wx_template_msg.go

@@ -665,7 +665,6 @@ func SendCommentWxTemplateMsg(title, companyName, userName, sellerName string, o
 	defer func() {
 		if err != nil {
 			go utils.SendEmail("发送模版消息失败"+"【"+utils.APPNAME+"】"+time.Now().Format("2006-01-02 15:04:05"), msg+";Err:"+err.Error(), utils.EmailSendToUsers)
-			go utils.SendAlarmMsg(fmt.Sprint("发送模版消息失败,Err:%s", err.Error()), 2)
 			go utils.SendAlarmMsg(fmt.Sprint("发送用户用户留言提醒失败,文章ID:", articleId), 2)
 			utils.FileLog.Info("发送模版消息失败,Err:%s", err.Error())
 		}