xingzai hace 2 años
padre
commit
df52ec8f48
Se han modificado 2 ficheros con 3 adiciones y 30 borrados
  1. 2 29
      controllers/activity.go
  2. 1 1
      services/activity.go

+ 2 - 29
controllers/activity.go

@@ -44,28 +44,6 @@ func (this *ActivityController) LabelTypeList() {
 	activeState := this.GetString("ActiveState")
 	var condition string
 	var pars []interface{}
-	//if whichDay != "" {
-	//	var startDate string
-	//	var endDate string
-	//	if whichDay == "1" {
-	//		startDate = time.Now().Format(utils.FormatDate)
-	//		endDate = startDate
-	//	} else if whichDay == "2" {
-	//		startDate = time.Now().AddDate(0, 0, +1).Format(utils.FormatDate)
-	//		endDate = startDate
-	//	} else {
-	//		startDate = time.Now().Format(utils.FormatDate)
-	//		endDate = time.Now().AddDate(0, 0, +1).Format(utils.FormatDate)
-	//	}
-	//	startDate += " 00:00:00'"
-	//	endDate += " 23:59:59'"
-	//	condition += `AND activity_time BETWEEN ? AND ? `
-	//	pars = append(pars, startDate, endDate)
-	//}
-	//if activeState == "" {
-	//	activeState = "1,2"
-	//}
-	//condition += ` AND active_state  IN (` + activeState + `) `
 
 	// 查研观向7.4-始终查询宏观的活动
 	if chartPermissionIds != "" {
@@ -317,11 +295,6 @@ func (this *ActivityController) ActivityListNew() {
 		return
 	}
 
-	//for _, v := range list {
-	//	if mapDingActivityId[v.ActivityId] == 0 {
-	//		activityList = append(activityList, v)
-	//	}
-	//}
 	for k, v := range list {
 		if mapActivityVoice[v.ActivityId] != nil {
 			list[k].FileType = 1
@@ -865,8 +838,8 @@ func (this *ActivityController) SignupAdd() {
 		models.BindUserOutboundMobileByMobile(user.Mobile, countryCode, uid)
 	}
 	resp.SignupType = signupType
-	resp.SignupStatus = signupStatus
-	resp.HasPermission = hasPermission
+	//resp.SignupStatus = signupStatus
+	//resp.HasPermission = hasPermission
 	//if signupStatus == "Success" {
 	resp.ActivityId = activityId
 	//}

+ 1 - 1
services/activity.go

@@ -631,7 +631,7 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 	if activityInfo.YidongActivityId != "" && permissionStr != "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 		havePower = true
 	}
-	if havePower {
+	if havePower && activityInfo.LimitPeopleNum > 0 {
 		//对于一些特殊的活动,即使权限满足也不给产看
 		noPower, e := GetShareNoPowe(activityInfo, permissionStr, userType, user)
 		if e != nil {