|
@@ -551,7 +551,7 @@ func (this *ResearchController) HotKeyWord() {
|
|
|
|
|
|
// @Title 研选文章类型列表
|
|
|
// @Description 研选文章类型列表接口
|
|
|
-// @Success 200 {object} models.IndustrialManagementNewList
|
|
|
+// @Success 200 {object} models.CygxArticleTypeListResp
|
|
|
// @router /article/typeList [get]
|
|
|
func (this *ResearchController) ArticleType() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
@@ -587,3 +587,42 @@ func (this *ResearchController) ArticleType() {
|
|
|
br.Msg = "获取成功"
|
|
|
br.Data = resp
|
|
|
}
|
|
|
+
|
|
|
+// @Title 研选最新报告列表
|
|
|
+// @Description 研选最新报告列表接口
|
|
|
+// @Success 200 {object} models.IndustrialManagementNewList
|
|
|
+// @router /article/newList [get]
|
|
|
+func (this *ResearchController) ArticleNewList() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ user := this.User
|
|
|
+ if user == nil {
|
|
|
+ br.Msg = "请重新登录"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var condition string
|
|
|
+ condition = " AND is_show_yanx = 1 "
|
|
|
+ list, err := models.GetCygxArticleTypeListCondition(condition)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp := new(models.CygxArticleTypeListResp)
|
|
|
+ for _, v := range list {
|
|
|
+ item := models.CygxArticleTypeResp{
|
|
|
+ ArticleTypeId: v.ArticleTypeId,
|
|
|
+ ArticleTypeName: v.ArticleTypeName,
|
|
|
+ ButtonStyle: v.ButtonStyle,
|
|
|
+ }
|
|
|
+ resp.List = append(resp.List, &item)
|
|
|
+ }
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = resp
|
|
|
+}
|