|
@@ -6,19 +6,19 @@ import (
|
|
|
)
|
|
|
|
|
|
type CygxYanxuanSpecial struct {
|
|
|
- Id int `orm:"column(id);pk"`
|
|
|
- UserId int
|
|
|
- CreateTime time.Time
|
|
|
- ModifyTime time.Time
|
|
|
- PublishTime time.Time
|
|
|
- Content string
|
|
|
- Tags string
|
|
|
- Status int
|
|
|
- ImgUrl string
|
|
|
- DocUrl string
|
|
|
- Reason string
|
|
|
- Title string
|
|
|
- Type int
|
|
|
+ Id int `orm:"column(id);pk"`
|
|
|
+ UserId int
|
|
|
+ CreateTime time.Time
|
|
|
+ ModifyTime time.Time
|
|
|
+ PublishTime time.Time
|
|
|
+ Content string
|
|
|
+ Tags string
|
|
|
+ Status int
|
|
|
+ ImgUrl string
|
|
|
+ DocUrl string
|
|
|
+ Reason string
|
|
|
+ Title string
|
|
|
+ Type int
|
|
|
CompanyTags string
|
|
|
IndustryTags string
|
|
|
}
|
|
@@ -56,11 +56,43 @@ type CygxYanxuanSpecialItem struct {
|
|
|
|
|
|
type CygxYanxuanSpecialResp struct {
|
|
|
CygxYanxuanSpecialItem
|
|
|
- Docs []Doc
|
|
|
+ Docs []Doc
|
|
|
CompanyTags []string
|
|
|
IndustryTags []string
|
|
|
}
|
|
|
|
|
|
+type CygxYanxuanSpecialCenterResp struct {
|
|
|
+ Id int `orm:"column(id);pk"`
|
|
|
+ UserId int
|
|
|
+ CreateTime string
|
|
|
+ ModifyTime string
|
|
|
+ PublishTime string
|
|
|
+ Content string
|
|
|
+ Tags string
|
|
|
+ Status int
|
|
|
+ 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
|
|
|
+ CollectNum int
|
|
|
+ MyCollectNum int
|
|
|
+ IsCollect int
|
|
|
+ CompanyTags string
|
|
|
+ IndustryTags string
|
|
|
+ ContentHasImg int
|
|
|
+ ContentHasStyle bool
|
|
|
+ Docs []Doc
|
|
|
+}
|
|
|
+
|
|
|
type Doc struct {
|
|
|
DocName string
|
|
|
DocSuffix string
|
|
@@ -68,7 +100,7 @@ type Doc struct {
|
|
|
DocIcon string
|
|
|
}
|
|
|
|
|
|
-func GetYanxuanSpecialList(userId int, condition string, pars []interface{}) (items []*CygxYanxuanSpecialItem, err error) {
|
|
|
+func GetYanxuanSpecialList(userId int, condition string, pars []interface{}) (items []*CygxYanxuanSpecialCenterResp, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ``
|
|
|
sql = `SELECT a.*,b.bg_img,b.head_img,b.introduction,b.label,b.mobile,b.nick_name,b.real_name,b.special_name,
|
|
@@ -100,7 +132,7 @@ func EnableYanxuanSpecial(id, status int, reason string) (err error) {
|
|
|
}
|
|
|
|
|
|
type SpecialListResp struct {
|
|
|
- List []*CygxYanxuanSpecialItem
|
|
|
+ List []*CygxYanxuanSpecialCenterResp
|
|
|
IsAuthor bool
|
|
|
}
|
|
|
|
|
@@ -119,14 +151,14 @@ JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
|
|
|
}
|
|
|
|
|
|
type CygxYanxuanSpecialReq struct {
|
|
|
- Id int `orm:"column(id);pk"`
|
|
|
- Content string
|
|
|
- Tags string
|
|
|
- DoType int
|
|
|
- ImgUrl string
|
|
|
- DocUrl string
|
|
|
- Title string
|
|
|
- Type int
|
|
|
+ Id int `orm:"column(id);pk"`
|
|
|
+ Content string
|
|
|
+ Tags string
|
|
|
+ DoType int
|
|
|
+ ImgUrl string
|
|
|
+ DocUrl string
|
|
|
+ Title string
|
|
|
+ Type int
|
|
|
IndustryTags string
|
|
|
CompanyTags string
|
|
|
}
|