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.
36 lines
1.4 KiB
XML
36 lines
1.4 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 product_classify.*, if(tmpc.materialCode is null,0,1) as requireScanCode
|
|
FROM product_classify
|
|
LEFT JOIN thr_medical_product_category tmpc ON tmpc.materialCode = product_classify.code
|
|
<where>
|
|
<if test="code != null and code != ''">
|
|
and product_classify.code = #{code}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
and product_classify.`name` = #{name}
|
|
</if>
|
|
|
|
<if test="key != null and key != ''">
|
|
and
|
|
( product_classify.`name` like concat('%',#{key},'%') or product_classify.`code` like concat('%',#{key},'%'))
|
|
</if>
|
|
|
|
|
|
<if test="inFilterList!=null">
|
|
and product_classify.`code` in
|
|
<foreach collection="inFilterList" item="item" index="index" separator="," open="(" close=")">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
|
|
</where>
|
|
</select>
|
|
</mapper>
|