payment-order-mapper.xml
1.84 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.cjs.cms.dao.user.fund.PaymentOrderDao">
<sql id="payment_order">
id,bOrganId,bAcctKind,sOrganId,sBranchId,sAcctKind,sAcctType,sCustPwd,sCustPwd2,
FunctionId,ExSerial,Name,bCustAcct,sCustAcct,MoneyType,OccurBala,CardType,Card,bFrozenFlag,
ErrorNo,ErrorInfo,sSerial,sEnableBala,bEnableBala,Nationality,PostCode,Address,
TelNo,Email,Summary,create_at
</sql>
<select id="search" parameterType="java.util.Map"
resultType="java.util.Map">
select <include refid="payment_order" />
from payment_order
where 1 = 1
<if test="name !=null and name !=''">
and Name = #{name}
</if>
<if test="sAcctKind !=null and sAcctKind !=''">
and sAcctKind = #{sAcctKind}
</if>
<if test="sCustAcct !=null and sCustAcct !=''">
and sCustAcct = #{sCustAcct}
</if>
<if test="beginDate != null and beginDate != ''">
<![CDATA[ and create_at >= #{beginDate}]]>
</if>
<if test="endDate != null and endDate != ''">
<![CDATA[ and create_at <= DATE_ADD(#{endDate}, INTERVAL 1 day)]]>
</if>
order by create_at desc
limit #{start},#{limit}
</select>
<select id="searchTotal" parameterType="java.util.Map" resultType="int">
select count(*)
from payment_order
where 1 = 1
<if test="name !=null and name !=''">
and Name = #{name}
</if>
<if test="sAcctKind !=null and sAcctKind !=''">
and sAcctKind = #{sAcctKind}
</if>
<if test="sCustAcct !=null and sCustAcct !=''">
and sCustAcct = #{sCustAcct}
</if>
<if test="beginDate != null and beginDate != ''">
<![CDATA[ and create_at >= #{beginDate}]]>
</if>
<if test="endDate != null and endDate != ''">
<![CDATA[ and create_at <= DATE_ADD(#{endDate}, INTERVAL 1 day)]]>
</if>
</select>
</mapper>