|
@@ -129,6 +129,26 @@ JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func GetYanxuanSpecialListHome(userId int, condition string, pars []interface{}, startSize, pageSize int) (items []*CygxYanxuanSpecialItem, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := ``
|
|
|
+ sql = `SELECT a.*,b.id AS special_column_id,b.bg_img,b.head_img,b.introduction,b.label,b.mobile,b.nick_name,b.real_name,b.special_name,b.status AS author_status
|
|
|
+FROM cygx_yanxuan_special AS a
|
|
|
+JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
|
|
|
+ WHERE 1=1 `
|
|
|
+ if condition != "" {
|
|
|
+ sql += condition
|
|
|
+ }
|
|
|
+ sql += `ORDER BY a.publish_time DESC `
|
|
|
+ if startSize+pageSize > 0 {
|
|
|
+ sql += ` LIMIT ?,? `
|
|
|
+ _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
|
|
|
+ } else {
|
|
|
+ _, err = o.Raw(sql, pars).QueryRows(&items)
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
type EnableCygxYanxuanSpecialReq struct {
|
|
|
Id int // 文章id
|
|
|
Status int // 1通过2驳回
|