|
@@ -493,9 +493,13 @@ func GetUserTypeZhengShi(companyId int) (userType int, permissionStrnew, permiss
|
|
|
}
|
|
|
|
|
|
// GetSpecialDetailUserPower 处理用户查看详情的权限
|
|
|
-func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.ActivityDetail) (havePower bool, err error) {
|
|
|
+func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.ActivityDetail) (havePower, isResearchSpecial bool, err error) {
|
|
|
var companyDetailStatus string
|
|
|
var userTypeStr string
|
|
|
+ //如果是 公司调研电话会:3,或 专家线下沙龙:5 而且 除易董同步过来的以外的研选类型活动,必须要有研选的正式权限
|
|
|
+ if (activityInfo.ActivityTypeId == 3 || activityInfo.ActivityTypeId == 5) && activityInfo.YidongActivityId == "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
|
|
|
+ isResearchSpecial = true
|
|
|
+ }
|
|
|
//如果是弘则的用户或者宏观的权限不做校验
|
|
|
if GetBelongingRai(user.Mobile) || activityInfo.ChartPermissionName == utils.HONG_GUAN_NAME {
|
|
|
havePower = true
|
|
@@ -533,7 +537,7 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
return
|
|
|
}
|
|
|
//如果是 公司调研电话会:3,或 专家线下沙龙:5 而且 除易董同步过来的以外的研选类型活动,必须要有研选的正式权限
|
|
|
- if (activityInfo.ActivityTypeId == 3 || activityInfo.ActivityTypeId == 5) && activityInfo.YidongActivityId == "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
|
|
|
+ if isResearchSpecial {
|
|
|
if !strings.Contains(permissionStrZhengShi, activityInfo.ChartPermissionName) {
|
|
|
havePower = false
|
|
|
return
|
|
@@ -1320,7 +1324,7 @@ func ActivityAttendanceDetail(cont context.Context) (err error) {
|
|
|
var activityIds string
|
|
|
var activityIdsLongTime string //可回放的会议,到会详情持续更新加入到不做14天限制的活动中
|
|
|
fmt.Println("开始同步")
|
|
|
- dateTime := time.Now().AddDate(0, 0, -14).Format(utils.FormatDate)
|
|
|
+ dateTime := time.Now().AddDate(0, 0, -7).Format(utils.FormatDate)
|
|
|
dateNow := time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
|
|
|
startDate := dateTime + " 00:00:00"
|
|
|
endDate := dateNow + " 23:59:59"
|
|
@@ -1442,9 +1446,9 @@ func ActivityAttendanceDetail(cont context.Context) (err error) {
|
|
|
fmt.Println("AddCygxActivityRestrictSignupByAdmin Err:", err.Error())
|
|
|
return err
|
|
|
}
|
|
|
-
|
|
|
- go AddctivitySignupDetailByJmcj(needAddAttendanc, activityDetail.ActivityId)
|
|
|
go ActivityUserLabelLogAdd(activityDetail.ActivityId, mobileArr)
|
|
|
+ AddctivitySignupDetailByJmcj(needAddAttendanc, activityDetail.ActivityId)
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1554,8 +1558,10 @@ func ActivityAttendanceDetail(cont context.Context) (err error) {
|
|
|
return err
|
|
|
}
|
|
|
activityIds += strconv.Itoa(vAct.ActivityId) + ","
|
|
|
- go AddctivitySignupDetailByJmcj(needAddAttendanc, vAct.ActivityId)
|
|
|
+
|
|
|
go ActivityUserLabelLogAdd(vAct.ActivityId, mobileArr)
|
|
|
+
|
|
|
+ AddctivitySignupDetailByJmcj(needAddAttendanc, vAct.ActivityId)
|
|
|
}
|
|
|
}
|
|
|
}
|