zouxuan 5 years ago
parent
commit
972e4e394c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      mec-biz/src/main/resources/config/mybatis/GoodsMapper.xml

+ 4 - 0
mec-biz/src/main/resources/config/mybatis/GoodsMapper.xml

@@ -266,6 +266,10 @@
             <if test="status != null">
                 AND g.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>
+            <if test="search != null and search != ''">
+                AND (g.id_ = #{search} OR g.name_ LIKE CONCAT('%',#{search},'%')
+                OR g.sn_ LIKE CONCAT('%',#{search},'%') OR brand_ LIKE CONCAT('%',#{search},'%'))
+            </if>
         </where>
     </sql>