1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| <?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.ruoyi.measuringinstrumentledger.mapper.SparePartsRecordMapper">
|
| <select id="listPage" resultType="com.ruoyi.measuringinstrumentledger.pojo.SparePartsRecord">
| select t1.id,
| t1.spare_parts_id,
| t2.name as sparePartsName,
| t1.direction,
| t1.quantity,
| t1.source_type,
| t1.source_id,
| t1.source_no,
| t1.remark,
| t1.create_user,
| t1.create_time
| from spare_parts_record t1
| left join spare_parts t2 on t2.id = t1.spare_parts_id
| <where>
| <if test="req.sparePartsId != null">
| and t1.spare_parts_id = #{req.sparePartsId}
| </if>
| <if test="req.direction != null">
| and t1.direction = #{req.direction}
| </if>
| <if test="req.sourceType != null">
| and t1.source_type = #{req.sourceType}
| </if>
| </where>
| order by t1.id desc
| </select>
| </mapper>
|
|