|
@@ -215,11 +215,20 @@ func AddCompanyApprovalMessageRai(companyId, companyContractId int, applyRealNam
|
|
|
return
|
|
|
}
|
|
|
go SendWxMsgWithRaiSell(first, keyword1, keyword2, keyword3, keyword4, openIdList)
|
|
|
- for _, v := range contractDetail.PermissionList {
|
|
|
- for _, vv := range v.Items {
|
|
|
- if vv.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
|
|
|
- go SendWxCategoryMsgWithRaiSell(companyName, "销售:"+applyRealName, "已签约研选", time.Now().Format(utils.FormatDateTimeMinute2), openIdList)
|
|
|
- }
|
|
|
+
|
|
|
+ list, e := company.GetCompanyContractPermissionByCompanyContractId(companyContractId)
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
+ err = errors.New("GetCompanyContractPermissionByCompanyContractId, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if len(list) == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, v := range list {
|
|
|
+ if v.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN || v.ChartPermissionId == utils.YAN_XUAN_KOU_DIAN_BAO_ID {
|
|
|
+ go SendWxCategoryMsgWithRaiSell(companyName, "销售:"+applyRealName, "已签约研选", time.Now().Format(utils.FormatDateTimeMinute2), openIdList)
|
|
|
}
|
|
|
}
|
|
|
return
|