mobilebroken/nflg-mobilebroken-repository/src/main/resources/mapper/QuotationModelRatioAgentMap...

27 lines
1.1 KiB
XML
Raw Normal View History

<?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.nflg.mobilebroken.repository.mapper.QuotationModelRatioAgentMapper">
<select id="search" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductModelSimpleVO">
SELECT pm.batch_number,pm.no
FROM product_model pm
LEFT JOIN product_type pt on pm.type_number=pt.batch_number AND pt.state=1
LEFT JOIN product_series ps ON pm.series_number=ps.batch_number AND ps.state=1
LEFT JOIN dictionary_item di ON di.id=pm.module_id
WHERE pm.state=1
<if test="request.moduleId!=null">
AND pm.module_id=#{request.moduleId}
</if>
<if test="request.seriesNumber!=null">
AND pm.series_number=#{request.seriesNumber}
</if>
<if test="request.typeNumber!=null">
AND pm.type_number=#{request.typeNumber}
</if>
<if test="request.no!=null and request.no!=''">
AND pm.`no` like concat('%', #{request.no}, '%')
</if>
order by pm.id
</select>
</mapper>