|
@@ -22,19 +22,20 @@ type CygxYanxuanSpecialAuthor struct {
|
|
}
|
|
}
|
|
|
|
|
|
type CygxYanxuanSpecialAuthorItem struct {
|
|
type CygxYanxuanSpecialAuthorItem struct {
|
|
- Id int `orm:"column(id);pk"`
|
|
+ Id int `orm:"column(id);pk"`
|
|
- UserId int
|
|
+ UserId int
|
|
- SpecialName string
|
|
+ CompanyName string
|
|
- Introduction string
|
|
+ SpecialName string
|
|
- Label string
|
|
+ Introduction string
|
|
- NickName string
|
|
+ Label string
|
|
- RealName string
|
|
+ NickName string
|
|
- Mobile string
|
|
+ RealName string
|
|
|
|
+ Mobile string
|
|
CreateTime string
|
|
CreateTime string
|
|
ModifyTime string
|
|
ModifyTime string
|
|
- HeadImg string
|
|
+ HeadImg string
|
|
- BgImg string
|
|
+ BgImg string
|
|
- Status int
|
|
+ Status int
|
|
}
|
|
}
|
|
|
|
|
|
func AddCygxYanxuanSpecialAuthor(item *CygxYanxuanSpecialAuthor) (lastId int64, err error) {
|
|
func AddCygxYanxuanSpecialAuthor(item *CygxYanxuanSpecialAuthor) (lastId int64, err error) {
|
|
@@ -66,8 +67,12 @@ func EnableYanxuanSpecialAuthor(userId, status int) (err error) {
|
|
func GetYanxuanSpecialAuthorList() (items []*CygxYanxuanSpecialAuthorItem, err error) {
|
|
func GetYanxuanSpecialAuthorList() (items []*CygxYanxuanSpecialAuthorItem, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := ``
|
|
sql := ``
|
|
- sql = `SELECT * FROM cygx_yanxuan_special_author ORDER BY create_time DESC `
|
|
+ sql = `SELECT
|
|
|
|
+ a.*,c.company_name
|
|
|
|
+FROM
|
|
|
|
+ cygx_yanxuan_special_author as a
|
|
|
|
+ INNER JOIN wx_user AS u ON u.user_id = a.user_id
|
|
|
|
+ INNER JOIN company AS c ON c.company_id = u.company_id ORDER BY create_time DESC `
|
|
_, err = o.Raw(sql).QueryRows(&items)
|
|
_, err = o.Raw(sql).QueryRows(&items)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|