feat(mall): 商品搜索接口增加筛选条件
- 在商品搜索接口中添加环保等级、防火等级、试用场景等筛选条件 - 更新相关服务和 mapper 方法,支持新增的筛选条件 - 修改 SQL 查询语句,增加相应的 WHERE条件
This commit is contained in:
@@ -75,6 +75,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
or
|
||||
p.prod_code like concat('%',#{prodName} ,'%')
|
||||
</if>
|
||||
<if test="envLevel != null and envLevel != ''">
|
||||
and FIND_IN_SET(p.env_level, #{envLevel}) > 0
|
||||
</if>
|
||||
<if test="fireLevel != null and fireLevel != ''">
|
||||
and FIND_IN_SET(p.fire_level, #{fireLevel}) > 0
|
||||
</if>
|
||||
<if test="trialScenario != null and trialScenario != ''">
|
||||
and FIND_IN_SET(p.trial_scenario, #{trialScenario}) > 0
|
||||
</if>
|
||||
|
||||
<if test="sort == 0">
|
||||
ORDER BY RAND()
|
||||
|
||||
Reference in New Issue
Block a user