mobilebroken/nflg-mobilebroken-repository/src/main/resources/mapper/GongfuDevicePartMapper.xml

42 lines
1.5 KiB
XML
Raw Normal View History

2025-11-18 18:03:20 +08:00
<?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>-->
2025-11-18 18:03:20 +08:00
<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>
<include refid="whr">
</include>
</where>
2025-11-18 18:03:20 +08:00
</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>
<if test="partNo!=null and partNo!=''">
and part_no=#{partNo}
</if>
<if test="partName!=null and partName!=''">
and part_name like concat('%', #{partName},'%')
</if>
</where>
2025-11-18 18:03:20 +08:00
</select>
</mapper>