|
@@ -13,10 +13,12 @@ type CygxYanxuanSpecial struct {
|
|
|
PublishTime time.Time // 提审过审或驳回时间
|
|
|
Content string // 内容
|
|
|
Tags string // 标签
|
|
|
- Status int // 1:未发布,2:已发布 3:过审 4:驳回
|
|
|
+ Status int // 1:未发布,2:审核中 3:已发布 4:驳回
|
|
|
ImgUrl string // 图片链接
|
|
|
DocUrl string // 文档链接
|
|
|
Reason string // 理由
|
|
|
+ Title string // 标题
|
|
|
+ Type string // 类型1:笔记,2:观点
|
|
|
}
|
|
|
|
|
|
type CygxYanxuanSpecialItem struct {
|
|
@@ -27,7 +29,7 @@ type CygxYanxuanSpecialItem struct {
|
|
|
PublishTime string // 提审过审或驳回时间
|
|
|
Content string // 内容
|
|
|
Tags string // 标签
|
|
|
- Status int // 1:未发布,2:已发布 3:过审 4:驳回
|
|
|
+ Status int // 1:未发布,2:审核中 3:已发布 4:驳回
|
|
|
ImgUrl string // 图片链接
|
|
|
DocUrl string // 文档链接
|
|
|
SpecialName string // 专栏名称
|
|
@@ -39,6 +41,8 @@ type CygxYanxuanSpecialItem struct {
|
|
|
HeadImg string // 头像
|
|
|
BgImg string // 背景图
|
|
|
Reason string // 理由
|
|
|
+ Title string // 标题
|
|
|
+ Type int // 类型1:笔记,2:观点
|
|
|
}
|
|
|
|
|
|
func GetYanxuanSpecialList(condition string, pars []interface{}) (items []*CygxYanxuanSpecialItem, err error) {
|
|
@@ -52,7 +56,7 @@ JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
|
|
|
sql += condition
|
|
|
}
|
|
|
sql += `ORDER BY a.create_time `
|
|
|
- _, err = o.Raw(sql).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql, pars).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -62,10 +66,10 @@ type EnableCygxYanxuanSpecialReq struct {
|
|
|
Reason string //理由
|
|
|
}
|
|
|
|
|
|
-func EnableYanxuanSpecial(id, status int,reason string) (err error) {
|
|
|
+func EnableYanxuanSpecial(id, status int, reason string) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ``
|
|
|
sql = `UPDATE cygx_yanxuan_special SET status=?,reason=?,publish_time=NOW() WHERE id = ? `
|
|
|
_, err = o.Raw(sql, status, reason, id).Exec()
|
|
|
return
|
|
|
-}
|
|
|
+}
|