商品列表问题
This commit is contained in:
@@ -8,13 +8,15 @@
|
||||
select goods.*, count(record.id) as boughtCount
|
||||
from mk_points_goods goods
|
||||
left join mk_points_goods_record record
|
||||
on record.points_goods_id = goods.id and record.user_id = #{userId} and record.status != '已退款' and record.is_del = 0
|
||||
on record.points_goods_id = goods.id and record.user_id = #{userId} and record.status != '已退款' and
|
||||
record.is_del = 0
|
||||
where goods.shop_id = #{shopId}
|
||||
and goods.del_flag = 0
|
||||
and goods.status = 1
|
||||
<if test="goodsCategory != null and goodsCategory !=''">
|
||||
and goods.goods_category = #{goodsCategory}
|
||||
</if>
|
||||
GROUP BY goods.id
|
||||
HAVING goods.id IS NOT NULL
|
||||
order by goods.sort desc, goods.id desc
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user