Browse Source

no message

xingzai 2 years ago
parent
commit
f4bcdb3d70
2 changed files with 14 additions and 13 deletions
  1. 1 1
      models/activity.go
  2. 13 12
      services/activity.go

+ 1 - 1
models/activity.go

@@ -736,7 +736,7 @@ func GetActivityLabelListAll(condition, sortTime string, pars []interface{}, sta
 	if condition != "" {
 		sql += condition
 	}
-	sql += ` GROUP BY art.label ORDER BY ` + sortTime + ` ,art.activity_id DESC  LIMIT ?,? `
+	sql += ` GROUP BY art.activity_id ORDER BY ` + sortTime + ` ,art.activity_id DESC  LIMIT ?,? `
 
 	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
 	return

+ 13 - 12
services/activity.go

@@ -335,6 +335,7 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
 				err = errs
 				return
 			}
+			permissionStrnew = permissionStr
 			//大套餐客户,数据库添加标识,
 			companyUserTypeDetail, errs := models.GetCygxCompanyUserType(companyId)
 			if errs != nil && errs.Error() != utils.ErrNoRow() {
@@ -527,18 +528,18 @@ func GetShareNoPowe(activityInfo *models.ActivityDetail, permissionStr string, u
 	//	noPower = true
 	//}
 	//1、永续客户 //2、大套餐客户(4个行业全开通的正式客户) //3、分行业套餐客户(开通对应行业的正式客户) //4、仅开通专家套餐的正式客户 //5、开通对应行业套餐或专家套餐的试用客户
-	if userType == 2 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
-		noPower = true
-	}
-	if userType == 2 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
-		noPower = true
-	}
-	if userType == 3 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
-		noPower = true
-	}
-	if userType == 3 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
-		noPower = true
-	}
+	//if userType == 2 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
+	//	noPower = true
+	//}
+	//if userType == 2 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
+	//	noPower = true
+	//}
+	//if userType == 3 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
+	//	noPower = true
+	//}
+	//if userType == 3 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
+	//	noPower = true
+	//}
 	if userType == 8 {
 		permissionShengji, errs := models.GetCompanyPermissionByUserZhengShiTrip(user.CompanyId)
 		if errs != nil {