Procházet zdrojové kódy

Merge branch 'cygx/cygx_13.8' of http://8.136.199.33:3000/hongze/hz_crm_api

xingzai před 5 měsíci
rodič
revize
5a62ca268c

+ 4 - 0
controllers/cygx/apply_record.go

@@ -212,6 +212,10 @@ func (this *ApplyRecordController) ListSysRole() {
 			list[i].HttpUrl = utils.CYGX_WEB_URL + "/recent/" + strconv.Itoa(v.SourceId)
 		case "yanxuanspecial": //研选专栏
 			list[i].HttpUrl = utils.CYGX_WEB_URL + "/column/detail/" + strconv.Itoa(v.SourceId)
+		case utils.CYGX_OBJ_FICC_REPORT: //FICC研报
+			list[i].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.SourceId)
+		case utils.CYGX_OBJ_FICC_REPORT_XCX: //FICC研报
+			list[i].IsGray = true
 		}
 	}
 

+ 7 - 0
controllers/cygx/report_article.go

@@ -240,6 +240,7 @@ func (this *ReportArticleController) ReportArticleList() {
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return
 	}
+	//return
 	condition += `	GROUP BY art.article_id  ORDER BY art.publish_date DESC `
 	//fmt.Println(condition)
 	list, err := cygx.GetReportArticleList(condition, pars, startSize, pageSize, isClass)
@@ -369,6 +370,12 @@ func (this *ReportArticleController) ReportArticleList() {
 		list[k].CommentNum = mapCommment[v.ArticleId]
 		list[k].ListIndustrial = mapIndustrialList[v.ArticleId]
 		list[k].ListSubject = mapSubjectList[v.ArticleId]
+
+		if v.ReportId > 0 {
+			list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.ReportId)
+		} else {
+			list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
+		}
 	}
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp := new(cygx.GetReportArticleListRep)

+ 18 - 0
controllers/cygx/user.go

@@ -691,6 +691,9 @@ func (this *UserController) TableDetail() {
 				} else {
 					list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
 				}
+				if v.ReportId > 0 {
+					list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.ReportId)
+				}
 			}
 
 			//导出excel
@@ -808,6 +811,9 @@ func (this *UserController) TableDetail() {
 				} else {
 					list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
 				}
