40 lines
1.4 KiB
XML
40 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.nflg.mobilebroken.repository.mapper.GongfuDevicePartMapper">
|
||
|
|
|
||
|
|
<sql id="whr">
|
||
|
|
<if test="query.partNo!=null and query.partNo!=''">
|
||
|
|
and part_no=#{query.partNo}
|
||
|
|
</if>
|
||
|
|
<if test="query.partName!=null and query.partName!=''">
|
||
|
|
and part_name like concat('%', #{query.partName},'%')
|
||
|
|
</if>
|
||
|
|
<if test="query.typeAttr!=null and query.typeAttr!=''">
|
||
|
|
and type_attr=#{query.typeAttr}
|
||
|
|
</if>
|
||
|
|
<if test="query.enable!=null">
|
||
|
|
and enable=#{query.enable}
|
||
|
|
</if>
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="getListByPage" resultType="com.nflg.mobilebroken.repository.entity.GongfuDevicePart">
|
||
|
|
select * from gongfu_device_part where 1=1
|
||
|
|
<include refid="whr">
|
||
|
|
</include>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="exportPart" resultType="com.nflg.mobilebroken.common.pojo.dto.ExportPartDTO">
|
||
|
|
select a.part_name,a.type_attr,b.language_name,b.language_value
|
||
|
|
from gongfu_device_part a join gongfu_device_part_language_data b on a.id=b.source_id
|
||
|
|
where 1=1
|
||
|
|
<if test="partNo!=null and partNo!=''">
|
||
|
|
and part_no=#{partNo}
|
||
|
|
</if>
|
||
|
|
<if test="partName!=null and partName!=''">
|
||
|
|
and part_name like concat('%', #{partName},'%')
|
||
|
|
</if>
|
||
|
|
|
||
|
|
|
||
|
|
</select>
|
||
|
|
</mapper>
|