|
@@ -54,7 +54,7 @@ func (this *ActivityCoAntroller) List() {
|
|
|
// @Param ActivityTypeIds query string false "活动类型id 多个用 , 隔开"
|
|
|
// @Param KeyWord query string false "搜索关键词"
|
|
|
// @Param ActiveState query string false "活动进行状态 未开始:1、进行中2、已结束3"
|
|
|
-// @Param IsShowJurisdiction query int false "是否仅展示有权限的,1是,0否 默认为零"
|
|
|
+// @Param IsShowJurisdiction query int false "是否仅展示有权限的,1是,2否 默认为零"
|
|
|
// @Success 200 {object} models.GetCygxActivityListRep
|
|
|
// @router /list [get]
|
|
|
func (this *ActivityCoAntroller) ActivityList() {
|
|
@@ -82,9 +82,9 @@ func (this *ActivityCoAntroller) ActivityList() {
|
|
|
if activeState == "" {
|
|
|
activeState = "1"
|
|
|
}
|
|
|
- if isShowJurisdiction != 1 {
|
|
|
- isShowJurisdiction = 0
|
|
|
- }
|
|
|
+ //if isShowJurisdiction != 1 {
|
|
|
+ // isShowJurisdiction = 0
|
|
|
+ //}
|
|
|
itemSearch := new(models.CygxActivityUserSearchContent)
|
|
|
itemSearch.UserId = uid
|
|
|
itemSearch.CreateTime = time.Now()
|
|
@@ -537,14 +537,24 @@ func (this *ActivityCoAntroller) GetUserSearchContent() {
|
|
|
}
|
|
|
var listChartPermissionid []*models.ActivityChartPermission
|
|
|
var errChart error
|
|
|
- if detail.IsShowJurisdiction != 1 {
|
|
|
- listChartPermissionidAll, errChartAll := models.GetChartPermissionActivity()
|
|
|
+ if isShowJurisdiction == 1 {
|
|
|
+ listChartPermissionidAll, errChartAll := models.GetUserCompanyPermission(user.CompanyId)
|
|
|
listChartPermissionid = listChartPermissionidAll
|
|
|
errChart = errChartAll
|
|
|
- } else {
|
|
|
- listChartPermissionidAll, errChartAll := models.GetUserCompanyPermission(user.CompanyId)
|
|
|
+ } else if isShowJurisdiction == 2 {
|
|
|
+ listChartPermissionidAll, errChartAll := models.GetChartPermissionActivity()
|
|
|
listChartPermissionid = listChartPermissionidAll
|
|
|
errChart = errChartAll
|
|
|
+ } else {
|
|
|
+ if detail.IsShowJurisdiction == 1 {
|
|
|
+ listChartPermissionidAll, errChartAll := models.GetUserCompanyPermission(user.CompanyId)
|
|
|
+ listChartPermissionid = listChartPermissionidAll
|
|
|
+ errChart = errChartAll
|
|
|
+ } else {
|
|
|
+ listChartPermissionidAll, errChartAll := models.GetChartPermissionActivity()
|
|
|
+ listChartPermissionid = listChartPermissionidAll
|
|
|
+ errChart = errChartAll
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if errChart != nil {
|