|
@@ -131,16 +131,23 @@ func GetUserApplyRecordCountByCompanyIdPay(companyIdPay int) (isCompanyApply boo
|
|
go utils.SendAlarmMsg(fmt.Sprint("获取客户是否有过历史申请记录 GetUserApplyRecordCountByCompanyIdPay, err:", err.Error()), 2)
|
|
go utils.SendAlarmMsg(fmt.Sprint("获取客户是否有过历史申请记录 GetUserApplyRecordCountByCompanyIdPay, err:", err.Error()), 2)
|
|
}
|
|
}
|
|
}()
|
|
}()
|
|
- if companyIdPay >= 1 {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ //if companyIdPay >= 1 {
|
|
|
|
+ // return
|
|
|
|
+ //}
|
|
// 客户申请
|
|
// 客户申请
|
|
applyCount, e := models.GetApplyRecordCountByCompanyIdPay(companyIdPay)
|
|
applyCount, e := models.GetApplyRecordCountByCompanyIdPay(companyIdPay)
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("获取用户申请信息失败, Err: " + e.Error())
|
|
|
|
|
|
+ if e != nil {
|
|
|
|
+ err = errors.New("GetApplyRecordCountByCompanyIdPay, Err: " + e.Error())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //有研选订阅的权限的也不开放申请按钮
|
|
|
|
+ permissionCount, e := models.GetCompanyPermissionCheck(companyIdPay, utils.CHART_PERMISSION_ID_YANXUAN)
|
|
|
|
+ if e != nil {
|
|
|
|
+ err = errors.New("GetCompanyPermissionCheck, Err: " + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if applyCount > 0 {
|
|
|
|
|
|
+ if applyCount > 0 || permissionCount > 0 {
|
|
isCompanyApply = true
|
|
isCompanyApply = true
|
|
}
|
|
}
|
|
return
|
|
return
|