|
@@ -71,41 +71,43 @@ type CygxYanxuanSpecialResp struct {
|
|
|
}
|
|
|
|
|
|
type CygxYanxuanSpecialCenterResp struct {
|
|
|
- Id int `orm:"column(id);pk"`
|
|
|
- UserId int // 用户ID
|
|
|
- CreateTime string // 创建时间
|
|
|
- ModifyTime string // 修改时间
|
|
|
- PublishTime string // 提审过审或驳回时间
|
|
|
- Content string // 内容
|
|
|
- Tags string // 标签
|
|
|
- Status int // 1:未发布,2:审核中 3:已发布 4:驳回
|
|
|
- ImgUrl string // 图片链接
|
|
|
- DocUrl string // 文档链接
|
|
|
- SpecialName string // 专栏名称
|
|
|
- Introduction string // 介绍
|
|
|
- Label string // 标签
|
|
|
- NickName string // 昵称
|
|
|
- RealName string // 姓名
|
|
|
- Mobile string // 手机号
|
|
|
- HeadImg string // 头像
|
|
|
- BgImg string // 背景图
|
|
|
- Reason string // 理由
|
|
|
- Title string // 标题
|
|
|
- Type int // 类型1:笔记,2:观点
|
|
|
- CollectNum int
|
|
|
- MyCollectNum int
|
|
|
- IsCollect int
|
|
|
- CompanyTags string
|
|
|
- IndustryTags string
|
|
|
- ContentHasImg int //正文是否包含图片 1包含 0不包含
|
|
|
- ContentHasStyle bool //正文是否包含格式
|
|
|
- Docs []Doc
|
|
|
- Annotation string `description:"核心观点"`
|
|
|
- Source string `description:"来源"`
|
|
|
- Pv int `description:"Pv"`
|
|
|
- Uv int `description:"Uv"`
|
|
|
- PublishDate string // 提审过审或驳回时间 string `description:"核心观点"`
|
|
|
- BodyHighlight []string `description:"搜索高亮展示结果"`
|
|
|
+ Id int `orm:"column(id);pk"`
|
|
|
+ UserId int // 用户ID
|
|
|
+ CreateTime string // 创建时间
|
|
|
+ ModifyTime string // 修改时间
|
|
|
+ PublishTime string // 提审过审或驳回时间
|
|
|
+ Content string // 内容
|
|
|
+ Tags string // 标签
|
|
|
+ Status int // 1:未发布,2:审核中 3:已发布 4:驳回
|
|
|
+ ImgUrl string // 图片链接
|
|
|
+ DocUrl string // 文档链接
|
|
|
+ SpecialName string // 专栏名称
|
|
|
+ Introduction string // 介绍
|
|
|
+ Label string // 标签
|
|
|
+ NickName string // 昵称
|
|
|
+ RealName string // 姓名
|
|
|
+ Mobile string // 手机号
|
|
|
+ HeadImg string // 头像
|
|
|
+ BgImg string // 背景图
|
|
|
+ Reason string // 理由
|
|
|
+ Title string // 标题
|
|
|
+ Type int // 类型1:笔记,2:观点
|
|
|
+ CollectNum int
|
|
|
+ MyCollectNum int
|
|
|
+ IsCollect int
|
|
|
+ CompanyTags string
|
|
|
+ IndustryTags string
|
|
|
+ ContentHasImg int //正文是否包含图片 1包含 0不包含
|
|
|
+ ContentHasStyle bool //正文是否包含格式
|
|
|
+ Docs []Doc
|
|
|
+ Annotation string `description:"核心观点"`
|
|
|
+ Source string `description:"来源"`
|
|
|
+ Pv int `description:"Pv"`
|
|
|
+ Uv int `description:"Uv"`
|
|
|
+ PublishDate string // 提审过审或驳回时间 string `description:"核心观点"`
|
|
|
+ BodyHighlight []string `description:"搜索高亮展示结果"`
|
|
|
+ LikeCount int `description:"点赞数量"`
|
|
|
+ LikeCountHistory int `description:"一个小时前的点赞数量"`
|
|
|
}
|
|
|
|
|
|
type Doc struct {
|
|
@@ -366,3 +368,12 @@ func UpdateYanxuanSpecialMomentsImg(momentsImg string, id int) (err error) {
|
|
|
_, err = o.Raw(sql, momentsImg, id).Exec()
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// 更新历史点赞数量
|
|
|
+func UpdateYanxuanSpecialLikeCountHistory() (err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := ``
|
|
|
+ sql = `UPDATE cygx_yanxuan_special SET like_count_history=like_count WHERE like_count > like_count_history `
|
|
|
+ _, err = o.Raw(sql).Exec()
|
|
|
+ return
|
|
|
+}
|