FundPaymentSupplierMapper.xml
2.28 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
45
46
47
48
49
50
51
52
53
54
55
56
57
<?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.procurement.mappers.fundpayment.FundPaymentSupplierMapper">
<resultMap id="FundPaymentSupplier" type="com.lframework.xingyun.sc.procurement.entity.fundpayment.FundPaymentSupplier">
<id column="id" property="id"/>
<result column="customer_name" property="customerName"/>
<result column="bank_name" property="bankName"/>
<result column="card_no" property="cardNo"/>
<result column="create_by_id" property="createById"/>
<result column="create_by" property="createBy"/>
<result column="update_by_id" property="updateById"/>
<result column="update_by" property="updateBy"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="FundPaymentSupplier_sql">
SELECT
tb.id,
tb.customer_name,
tb.bank_name,
tb.card_no,
tb.create_by_id,
tb.create_by,
tb.update_by_id,
tb.update_by,
tb.create_time,
tb.update_time
FROM fund_payment_supplier AS tb
</sql>
<select id="query" resultMap="FundPaymentSupplier">
<include refid="FundPaymentSupplier_sql"/>
<where>
<if test="vo.customerName != null and vo.customerName != ''">
AND tb.customer_name LIKE CONCAT('%', #{vo.customerName}, '%')
</if>
<if test="vo.bankName != null and vo.bankName != ''">
AND tb.bank_name LIKE CONCAT('%', #{vo.bankName}, '%')
</if>
<if test="vo.cardNo != null and vo.cardNo != ''">
AND REPLACE(tb.card_no, ' ', '') LIKE CONCAT('%', REPLACE(#{vo.cardNo}, ' ', ''), '%')
</if>
</where>
ORDER BY tb.customer_name ASC, tb.create_time DESC
</select>
<select id="findById" resultMap="FundPaymentSupplier">
<include refid="FundPaymentSupplier_sql"/>
<where>
<if test="id != null and id != ''">
AND tb.id = #{id}
</if>
</where>
</select>
</mapper>