瀏覽代碼

no message

xingzai 1 年之前
父節點
當前提交
fb2fcc274d
共有 2 個文件被更改,包括 71 次插入8 次删除
  1. 13 8
      models/cygx_morning_meeting_gather.go
  2. 58 0
      services/morning_meeting.go

+ 13 - 8
models/cygx_morning_meeting_gather.go

@@ -67,14 +67,19 @@ func GetCygxMorningMeetingGatherById(condition string, pars []interface{}) (item
 }
 
 type CygxMorningMeetingGatherDetailListResp struct {
-	Id                  int    `description:"ID"`
-	IndustryId          int    `description:"产业id"` // 产业id
-	IndustryName        string `description:"产业名称"` // 产业名称
-	ChartPermissionName string `description:"行业名称"` // 行业名称
-	ChartPermissionId   int    `description:"行业id"` // 行业id
-	MeetingId           int    `description:"主表id"` // 主表id
-	Content             string `description:"内容"`   // 内容
-	PublishTime         string `description:"发布日期"`
+	Id                   int                      `description:"ID"`
+	IndustryId           int                      `description:"产业id"` // 产业id
+	IndustryName         string                   `description:"产业名称"` // 产业名称
+	ChartPermissionName  string                   `description:"行业名称"` // 行业名称
+	ChartPermissionId    int                      `description:"行业id"` // 行业id
+	MeetingId            int                      `description:"主表id"` // 主表id
+	Content              string                   `description:"内容"`   // 内容
+	PublishTime          string                   `description:"发布日期"`
+	ReportLink           string                   `description:"报告链接"`
+	LinkArticleId        string                   `description:"报告ID链接"`
+	Title                string                   `description:"标题"`
+	IndustrialSubjectIds string                   `description:"标的id"`
+	ListSubject          []*CygxIndustrialSubject `description:"标的列表"`
 }
 
 type CygxMorningMeetingGatherDetailResp struct {

+ 58 - 0
services/morning_meeting.go

@@ -112,3 +112,61 @@ func AddCygxMorningMeetingReviewChapterHistory(user *models.WxUserItem, articleI
 	}
 	return
 }
+
+// 通过晨会精华子ID,获取出参列表详情
+func GetCygxMorningMeetingReviewChapterListByIds(meetingreviewchaptIds []int) (err error) {
+	lenArr := len(meetingreviewchaptIds)
+	if lenArr == 0 {
+		return
+	}
+	defer func() {
+		if err != nil {
+			go utils.SendAlarmMsg(fmt.Sprint("通过晨会精华子ID,获取出参列表详情失败 ,GetCygxMorningMeetingReviewChapterListByIds err"+err.Error(), "通过晨会精华子ID,获取出参列表详情:", "meetingreviewchaptIds:", meetingreviewchaptIds), 2)
+		}
+	}()
+	var condition string
+	var pars []interface{}
+
+	pars = make([]interface{}, 0)
+	condition = ` AND c.id IN (` + utils.GetOrmInReplace(lenArr) + `)`
+	pars = append(pars, meetingreviewchaptIds)
+
+	listrMeet, e := models.GetCygxMorningMeetingReviewChapterList(condition, pars)
+	if e != nil {
+		err = errors.New("GetCygxMorningMeetingReviewChapterList, Err: " + e.Error())
+		return
+	}
+
+	var subjectIds []string
+	var subjectIdsMap = make(map[int][]string) // 晨会ID与标的ID字符串的map映射
+	for _, v := range listrMeet {
+		if v.IndustrialSubjectIds != "" {
+			slice := strings.Split(v.IndustrialSubjectIds, ",")
+			subjectIdsMap[v.Id] = slice
+			for _, v := range slice {
+				subjectIds = append(subjectIds, v)
+			}
+		}
+	}
+
+	//lensubjectIds := len(subjectIds)
+
+	//if lensubjectIds > 0 {
+	//	pars = make([]interface{}, 0)
+	//	condition = ` AND industrial_subject_id  IN (` + utils.GetOrmInReplace(lensubjectIds) + `)`
+	//
+	//	listsubject, e := models.GetCygxIndustrialSubjectListCondition(condition, pars)
+	//	if e != nil {
+	//		err = errors.New("GetCygxIndustrialSubjectListCondition, Err: " + e.Error())
+	//		return
+	//	}
+	//
+	//	var meetSubjectItems = make(map[int][]*models.CygxIndustrialSubject)
+	//
+	//	for _,v:= range listsubject{
+	//		if utils.InArrayByStr()
+	//	}
+	//}
+
+	return
+}