|
@@ -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)
|
|
|
}
|