feat(product): 模糊查询产品编码

- 将产品编码的精确查询改为模糊查询
- 提高了产品信息查询的灵活性和准确性
master
chenhao 2025-06-06 09:28:35 +08:00
parent 1bf9963031
commit 32f2d11dbe
1 changed files with 2 additions and 2 deletions

View File

@ -27,9 +27,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectProductInfoVo"/>
<where>
and status = 0
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
<if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="model != null and model != ''"> and model like concat('%', #{model}, '%')</if>
<if test="type != null and type != ''"> and find_in_set(type , #{type})</if>
</where>
</select>