Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
gong
2025-12-11 14:31:35 +08:00

View File

@@ -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>