|
@@ -278,6 +278,7 @@ func (this *ResearchController) KolList() {
|
|
|
// @Title 主题详情
|
|
|
// @Description 主题详情接口
|
|
|
// @Param IndustrialManagementId query int true "分类ID"
|
|
|
+// @Param Source query int true "来源 1:研选,2:报告 默认1"
|
|
|
// @Success 200 {object} models.GetThemeDetailResp
|
|
|
// @router /theme/detail [get]
|
|
|
func (this *ResearchController) ThemeDetail() {
|
|
@@ -297,8 +298,19 @@ func (this *ResearchController) ThemeDetail() {
|
|
|
br.Msg = "请输入产业ID"
|
|
|
return
|
|
|
}
|
|
|
+ source, _ := this.GetInt("Source")
|
|
|
+ if source != 2 {
|
|
|
+ source = 1
|
|
|
+ }
|
|
|
+
|
|
|
+ var condition string
|
|
|
+ if source == 1 {
|
|
|
+ condition = ` AND a.category_name LIKE '%研选%' `
|
|
|
+ } else {
|
|
|
+ condition = ` AND a.category_name NOT LIKE '%研选%' `
|
|
|
+ }
|
|
|
resp := new(models.GetThemeDetailResp)
|
|
|
- list, err := models.GetThemeDetail(user.UserId, industrialManagementId)
|
|
|
+ list, err := models.GetThemeDetail(user.UserId, industrialManagementId, condition)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|