StockAdjustReasonMapper.xml
1.67 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
<?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.lframework.xingyun.sc.mappers.StockAdjustReasonMapper">
<sql id="StockAdjustReasonDto_sql">
SELECT
tb.*
FROM tbl_stock_adjust_reason AS tb
</sql>
<select id="query" resultType="com.lframework.xingyun.sc.entity.StockAdjustReason">
<include refid="StockAdjustReasonDto_sql"/>
<where>
<if test="vo != null">
<if test="vo.code != null and vo.code != ''">
AND tb.code = #{vo.code}
</if>
<if test="vo.name != null and vo.name != ''">
AND tb.name LIKE CONCAT('%', #{vo.name}, '%')
</if>
<if test="vo.available != null">
AND tb.available = #{vo.available}
</if>
</if>
</where>
ORDER BY tb.code
</select>
<select id="selector" resultType="com.lframework.xingyun.sc.entity.StockAdjustReason">
<include refid="StockAdjustReasonDto_sql"/>
<where>
<if test="vo != null">
<if test="vo.code != null and vo.code != ''">
AND tb.code = #{vo.code}
</if>
<if test="vo.name != null and vo.name != ''">
AND tb.name LIKE CONCAT('%', #{vo.name}, '%')
</if>
<if test="vo.available != null">
AND tb.available = #{vo.available}
</if>
</if>
</where>
ORDER BY tb.code
</select>
</mapper>