zouxuan %!s(int64=5) %!d(string=hai) anos
pai
achega
972e4e394c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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>