|
@@ -17,12 +17,13 @@ type ArticleTitleVo struct {
|
|
|
Id int64 `json:"id"` // 11 0 注释:id
|
|
Id int64 `json:"id"` // 11 0 注释:id
|
|
|
Image string `xorm:"image" json:"image"` // 255 0 注释:文章名称
|
|
Image string `xorm:"image" json:"image"` // 255 0 注释:文章名称
|
|
|
ArticleTitle string `xorm:"article_title" json:"articleTitle"` // 255 0 注释:文章名称
|
|
ArticleTitle string `xorm:"article_title" json:"articleTitle"` // 255 0 注释:文章名称
|
|
|
- ArticleDesc string `xorm:"article_desc" json:"articleDesc"` // 255 0 注释:文章简介
|
|
|
|
|
|
|
+ ArticleDesc string `xorm:"article_desc" json:"articleDesc"` // 255 0 注释:文章简介 1
|
|
|
State string `xorm:"state" json:"state"` // 255 0 注释:状态
|
|
State string `xorm:"state" json:"state"` // 255 0 注释:状态
|
|
|
ArticleTagIds string `xorm:"article_tag_ids" json:"articleTagIds"` // 255 0 注释:文章标签
|
|
ArticleTagIds string `xorm:"article_tag_ids" json:"articleTagIds"` // 255 0 注释:文章标签
|
|
|
PublishTime time.Time `xorm:"publish_time" json:"publishTime"` // 0 0 注释:发表时间
|
|
PublishTime time.Time `xorm:"publish_time" json:"publishTime"` // 0 0 注释:发表时间
|
|
|
EyeFill int64 `xorm:"eye_fill" json:"eyeFill"` // 11 0 注释:浏览量
|
|
EyeFill int64 `xorm:"eye_fill" json:"eyeFill"` // 11 0 注释:浏览量
|
|
|
LikeCount int64 `xorm:"like_count" json:"likeCount"` // 255 0 注释:点赞量
|
|
LikeCount int64 `xorm:"like_count" json:"likeCount"` // 255 0 注释:点赞量
|
|
|
|
|
+ CreateBy string `xorm:"create_by" json:"createBy"`
|
|
|
CreateTime time.Time `xorm:"create_time" json:"createTime"`
|
|
CreateTime time.Time `xorm:"create_time" json:"createTime"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -67,7 +68,7 @@ func GetArticleListByTopicId(topicId int64, pageNum, pageSize int) (domain.Artic
|
|
|
}
|
|
}
|
|
|
var list = make([]ArticleTitleVo, 0)
|
|
var list = make([]ArticleTitleVo, 0)
|
|
|
count, _ := configs.Engine.Table("article").
|
|
count, _ := configs.Engine.Table("article").
|
|
|
- Select("id, image, article_title, article_desc, article_desc, article_tag_ids, state, publish_time, eye_fill, like_count, create_time, article_tag_ids").
|
|
|
|
|
|
|
+ Select("id, image, article_title, article_desc, article_desc, article_tag_ids, state, publish_time, eye_fill, like_count, create_time,create_by, article_tag_ids").
|
|
|
Where("article_topic_id = ? and state = '1'", topic.Id).
|
|
Where("article_topic_id = ? and state = '1'", topic.Id).
|
|
|
Limit(pageSize, (pageNum-1)*pageSize).Desc("create_time").FindAndCount(&list)
|
|
Limit(pageSize, (pageNum-1)*pageSize).Desc("create_time").FindAndCount(&list)
|
|
|
var VoList = make([]interface{}, 0)
|
|
var VoList = make([]interface{}, 0)
|