feat(product): 添加商品发布状态过滤条件
在商品查询逻辑中,默认添加已上架商品的筛选条件,确保查询结果仅包含已上架的商品信息。
This commit is contained in:
parent
8fd339c525
commit
ab403a98e1
@ -90,6 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="query.nameLike != null and query.nameLike != ''">
|
<if test="query.nameLike != null and query.nameLike != ''">
|
||||||
AND p.name LIKE CONCAT('%', #{query.nameLike}, '%')
|
AND p.name LIKE CONCAT('%', #{query.nameLike}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.publishStatus != null">
|
||||||
|
AND p.publish_status = #{query.publishStatus}
|
||||||
|
</if>
|
||||||
<if test="query.categoryIds != null and query.categoryIds.size() > 0">
|
<if test="query.categoryIds != null and query.categoryIds.size() > 0">
|
||||||
AND p.category_id IN
|
AND p.category_id IN
|
||||||
<foreach collection="query.categoryIds" item="categoryId" open="(" separator="," close=")">
|
<foreach collection="query.categoryIds" item="categoryId" open="(" separator="," close=")">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user