(select count(1) from (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0 UNION ALL
- SELECT t.id FROM store_comment t INNER JOIN (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0) d ON t.business_id = d.id and business_type = 6 and delete_flag = 0) a ) as commentCount
+ SELECT t.id FROM store_comment t INNER JOIN (SELECT id FROM store_comment c where c.business_id = g.id and c.business_type = 7 and c.delete_flag = 0) d ON t.business_id = d.id and business_type = 6 and delete_flag = 0) a ) as commentCount,
case when llr.id is null then '0' else '1' end likeStatus,
case when lc.id is null then '0' else '1' end collectStatus
from second_goods g inner join life_user lu on g.user_id = lu.id and lu.delete_flag = 0