You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-spms-java/src/main/resources/mybatis/mapper/system/ClassifyCodeDao.xml

33 lines
1.1 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.system.ClassifyCodeDao">
<select id="filteClassifyCode" parameterType="com.glxp.api.req.system.FilterClassifyCodeRequest"
resultType="com.glxp.api.entity.system.ClassifyCodeEntity">
SELECT * FROM product_classify
<where>
<if test="code != null and code != ''">
and code = #{code}
</if>
<if test="name != null and name != ''">
and `name` = #{name}
</if>
<if test="key != null and key != ''">
and
( `name` like concat('%',#{key},'%') or `code` like concat('%',#{key},'%'))
</if>
<if test="inFilterList!=null">
and `code` in
<foreach collection="inFilterList" item="item" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>