筛选不全的bug

This commit is contained in:
litianxiang
2026-05-29 10:06:21 +08:00
parent 65c88c898f
commit 54ad0ac05b

View File

@@ -17,9 +17,11 @@
AND so.buyer_id = #{dto.buyerId}
AND so.status = 1
<if test="dto.categories != null and dto.categories.size() > 0">
<foreach collection="dto.categories" item="cat">
AND JSON_CONTAINS(soi.product_category, #{cat})
AND (
<foreach collection="dto.categories" item="cat" separator=" OR ">
JSON_CONTAINS(soi.product_category, #{cat})
</foreach>
)
</if>
<if test="dto.designFor != null and dto.designFor != '' and dto.designFor != 'all'">
AND l.design_for = #{dto.designFor}
@@ -38,9 +40,11 @@
AND so.buyer_id = #{dto.buyerId}
AND so.status = 1
<if test="dto.categories != null and dto.categories.size() > 0">
<foreach collection="dto.categories" item="cat">
AND JSON_CONTAINS(soi.product_category, #{cat})
AND (
<foreach collection="dto.categories" item="cat" separator=" OR ">
JSON_CONTAINS(soi.product_category, #{cat})
</foreach>
)
</if>
<if test="dto.designFor != null and dto.designFor != '' and dto.designFor != 'all'">
AND l.design_for = #{dto.designFor}