|
@@ -69,15 +69,16 @@ func SearchKeywordUserRmind(user *models.WxUserItem, keyWord string) (err error)
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
fmt.Println(err)
|
|
|
- go utils.SendAlarmMsg("用户搜索操作操作行为,模板消息推送失败"+err.Error(), 2)
|
|
|
+ go utils.SendAlarmMsg(fmt.Sprint("用户搜索操作操作行为,模板消息推送失败"+err.Error(), "UserId:", user.UserId, "keyWord:", keyWord), 2)
|
|
|
}
|
|
|
}()
|
|
|
- countUser, err := models.GetUserRemind(user.UserId)
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
+ countUser, e := models.GetUserRemind(user.UserId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetUserRemind, Err: " + e.Error())
|
|
|
+ return
|
|
|
}
|
|
|
if countUser == 0 {
|
|
|
- return err
|
|
|
+ return
|
|
|
}
|
|
|
var first string
|
|
|
var keyword1 string
|
|
@@ -86,9 +87,10 @@ func SearchKeywordUserRmind(user *models.WxUserItem, keyWord string) (err error)
|
|
|
var keyword4 string
|
|
|
var remark string
|
|
|
//获取销售手机号
|
|
|
- sellerItemQy, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
|
|
|
- if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
- return err
|
|
|
+ sellerItemQy, e := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
+ err = errors.New("GetSellerByCompanyIdCheckFicc, Err: " + e.Error())
|
|
|
+ return
|
|
|
}
|
|
|
if sellerItemQy != nil {
|
|
|
openIdList, e := models.GetWxOpenIdByMobileList(sellerItemQy.Mobile)
|