Browse Source

no message

xingzai 1 year ago
parent
commit
1e8c171fd9
1 changed files with 26 additions and 7 deletions
  1. 26 7
      controllers/company_apply.go

+ 26 - 7
controllers/company_apply.go

@@ -136,7 +136,12 @@ func (this *CompanyApplyController) ApplyContractHistoryList() {
 			}
 
 			checkItems := make([]*company.PermissionLookItem, 0)
-
+			raiPermissions, e := company.GetPermissionLookItemsExt("2", utils.COMPANY_PRODUCT_RAI_NAME)
+			if e != nil {
+				br.Msg = "获取失败"
+				br.ErrMsg = "获取权益权限列表失败, Err: " + e.Error()
+				return
+			}
 			//大套餐类型单独展示
 			if companyContract.RaiPackageType > 0 {
 				n := new(company.PermissionLookItem)
@@ -147,14 +152,28 @@ func (this *CompanyApplyController) ApplyContractHistoryList() {
 				}
 				checkList = append(checkList, 0)
 				checkItems = append(checkItems, n)
+
+				for _, n := range raiPermissions {
+					match := hasMap[n.ChartPermissionId]
+					if match == nil {
+						continue
+					}
+					//研选的也要单独处理
+					if n.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
+						if expensiveYx == 1 {
+							n.PermissionName += "(5w)"
+						} else if expensiveYx == 2 {
+							n.PermissionName += "(10w)"
+						} else if expensiveYx == 0 {
+							n.PermissionName += "(3w)"
+						}
+						checkList = append(checkList, n.ChartPermissionId)
+						checkItems = append(checkItems, n)
+					}
+
+				}
 			} else {
 				// PS:本来想把这个移到循环外面去优化一下...但是发现有指针引用变量被改掉的问题, BUG太多了改不完了先这样吧=_=!
-				raiPermissions, e := company.GetPermissionLookItemsExt("2", utils.COMPANY_PRODUCT_RAI_NAME)
-				if e != nil {
-					br.Msg = "获取失败"
-					br.ErrMsg = "获取权益权限列表失败, Err: " + e.Error()
-					return
-				}
 
 				for _, n := range raiPermissions {
 					match := hasMap[n.ChartPermissionId]