zhangchuanxing hace 2 meses
padre
commit
56f1bc82a0

+ 1 - 0
controllers/gushou.go

@@ -66,6 +66,7 @@ func (this *MobileGushouController) GushouTimeLineList() {
 		v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
 		v.Resource = 1
 		v.Content = services.AnnotationHtml(v.Content)
+		v.ChartPermissionName = utils.GU_SHOU_NAME
 	}
 	if len(list) == 0 {
 		list = make([]*time_line.CygxGushouTimeLineResp, 0)

+ 15 - 0
controllers/report.go

@@ -70,6 +70,21 @@ func (this *MobileReportController) TradeList() {
 			}
 		}
 
+		if ChartPermissionId == utils.GU_SHOU_ID {
+			cfGushou, err := models.GetConfigByCode(utils.CYGX_GUSHOU_TIME_LINE_STATUS)
+			if err != nil {
+				br.Msg = "获取失败"
+				br.ErrMsg = "获取数据失败,Err:" + err.Error()
+				return
+			}
+			if cfGushou.ConfigValue == "1" || user.CompanyId == utils.HZ_COMPANY_ID {
+				item := new(models.TradeReportMapping)
+				item.CategoryId = utils.TIME_LINE_ID
+				item.MatchTypeName = utils.TIME_LINE_NAME
+				list = append(list, item)
+			}
+		}
+
 		for _, v := range listTrade {
 			list = append(list, v)
 		}

+ 8 - 7
models/tactics_time_line.go

@@ -35,13 +35,14 @@ type GetCygxTacticsTimeLineResp struct {
 }
 
 type CygxTacticsTimeLineResp struct {
-	TimeLineId  int    `description:"ID"`
-	PublishTime string `description:"发布日期"`
-	Status      int    `description:"0:未发布,1:已发布"`
-	Content     string `description:"内容"`
-	ArticleId   int    `description:"文章ID"`
-	ChartId     int    `description:"图表ID"`
-	Link        string `description:"文章或图表链接"`
+	TimeLineId          int    `description:"ID"`
+	PublishTime         string `description:"发布日期"`
+	Status              int    `description:"0:未发布,1:已发布"`
+	Content             string `description:"内容"`
+	ArticleId           int    `description:"文章ID"`
+	ChartId             int    `description:"图表ID"`
+	Link                string `description:"文章或图表链接"`
+	ChartPermissionName string `description:"行业名称"`
 }
 
 // 获取数量

+ 9 - 8
models/time_line/gushou_time_line.go

@@ -36,14 +36,15 @@ type GetCygxGushouTimeLineResp struct {
 }
 
 type CygxGushouTimeLineResp struct {
-	TimeLineId  int    `description:"ID"`
-	PublishTime string `description:"发布日期"`
-	Status      int    `description:"0:未发布,1:已发布"`
-	Content     string `description:"内容"`
-	ArticleId   int    `description:"文章ID"`
-	ChartId     int    `description:"图表ID"`
-	Link        string `description:"文章或图表链接"`
-	Resource    int    `description:"来源类型,1:文章、2:产品内测、3:晨报点评"`
+	TimeLineId          int    `description:"ID"`
+	PublishTime         string `description:"发布日期"`
+	Status              int    `description:"0:未发布,1:已发布"`
+	Content             string `description:"内容"`
+	ArticleId           int    `description:"文章ID"`
+	ChartId             int    `description:"图表ID"`
+	Link                string `description:"文章或图表链接"`
+	Resource            int    `description:"来源类型,1:文章、2:产品内测、3:晨报点评"`
+	ChartPermissionName string `description:"行业名称"`
 }
 
 // 获取数量

+ 2 - 2
utils/constants.go

@@ -103,8 +103,8 @@ const (
 	REOURCE_YX                       string = "Yx"
 	REOURCE_HZ                       string = "Hz"
 	GU_SHOU_NAME                     string = "固收"
-	GU_SHOU_ID                       int    = 100000 // 自定义权限类型ID ,十万起步
-	GU_SHOU_ID_CHART                 int    = 53     // chart_permission 表 固收ID
+	GU_SHOU_ID                       int    = 53 // 自定义权限类型ID ,十万起步
+	GU_SHOU_ID_CHART                 int    = 53 // chart_permission 表 固收ID
 	HONG_GUAN_NAME                   string = "宏观"
 	CYGX_TACTICS_TIME_LINE_STATUS    string = "cygx_tactics_time_line_status" // 策略时间线是否对外开放
 	CYGX_GUSHOU_TIME_LINE_STATUS     string = "cygx_gushou_time_line_status"  // 固收时间线是否对外开放