ziwen 1 year ago
parent
commit
26ffca3d55
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/cygx_yanxuan_special_user.go

+ 1 - 1
models/cygx_yanxuan_special_user.go

@@ -69,7 +69,7 @@ func GetYanxuanSpecialAuthor(reqUserId, sysUserId int) (item *CygxYanxuanSpecial
 	a.*,c.company_name,
 	( 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  ) AS special_article_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,
 	( SELECT count( 1 ) FROM cygx_yanxuan_special_follow AS cf  WHERE cf.follow_user_id =? AND cf.user_id = ?  ) AS is_follow 
 FROM
 	cygx_yanxuan_special_author as a