Browse Source

线上路演不需要展示固定收益品种

xyxie 1 week ago
parent
commit
ddb4489737
2 changed files with 9 additions and 3 deletions
  1. 7 1
      models/tables/rddp/chart_permission/query.go
  2. 2 2
      services/company/permission.go

+ 7 - 1
models/tables/rddp/chart_permission/query.go

@@ -14,7 +14,7 @@ func GetListByProductId(productId int64) (list []*ChartPermission, err error) {
 
 // GetFiccListExceptTacticByProductId 获取ficc 除了市场策略的所有权限
 func GetFiccListExceptTacticByProductId() (list []*ChartPermission, err error) {
-	err = global.MYSQL["rddp"].Where(" enabled = 1 AND permission_type = 0 AND product_id = 1 and parent_id >0 and classify_name != '市场策略' and classify_name != '固定收益'").Order("sort asc").Find(&list).Error
+	err = global.MYSQL["rddp"].Where(" enabled = 1 AND permission_type = 0 AND product_id = 1 and parent_id >0 and classify_name != '市场策略'").Order("sort asc").Find(&list).Error
 	return
 }
 
@@ -58,6 +58,12 @@ func GetByChartPermissionId(chartPermissionId int) (item *ChartPermission, err e
 
 // GetFiccFirstListExceptTacticByProductId 获取ficc 除了市场策略的所有父级
 func GetFiccFirstListExceptTacticByProductId() (list []*ChartPermission, err error) {
+	err = global.MYSQL["rddp"].Where(" enabled = 1 AND permission_type = 0 AND product_id = 1 and classify_name != '市场策略' AND parent_id = 0").Order("sort asc").Find(&list).Error
+	return
+}
+
+// GetFiccFirstListExceptTacticAndFixedByProductId 获取ficc 除了市场策略和固定收益的所有父级
+func GetFiccFirstListExceptTacticAndFixedByProductId() (list []*ChartPermission, err error) {
 	err = global.MYSQL["rddp"].Where(" enabled = 1 AND permission_type = 0 AND product_id = 1 and classify_name != '市场策略' and classify_name != '固定收益' AND parent_id = 0").Order("sort asc").Find(&list).Error
 	return
 }

+ 2 - 2
services/company/permission.go

@@ -965,13 +965,13 @@ func GetBindFiccPermissions(user user.UserInfo) (ret response.BindPermissionFicc
 	}
 	permissionList, err := chart_permission2.GetFiccListExceptTacticByProductId()
 	if err != nil {
-		return
+		return	
 	}
 	permissionMap := make(map[uint64]bool)
 	permissionFirstMap := make(map[int]*response.BindPermissionFiccItem)
 
 	//查询首页展示的图标
-	permissionFirstList, err := chart_permission2.GetFiccFirstListExceptTacticByProductId()
+	permissionFirstList, err := chart_permission2.GetFiccFirstListExceptTacticAndFixedByProductId()
 	if err != nil {
 		return
 	}