瀏覽代碼

查研观向 9.7

xingzai 2 年之前
父節點
當前提交
77291a7b80
共有 9 個文件被更改,包括 268 次插入16 次删除
  1. 15 0
      controllers/activity.go
  2. 18 0
      controllers/article.go
  3. 131 0
      controllers/industry.go
  4. 6 0
      models/activity.go
  5. 6 0
      models/article.go
  6. 27 10
      models/industry_fllow.go
  7. 15 6
      routers/commentsRouter.go
  8. 5 0
      routers/router.go
  9. 45 0
      services/activity.go

+ 15 - 0
controllers/activity.go

@@ -638,6 +638,7 @@ func (this *ActivityCoAntroller) ScheduleList() {
 // @Title  活动详情
 // @Title  活动详情
 // @Description 获取活动详情接口
 // @Description 获取活动详情接口
 // @Param   ActivityId   query   int  true       "活动ID"
 // @Param   ActivityId   query   int  true       "活动ID"
+// @Param   IsSendWx   query   int  false       "是否是通过微信模版进来的 1是,其它否"
 // @Success Ret=200 {object} models.CygxActivityResp
 // @Success Ret=200 {object} models.CygxActivityResp
 // @router /detail [get]
 // @router /detail [get]
 func (this *ActivityCoAntroller) Detail() {
 func (this *ActivityCoAntroller) Detail() {
@@ -655,6 +656,7 @@ func (this *ActivityCoAntroller) Detail() {
 	}
 	}
 	uid := user.UserId
 	uid := user.UserId
 	activityId, _ := this.GetInt("ActivityId")
 	activityId, _ := this.GetInt("ActivityId")
+	isSendWx, _ := this.GetInt("IsSendWx")
 	if activityId < 1 {
 	if activityId < 1 {
 		br.Msg = "请输入活动ID"
 		br.Msg = "请输入活动ID"
 		return
 		return
@@ -1060,6 +1062,19 @@ func (this *ActivityCoAntroller) Detail() {
 			return
 			return
 		}
 		}
 		activityInfo.SignupType = mapActivitySignup[activityId]
 		activityInfo.SignupType = mapActivitySignup[activityId]
+		//判断是不是通过微信模版推送消息进来的
+		if isSendWx == 1 && len(industrialList) > 0 {
+			activityInfo.IsShowFollowButton = true
+		}
+		if activityInfo.ReportLink != "" {
+			artList, err := services.GetActivityReportLinkToArticleList(activityInfo)
+			if err != nil && err.Error() != utils.ErrNoRow() {
+				br.Msg = "获取信息失败"
+				br.ErrMsg = "解析文章关联的报告内容失败:" + activityInfo.ReportLink
+				return
+			}
+			activityInfo.ListArticle = artList
+		}
 		//处理按钮是否展示问题
 		//处理按钮是否展示问题
 		resp.Detail = services.ActivityButtonShow(activityInfo)
 		resp.Detail = services.ActivityButtonShow(activityInfo)
 	}
 	}

+ 18 - 0
controllers/article.go

@@ -40,6 +40,7 @@ type ArticleControllerMobile struct {
 // @Title 获取报告详情
 // @Title 获取报告详情
 // @Description 获取报告详情接口
 // @Description 获取报告详情接口
 // @Param   ArticleId   query   int  true       "报告ID"
 // @Param   ArticleId   query   int  true       "报告ID"
+// @Param   IsSendWx   query   int  false       "是否是通过微信模版进来的 1是,其它否"
 // @Success 200 {object} models.ArticleDetailResp
 // @Success 200 {object} models.ArticleDetailResp
 // @router /detail [get]
 // @router /detail [get]
 func (this *ArticleController) Detail() {
 func (this *ArticleController) Detail() {
@@ -58,6 +59,7 @@ func (this *ArticleController) Detail() {
 
 
 	uid := user.UserId
 	uid := user.UserId
 	articleId, err := this.GetInt("ArticleId")
 	articleId, err := this.GetInt("ArticleId")
+	isSendWx, _ := this.GetInt("IsSendWx")
 	if articleId <= 0 {
 	if articleId <= 0 {
 		br.Msg = "文章不存在"
 		br.Msg = "文章不存在"
 		br.ErrMsg = "文章不存在,文章ID错误"
 		br.ErrMsg = "文章不存在,文章ID错误"
@@ -80,6 +82,22 @@ func (this *ArticleController) Detail() {
 		br.ErrMsg = "获取信息失败,Err:" + err.Error()
 		br.ErrMsg = "获取信息失败,Err:" + err.Error()
 		return
 		return
 	}
 	}
+	if isSendWx == 1 {
+		var condition string
+		var pars []interface{}
+		pars = make([]interface{}, 0)
+		condition = ` AND article_id  = ? `
+		pars = append(pars, articleId)
+		industrialList, err := models.GetIndustrialArticleGroupManagementList(condition, pars)
+		if err != nil && err.Error() != utils.ErrNoRow() {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "获取信息失败,Err:" + err.Error()
+			return
+		}
+		if len(industrialList) > 0 {
+			detail.IsShowFollowButton = true
+		}
+	}
 	//是否属于专项调研报告
 	//是否属于专项调研报告
 	if detail.SubCategoryName == "专项调研" {
 	if detail.SubCategoryName == "专项调研" {
 		detail.IsSpecialArticle = true
 		detail.IsSpecialArticle = true

+ 131 - 0
controllers/industry.go

@@ -0,0 +1,131 @@
+package controllers
+
+import (
+	"encoding/json"
+	"hongze/hongze_cygx/models"
+	"hongze/hongze_cygx/utils"
+	"strconv"
+	"time"
+)
+
+// 报告
+type IndustryController struct {
+	BaseAuthController
+}
+
+// @Title 关注/取消关注产业
+// @Description 关注/取消关注 接口
+// @Param	request	body models.CygxIndustryFllowRep true "type json string"
+// @Success 200
+// @router /fllow [post]
+func (this *IndustryController) Fllow() {
+	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
+	}
+	//type IndustryFllowArryReq struct {
+	//	SourceId int    `description:"资源ID"`
+	//	Source   string `description:"资源类型 报告 :article 、活动 :activity"`
+	//	DoType   string `description:"操作方式 关注 :add 、取消关注 :cancel"`
+	//}
+	uid := user.UserId
+	var req models.IndustryFllowArryReq
+
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	sourceId := req.SourceId
+	source := req.Source
+	doType := req.DoType
+	var condition string
+	var pars []interface{}
+	var industrialIds []int
+	if source == "article" {
+		pars = make([]interface{}, 0)
+		condition = ` AND article_id  = ? `
+		pars = append(pars, sourceId)
+		industrialList, err := models.GetIndustrialArticleGroupManagementList(condition, pars)
+		if err != nil && err.Error() != utils.ErrNoRow() {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "获取信息失败,Err:" + err.Error()
+			return
+		}
+		if len(industrialList) > 0 {
+			for _, v := range industrialList {
+				industrialIds = append(industrialIds, v.IndustrialManagementId)
+			}
+		}
+	} else if source == "activity" {
+		//处理活动关联的产业
+		industrialList, err := models.GetIndustrialActivityGroupManagementList(sourceId)
+		if err != nil && err.Error() != utils.ErrNoRow() {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "获取活动关联的产业列表信息失败,Err:" + err.Error() + "activityId:" + strconv.Itoa(sourceId)
+			return
+		}
+		if len(industrialList) > 0 {
+			for _, v := range industrialList {
+				industrialIds = append(industrialIds, v.IndustrialManagementId)
+			}
+		}
+	} else {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "资源类型有误:" + source
+		return
+	}
+	lenindustrialIds := len(industrialIds)
+	if lenindustrialIds == 0 {
+		br.Msg = "操作失败!"
+		br.ErrMsg = "对应的产业不存在:" + source + "ID:" + strconv.Itoa(sourceId)
+		return
+	}
+	//批量取关与关注
+	if doType == "add" {
+		var industryFllowItems []*models.CygxIndustryFllow
+		for _, v := range industrialIds {
+			item := new(models.CygxIndustryFllow)
+			item.IndustrialManagementId = v
+			item.UserId = uid
+			item.Email = user.Email
+			item.Mobile = user.Mobile
+			item.RealName = user.RealName
+			item.CompanyId = user.CompanyId
+			item.CompanyName = user.CompanyName
+			item.Type = 1
+			item.CreateTime = time.Now()
+			item.ModifyTime = time.Now()
+			industryFllowItems = append(industryFllowItems, item)
+		}
+		err = models.AddCygxIndustryFllowMulti(industryFllowItems)
+	} else if doType == "cancel" {
+		pars = make([]interface{}, 0)
+		condition = ` AND  industrial_management_id IN (` + utils.GetOrmInReplace(lenindustrialIds) + `)`
+		pars = append(pars, industrialIds)
+		err = models.RemoveCygxIndustryFllowArry(uid, condition, pars)
+	} else {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "操作方式有误:" + doType
+		return
+	}
+	if err != nil {
+		br.Msg = "操作失败"
+		br.ErrMsg = "取消关注失败,Err:" + err.Error()
+		return
+	}
+	//处理是否关注全部赛道字段
+	//go services.IndustryFllowWithTrack(industrialManagementId, count, uid)
+	br.Msg = "操作成功"
+	br.Ret = 200
+	br.Success = true
+	//br.Data = resp
+}

+ 6 - 0
models/activity.go

@@ -195,6 +195,12 @@ type ActivityDetail struct {
 	SourceType              int                        `description:"活动来源。 1:活动 、2:专项产业调研"`
 	SourceType              int                        `description:"活动来源。 1:活动 、2:专项产业调研"`
 	TripImgLink             string                     `description:"专项产业调研行程链接"`
 	TripImgLink             string                     `description:"专项产业调研行程链接"`
 	ActivityTimeEnd         string                     `description:"专项产业调研活动预期结束时间"`
 	ActivityTimeEnd         string                     `description:"专项产业调研活动预期结束时间"`
+	IsShowFollowButton      bool                       `description:"是否展示关注取关按钮"`
+	ListArticle             []*ArticleIdAndTitle       `description:"活动关联的文章"`
+}
+type ListArticleActivity struct {
+	Title   string `description:"文章标题"`
+	ArtleId int    `description:"产业id"`
 }
 }
 
 
 type CygxActivityResp struct {
 type CygxActivityResp struct {

+ 6 - 0
models/article.go

@@ -163,6 +163,7 @@ type ArticleDetail struct {
 	ArticleTypeId           int    `description:"文章类型ID"`
 	ArticleTypeId           int    `description:"文章类型ID"`
 	IsSpecialArticle        bool   `description:"是否属于专项调研报告"`
 	IsSpecialArticle        bool   `description:"是否属于专项调研报告"`
 	Annotation              string `description:"核心观点"`
 	Annotation              string `description:"核心观点"`
+	IsShowFollowButton      bool   `description:"是否展示关注取关按钮"`
 }
 }
 
 
 type ArticleDetailFileLink struct {
 type ArticleDetailFileLink struct {
@@ -450,6 +451,11 @@ type ArticleId struct {
 	ArticleId int `description:"文章id"`
 	ArticleId int `description:"文章id"`
 }
 }
 
 
+type ArticleIdAndTitle struct {
+	Title     string `description:"标题"`
+	ArticleId int    `description:"文章id"`
+}
+
 // 获取自定义分类的文章ID
 // 获取自定义分类的文章ID
 func GetCustomArticleId() (item []*ArticleId, err error) {
 func GetCustomArticleId() (item []*ArticleId, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()

+ 27 - 10
models/industry_fllow.go

@@ -24,14 +24,20 @@ type CygxIndustryFllowRep struct {
 	IndustrialManagementId int `description:"产业D"`
 	IndustrialManagementId int `description:"产业D"`
 }
 }
 
 
-//添加
+type IndustryFllowArryReq struct {
+	SourceId int    `description:"资源ID"`
+	Source   string `description:"资源类型 报告 :article 、活动 :activity"`
+	DoType   string `description:"操作方式 关注 :add 、取消关注 :cancel"`
+}
+
+// 添加
 func AddCygxIndustryFllow(item *CygxIndustryFllow) (lastId int64, err error) {
 func AddCygxIndustryFllow(item *CygxIndustryFllow) (lastId int64, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	lastId, err = o.Insert(item)
 	lastId, err = o.Insert(item)
 	return
 	return
 }
 }
 
 
-//批量添加
+// 批量添加
 func AddCygxIndustryFllowMulti(items []*CygxIndustryFllow) (err error) {
 func AddCygxIndustryFllowMulti(items []*CygxIndustryFllow) (err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	if len(items) > 0 {
 	if len(items) > 0 {
@@ -53,21 +59,32 @@ func RemoveCygxIndustryFllow(userId, industrialManagementId int) (err error) {
 	return
 	return
 }
 }
 
 
-//获取数量
+// RemoveCygxIndustryFllowArry 多个产业同时取消关注
+func RemoveCygxIndustryFllowArry(userId int, condition string, pars []interface{}) (err error) {
+	o := orm.NewOrm()
+	if condition == "" {
+		return
+	}
+	sql := `DELETE FROM cygx_industry_fllow WHERE user_id=?  ` + condition
+	_, err = o.Raw(sql, userId, pars).Exec()
+	return
+}
+
+// 获取数量
 func GetCountCygxIndustryFllow(userId, industrialManagementId int, condition string) (count int, err error) {
 func GetCountCygxIndustryFllow(userId, industrialManagementId int, condition string) (count int, err error) {
 	sql := `SELECT COUNT(1) AS count FROM cygx_industry_fllow WHERE user_id=? AND industrial_management_id=? ` + condition
 	sql := `SELECT COUNT(1) AS count FROM cygx_industry_fllow WHERE user_id=? AND industrial_management_id=? ` + condition
 	err = orm.NewOrm().Raw(sql, userId, industrialManagementId).QueryRow(&count)
 	err = orm.NewOrm().Raw(sql, userId, industrialManagementId).QueryRow(&count)
 	return
 	return
 }
 }
 
 
-//获取数量
+// 获取数量
 func GetCountCygxIndustryFllowByUid(userId int) (count int, err error) {
 func GetCountCygxIndustryFllowByUid(userId int) (count int, err error) {
 	sql := `SELECT COUNT(1) AS count FROM cygx_industry_fllow WHERE user_id=? `
 	sql := `SELECT COUNT(1) AS count FROM cygx_industry_fllow WHERE user_id=? `
 	err = orm.NewOrm().Raw(sql, userId).QueryRow(&count)
 	err = orm.NewOrm().Raw(sql, userId).QueryRow(&count)
 	return
 	return
 }
 }
 
 
-//获取列表信息根据手机号分组
+// 获取列表信息根据手机号分组
 func GetCygxIndustryFllowList(condition string) (items []*CygxIndustryFllow, err error) {
 func GetCygxIndustryFllowList(condition string) (items []*CygxIndustryFllow, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	sql := `SELECT * FROM cygx_industry_fllow  WHERE 1 =1   ` + condition + `  GROUP BY user_id  `
 	sql := `SELECT * FROM cygx_industry_fllow  WHERE 1 =1   ` + condition + `  GROUP BY user_id  `
@@ -75,7 +92,7 @@ func GetCygxIndustryFllowList(condition string) (items []*CygxIndustryFllow, err
 	return
 	return
 }
 }
 
 
-//修改用户关注的相关信息
+// 修改用户关注的相关信息
 func UpdateCygxIndustryFllow(wxUser *WxUserItem) (err error) {
 func UpdateCygxIndustryFllow(wxUser *WxUserItem) (err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	var sql string
 	var sql string
@@ -89,7 +106,7 @@ func UpdateCygxIndustryFllow(wxUser *WxUserItem) (err error) {
 	return
 	return
 }
 }
 
 
-//获取用户关注的产业列表
+// 获取用户关注的产业列表
 func GetUserFllowIndustrialList(userId int) (items []*CygxIndustryFllow, err error) {
 func GetUserFllowIndustrialList(userId int) (items []*CygxIndustryFllow, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	sql := `SELECT
 	sql := `SELECT
@@ -112,7 +129,7 @@ type CygxIndustryFllowCountRep struct {
 	Num                    int `description:"数量"`
 	Num                    int `description:"数量"`
 }
 }
 
 
-//获取产业被关注的数量
+// 获取产业被关注的数量
 func GetUserFllowIndustrialCountList() (items []*CygxIndustryFllowCountRep, err error) {
 func GetUserFllowIndustrialCountList() (items []*CygxIndustryFllowCountRep, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	sql := `SELECT
 	sql := `SELECT
@@ -133,7 +150,7 @@ func GetUserFllowIndustrialCountList() (items []*CygxIndustryFllowCountRep, err
 	return
 	return
 }
 }
 
 
-//GetUserFllowIndustrialListByUserIdAndIndustrial 通过用户ID 跟产业ID获取用户关注的产业列表
+// GetUserFllowIndustrialListByUserIdAndIndustrial 通过用户ID 跟产业ID获取用户关注的产业列表
 func GetUserFllowIndustrialListByUserIdAndIndustrial(userIds, industrials string) (items []*CygxIndustryFllow, err error) {
 func GetUserFllowIndustrialListByUserIdAndIndustrial(userIds, industrials string) (items []*CygxIndustryFllow, err error) {
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	sql := `SELECT * FROM cygx_industry_fllow 
 	sql := `SELECT * FROM cygx_industry_fllow 
@@ -144,7 +161,7 @@ func GetUserFllowIndustrialListByUserIdAndIndustrial(userIds, industrials string
 	return
 	return
 }
 }
 
 
-//获取某个用户关注某个行业下的产业数量
+// 获取某个用户关注某个行业下的产业数量
 func GetCountCygxIndustryFllowByUidAndChartPermissionId(userId, ChartPermissionId int) (count int, err error) {
 func GetCountCygxIndustryFllowByUidAndChartPermissionId(userId, ChartPermissionId int) (count int, err error) {
 	sql := `SELECT
 	sql := `SELECT
 			COUNT( 1 ) AS count 
 			COUNT( 1 ) AS count 

+ 15 - 6
routers/commentsRouter.go

@@ -108,8 +108,8 @@ func init() {
 
 
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"],
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"],
         beego.ControllerComments{
         beego.ControllerComments{
-            Method: "ActivityList",
-            Router: `/list`,
+            Method: "ActivityListNew",
+            Router: `/listNew`,
             AllowHTTPMethods: []string{"get"},
             AllowHTTPMethods: []string{"get"},
             MethodParams: param.Make(),
             MethodParams: param.Make(),
             Filters: nil,
             Filters: nil,
@@ -117,8 +117,8 @@ func init() {
 
 
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"],
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"],
         beego.ControllerComments{
         beego.ControllerComments{
-            Method: "ActivityListNew",
-            Router: `/listNew`,
+            Method: "ActivityListSearch",
+            Router: `/listSearch`,
             AllowHTTPMethods: []string{"get"},
             AllowHTTPMethods: []string{"get"},
             MethodParams: param.Make(),
             MethodParams: param.Make(),
             Filters: nil,
             Filters: nil,
@@ -126,8 +126,8 @@ func init() {
 
 
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"],
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:ActivityCoAntroller"],
         beego.ControllerComments{
         beego.ControllerComments{
-            Method: "ActivityListSearch",
-            Router: `/listSearch`,
+            Method: "ActivityList",
+            Router: `/list_del_test`,
             AllowHTTPMethods: []string{"get"},
             AllowHTTPMethods: []string{"get"},
             MethodParams: param.Make(),
             MethodParams: param.Make(),
             Filters: nil,
             Filters: nil,
@@ -709,6 +709,15 @@ func init() {
             Filters: nil,
             Filters: nil,
             Params: nil})
             Params: nil})
 
 
+    beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:IndustryController"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:IndustryController"],
+        beego.ControllerComments{
+            Method: "Fllow",
+            Router: `/fllow`,
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:MicroRoadShowController"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:MicroRoadShowController"],
     beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:MicroRoadShowController"] = append(beego.GlobalControllerRouter["hongze/hongze_cygx/controllers:MicroRoadShowController"],
         beego.ControllerComments{
         beego.ControllerComments{
             Method: "Collect",
             Method: "Collect",

+ 5 - 0
routers/router.go

@@ -134,6 +134,11 @@ func init() {
 				&controllers.ActivitySpecialCoAntroller{},
 				&controllers.ActivitySpecialCoAntroller{},
 			),
 			),
 		),
 		),
+		web.NSNamespace("/industry",
+			web.NSInclude(
+				&controllers.IndustryController{},
+			),
+		),
 	)
 	)
 	web.AddNamespace(ns)
 	web.AddNamespace(ns)
 }
 }

+ 45 - 0
services/activity.go

@@ -1828,3 +1828,48 @@ func ActivityVideoUserRmind(user *models.WxUserItem, activityId, fileType int) (
 	}
 	}
 	return
 	return
 }
 }
+
+// 解析活动填写的报告链接
+func GetActivityReportLinkToArticleList(item *models.ActivityDetail) (items []*models.ArticleIdAndTitle, err error) {
+	reportLink := item.ReportLink
+	//处理活动的
+	var articleIds []int
+	var articleList []string
+	if strings.Contains(reportLink, ";") {
+		articleList = strings.Split(reportLink, ";")
+	} else {
+		articleList = strings.Split(reportLink, ";")
+	}
+	for _, v := range articleList {
+		linkList := strings.Split(v, "/")
+		if linkList[len(linkList)-1] != "" {
+			linkArticleId, _ := strconv.Atoi(linkList[len(linkList)-1])
+			articleIds = append(articleIds, linkArticleId)
+		}
+	}
+
+	lenarticleIds := len(articleIds)
+	if lenarticleIds == 0 {
+		return
+	}
+	var condition string
+	var pars []interface{}
+	pars = make([]interface{}, 0)
+	condition = ` AND a.article_id IN (` + utils.GetOrmInReplace(lenarticleIds) + `)`
+	pars = append(pars, articleIds)
+
+	listArticle, e := models.GetHomeList(condition, pars, 0, len(articleIds))
+	if e != nil {
+		err = errors.New("GetResourceDataList, Err: " + e.Error())
+		return
+	}
+	if len(listArticle) > 0 {
+		for _, v := range listArticle {
+			artItem := new(models.ArticleIdAndTitle)
+			artItem.ArticleId = v.ArticleId
+			artItem.Title = v.Title
+			items = append(items, artItem)
+		}
+	}
+	return
+}