|
@@ -8,13 +8,16 @@ import (
|
|
|
type CygxArticleComment struct {
|
|
|
Id int `orm:"column(id);pk" description:"留言id"`
|
|
|
UserId int `description:"用户id"`
|
|
|
- ArticleId int `description:"活动id"`
|
|
|
+ ArticleId int `description:"文章id"`
|
|
|
+ ActivityId int `description:"活动id"`
|
|
|
+ VideoId int `description:"视频id"`
|
|
|
CreateTime time.Time `description:"创建时间"`
|
|
|
Mobile string `description:"手机号"`
|
|
|
Email string `description:"邮箱"`
|
|
|
CompanyId int `description:"公司id"`
|
|
|
CompanyName string `description:"公司名称"`
|
|
|
Content string `description:"内容"`
|
|
|
+ Title string `description:"标题"`
|
|
|
}
|
|
|
|
|
|
|
|
@@ -30,3 +33,20 @@ type AddCygxArticleCommentReq struct {
|
|
|
ArticleId int `description:"文章id"`
|
|
|
Content string `description:"内容"`
|
|
|
}
|
|
|
+
|
|
|
+//我的留言列表
|
|
|
+func GetCommentList(userId int) (items []*CygxArticleComment, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `SELECT
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ cygx_article_comment AS c
|
|
|
+ WHERE
|
|
|
+ user_id = ? ORDER BY c.create_time DESC`
|
|
|
+ _, err = o.Raw(sql, userId).QueryRows(&items)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+type CygxCommentListResp struct {
|
|
|
+ List []*CygxArticleComment
|
|
|
+}
|