|
@@ -84,7 +84,7 @@ func GetYanxuanSpecialAuthorBySpecialColumnId(specialColumnId, sysUserId int) (i
|
|
|
o := orm.NewOrm()
|
|
|
sql := ``
|
|
|
sql = `SELECT
|
|
|
- a.*,c.company_name,
|
|
|
+ a.*,
|
|
|
( SELECT count( 1 ) FROM cygx_yanxuan_special_collect AS ac INNER JOIN cygx_yanxuan_special as cs ON ac.yanxuan_special_id = cs.id WHERE cs.user_id = a.user_id ) AS collect_num,
|
|
|
( SELECT count( 1 ) FROM cygx_yanxuan_special_follow AS cf WHERE cf.follow_user_id = a.user_id ) AS follow_num,
|
|
|
( SELECT count( 1 ) FROM cygx_yanxuan_special AS ca WHERE ca.user_id = a.user_id AND ca.status = 3 ) AS special_article_num,
|
|
@@ -92,7 +92,7 @@ func GetYanxuanSpecialAuthorBySpecialColumnId(specialColumnId, sysUserId int) (i
|
|
|
WHERE cf.user_id = ? AND ca.id = ? ) AS is_follow
|
|
|
FROM
|
|
|
cygx_yanxuan_special_author as a
|
|
|
- LEFT JOIN company AS c ON c.company_id = u.company_id WHERE a.id=? `
|
|
|
+ WHERE a.id=? `
|
|
|
err = o.Raw(sql, sysUserId, specialColumnId, specialColumnId).QueryRow(&item)
|
|
|
return
|
|
|
}
|