+				if v.ReportId > 0 {
+					list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.ReportId)
+				}
 			}
 		}
 	} else if source == 4 {
@@ -2528,6 +2534,9 @@ func (this *UserController) CompanyTableDetail() {
 			} else {
 				list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
 			}
+			if v.ReportId > 0 {
+				list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.ReportId)
+			}
 		}
 		//导出excel
 		if isExport {
@@ -2668,6 +2677,9 @@ func (this *UserController) CompanyTableDetail() {
 				} else {
 					list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
 				}
+				if v.ReportId > 0 {
+					list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.ReportId)
+				}
 			}
 		}
 	} else if source == 4 {
@@ -3830,6 +3842,9 @@ func (this *UserController) CompanyList() {
 			} else {
 				list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
 			}
+			if v.ReportId > 0 {
+				list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.ReportId)
+			}
 		}
 		//导出excel
 		if isExport {
@@ -3979,6 +3994,9 @@ func (this *UserController) CompanyList() {
 				} else {
 					list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
 				}
+				if v.ReportId > 0 {
+					list[k].HttpUrl = utils.CYGX_WEB_URL + "/material/ricc/yb/report/" + strconv.Itoa(v.ReportId)
+				}
 			}
 		}
 	} else if source == 4 {

+ 1 - 0
models/cygx/apply_record.go

@@ -65,6 +65,7 @@ type CygxApplyRecordResp struct {
 	Source                   string `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial"`
 	Title                    string `description:"标题"`
 	HttpUrl                  string `description:"跳转地址"`
+	IsGray                   bool   `description:"是否置灰"`
 }
 
 func GetCygxApplyRecord(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxApplyRecordResp, err error) {

+ 1 - 1
models/cygx/cygx_report_mapping.go

@@ -16,7 +16,7 @@ type CygxReportMappingListRep struct {
 // 主题列表
 func CygxReportMappingist(chartPermissionId int) (items []*CygxReportMapping, err error) {
 	o := orm.NewOrmUsingDB("hz_cygx")
-	sql := `SELECT sub_category_name FROM cygx_report_mapping WHERE  chart_permission_id = ? GROUP BY sub_category_name`
+	sql := `SELECT sub_category_name FROM cygx_report_mapping WHERE  chart_permission_id = ? GROUP BY sub_category_name   ORDER BY sort DESC , id  ASC  `
 	_, err = o.Raw(sql, chartPermissionId).QueryRows(&items)
 	return
 }

+ 2 - 0
models/cygx/cygx_user.go

@@ -301,6 +301,7 @@ type UserInteractionListResp struct {
 
 type UserInteraction struct {
 	ArticleId             int    `description:"文章id"`
+	ReportId              int    `description:"研报文章id"`
 	ActivityId            int    `description:"活动ID"`
 	ArticleType           int    `description:"文章类型 1:查研观向, 2:策略平台"`
 	ArticleIdMd5          string `description:"文章MD5id"`
@@ -738,6 +739,7 @@ func GetCygxArticleCollectByUser(uid, startSize, pageSize int, condition string)
 	sql := ` SELECT
 			art.title,
 			art.article_id,
+			art.report_id,
 			art.article_id_md5,
 			art.publish_date,
 			re.chart_permission_name,

+ 2 - 0
models/cygx/cygx_user_company.go

@@ -284,6 +284,7 @@ func GetCygxArticleCollectByCompanyWeekly(startSize, pageSize int, condition str
 	sql := ` SELECT
 			art.title,
 			art.article_id,
+			art.report_id,
 			art.article_id_md5,
 			art.publish_date,
 			re.chart_permission_name,
@@ -961,6 +962,7 @@ func GetCygxArticleCollectByCompanyList(startSize, pageSize int, condition strin
 	sql := ` SELECT
 			art.title,
 			art.article_id,
+			art.report_id,
 			art.article_id_md5,
 			art.publish_date,
 			re.chart_permission_name,

+ 4 - 1
models/cygx/report_article.go

@@ -32,7 +32,7 @@ type CygxReportArticleID struct {
 }
 
 type CygxReportArticle struct {
-	ReportId          int    `orm:"column(id);pk"description:"报告id"`
+	ReportId          int    `description:"报告id"`
 	ArticleId         int    `description:"文章id"`
 	Title             string `description:"标题"`
 	PublishDate       string `description:"发布时间"`
@@ -62,6 +62,7 @@ type CygxReportArticle struct {
 	Stock             string `description:"个股标签(上海策略品台同步)"`
 	FieldName         string `description:"产业标签(上海策略品台同步)"`
 	Label             string `description:"标签"`
+	HttpUrl           string `description:"跳转地址"`
 	ListIndustrial    []*IndustrialActivityGroupManagementRep
 	ListSubject       []*SubjectActivityGroupManagementRep
 }
@@ -87,6 +88,7 @@ func GetReportArticleList(condition string, pars []interface{}, startSize, pageS
 		sql = `SELECT
 				art.title,
 				art.article_id,
+				art.report_id,
 				art.category_id,
 				art.publish_date,
 				art.is_class,
@@ -110,6 +112,7 @@ func GetReportArticleList(condition string, pars []interface{}, startSize, pageS
 		sql = `SELECT
 				art.title,
 				art.article_id,
+				art.report_id,
 				art.category_id,
 				art.publish_date,
 				art.is_class,

+ 1 - 0
services/cygx/article.go

@@ -307,6 +307,7 @@ func HandleArticleAndYanxuanRecordList(items []*cygx.CygxArticleAndYanxuanRecord
 					item.PublishDate = mapArticle[v.SourceId].PublishDate
 					item.PermissionName = mapArticle[v.SourceId].PermissionName
 					item.ArticleIdMd5 = mapArticle[v.SourceId].ArticleIdMd5
+					item.ReportId = mapArticle[v.SourceId].ReportId
 				}
 			}
 			if v.Source == utils.CYGX_OBJ_YANXUANSPECIAL {

+ 2 - 0
utils/constants.go

@@ -455,6 +455,8 @@ const (
 	CYGX_OBJ_YANXUANSPECIAL     string = "yanxuanspecial"     // 对象类型:研选专栏
 	CYGX_OBJ_ASKSERIEVIDEO      string = "askserievideo"      // 对象类型:问答系列视频
 	CYGX_OBJ_RS_CALENDAR        string = "rscalendar"         // 对象类型:研究员日历安排
+	CYGX_OBJ_FICC_REPORT        string = "ficcreport"         // 对象类型:FICC研报
+	CYGX_OBJ_FICC_REPORT_XCX    string = "ficcreportxcx"      // 对象类型:FICC研报小程序
 )
 
 const (