Browse Source

no message

xingzai 1 year ago
parent
commit
79dee33697
2 changed files with 21 additions and 0 deletions
  1. 1 0
      models/resource_data.go
  2. 20 0
      services/resource_data.go

+ 1 - 0
models/resource_data.go

@@ -32,6 +32,7 @@ type CygxResourceDataResp struct {
 	Researchsummary    *CygxReportSelectionRep                 `description:"本周研究汇总"`
 	Minutessummary     *CygxReportSelectionRep                 `description:"上周纪要汇总"`
 	Meetingreviewchapt *CygxMorningMeetingGatherDetailListResp `description:"晨会精华"`
+	ProductInterior    *CygxProductInteriorResp                `description:"产品内测"`
 }
 
 // Source      string    `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial"`

+ 20 - 0
services/resource_data.go

@@ -39,6 +39,7 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
 	var researchsummaryIds []int
 	var minutessummaryIds []int
 	var meetingreviewchaptIds []int
+	var productinteriorIds []int
 	//Source      string    `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial 、 本周研究汇总: researchsummary 、 上周纪要汇总 :minutessummary 、晨会精华 :meetingreviewchapt "`
 	for _, v := range list {
 		if v.Source == "article" {
@@ -61,7 +62,10 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
 			minutessummaryIds = append(minutessummaryIds, v.SourceId)
 		} else if v.Source == "meetingreviewchapt" {
 			meetingreviewchaptIds = append(meetingreviewchaptIds, v.SourceId)
+		} else if v.Source == "productinterior" {
+			productinteriorIds = append(productinteriorIds, v.SourceId)
 		}
+
 	}
 
 	//处理文章
@@ -139,6 +143,22 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
 		}
 	}
 
+	//处理产品内测
+	if len(productinteriorIds) > 0 {
+		pars = make([]interface{}, 0)
+		condition = `  AND art.status = 1 AND art.product_interior_id  IN (` + utils.GetOrmInReplace(len(productinteriorIds)) + `)`
+		pars = append(pars, productinteriorIds)
+		listProductInterior, e := models.GetCygxProductInteriorList(condition, pars, 0, len(researchsummaryIds))
+		if e != nil {
+			err = errors.New("GetCygxProductInteriorList, Err: " + e.Error())
+			return
+		}
+		for _, v := range listProductInterior {
+			v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
+			mapItems[fmt.Sprint("productinterior", v.ProductInteriorId)].ProductInterior = v
+		}
+	}
+
 	detail, e := models.GetConfigByCode("city_img_url")
 	if e != nil {
 		err = errors.New("GetResourceDataList, Err: " + e.Error())