|
@@ -379,11 +379,11 @@ func (c *YiDongController) UserCheck() {
|
|
|
c.FailWithMessage("签名错误!")
|
|
|
return
|
|
|
}
|
|
|
- //activityDetail, err := cygxActivity.GetAddActivityInfoById(activityIdYiDong)
|
|
|
- //if err != nil {
|
|
|
- // c.FailWithMessage("会议id异常:" + activityIdYiDong)
|
|
|
- // return
|
|
|
- //}
|
|
|
+ activityDetail, err := cygxActivity.GetAddActivityInfoById(activityIdYiDong)
|
|
|
+ if err != nil {
|
|
|
+ c.FailWithMessage("会议id异常:" + activityIdYiDong)
|
|
|
+ return
|
|
|
+ }
|
|
|
var dateTxt = []byte(mobile)
|
|
|
resultDe := utils.DesBase64Decrypt(dateTxt)
|
|
|
deMobile := string(resultDe)
|
|
@@ -393,36 +393,36 @@ func (c *YiDongController) UserCheck() {
|
|
|
return
|
|
|
}
|
|
|
resp := new(yidong.CheckHaspermissionResp)
|
|
|
- total, err := company_product.CheckUserAaiPerssionByMobile(deMobile)
|
|
|
- if err != nil {
|
|
|
- c.FailWithMessage("校验失败!" + err.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- ////获取所有的权限名称
|
|
|
- //companyPermissionName, err := company_product.GetCompanyPermissionByMobile(deMobile)
|
|
|
+ //total, err := company_product.CheckUserAaiPerssionByMobile(deMobile)
|
|
|
//if err != nil {
|
|
|
// c.FailWithMessage("校验失败!" + err.Error())
|
|
|
// return
|
|
|
//}
|
|
|
- //if companyPermissionName != "" {
|
|
|
- // companyPermissionName += ",宏观" // 有任意一个权限,就可以参加宏观权限的活动
|
|
|
- //}
|
|
|
- //if strings.Contains(companyPermissionName, activityDetail.ChartPermissionName) {
|
|
|
- // resp.Haspermission = true
|
|
|
- //}
|
|
|
- //校验是否是系统内权益的正式、试用、永续客户(不区分行业),若是,返回审核通过
|
|
|
- if total > 0 {
|
|
|
+ //获取所有的权限名称
|
|
|
+ companyPermissionName, err := company_product.GetCompanyPermissionByMobile(deMobile)
|
|
|
+ if err != nil {
|
|
|
+ c.FailWithMessage("校验失败!" + err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if companyPermissionName != "" {
|
|
|
+ companyPermissionName += ",宏观" // 有任意一个权限,就可以参加宏观权限的活动
|
|
|
+ }
|
|
|
+ if strings.Contains(companyPermissionName, activityDetail.ChartPermissionName) {
|
|
|
resp.Haspermission = true
|
|
|
- } else {
|
|
|
- statusResp, err := servicesYidong.GetClptCrmWorkerRule(deMobile)
|
|
|
- if err != nil {
|
|
|
- c.FailWithMessage("校验失败!" + err.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- if statusResp == 1 {
|
|
|
- resp.Haspermission = true
|
|
|
- }
|
|
|
}
|
|
|
+ ////校验是否是系统内权益的正式、试用、永续客户(不区分行业),若是,返回审核通过
|
|
|
+ //if total > 0 {
|
|
|
+ // resp.Haspermission = true
|
|
|
+ //} else {
|
|
|
+ // statusResp, err := servicesYidong.GetClptCrmWorkerRule(deMobile)
|
|
|
+ // if err != nil {
|
|
|
+ // c.FailWithMessage("校验失败!" + err.Error())
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if statusResp == 1 {
|
|
|
+ // resp.Haspermission = true
|
|
|
+ // }
|
|
|
+ //}
|
|
|
//添加请求日志记录
|
|
|
itemApiLog := new(cygx_three_api_log.CygxThreeApiLog)
|
|
|
itemApiLog.CreateTime = time.Now()
|