linwe
2024-09-03 764d883b5ea3bdc06abbec548b6df0511e567978
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
58
59
60
61
62
63
64
<?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="org.springblade.modules.pay.mapper.PaymentInfoMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="paymentInfoResultMap" type="org.springblade.modules.pay.entity.PaymentInfoEntity">
    </resultMap>
 
 
    <select id="selectPaymentInfoPage" resultMap="paymentInfoResultMap">
        select * from jczz_payment_info where is_deleted = 0
    </select>
 
    <resultMap type="org.springblade.modules.pay.dto.PaymentInfoDTO" id="PaymentInfoDTOResult">
        <result property="id"    column="id"    />
        <result property="orderNo"    column="order_no"    />
        <result property="transactionId"    column="transaction_id"    />
        <result property="paymentType"    column="payment_type"    />
        <result property="tradeType"    column="trade_type"    />
        <result property="tradeState"    column="trade_state"    />
        <result property="payerTotal"    column="payer_total"    />
        <result property="content"    column="content"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
 
    <sql id="selectPaymentInfo">
        select
            id,
            order_no,
            transaction_id,
            payment_type,
            trade_type,
            trade_state,
            payer_total,
            content,
            create_time,
            update_time
        from
            jczz_payment_info
    </sql>
 
    <select id="selectPaymentInfoById" parameterType="long" resultMap="PaymentInfoDTOResult">
        <include refid="selectPaymentInfo"/>
        where
        id = #{id}
    </select>
 
    <select id="selectPaymentInfoList" parameterType="org.springblade.modules.pay.dto.PaymentInfoDTO" resultMap="PaymentInfoDTOResult">
        <include refid="selectPaymentInfo"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
            <if test="transactionId != null  and transactionId != ''"> and transaction_id = #{transactionId}</if>
            <if test="paymentType != null  and paymentType != ''"> and payment_type = #{paymentType}</if>
            <if test="tradeType != null  and tradeType != ''"> and trade_type = #{tradeType}</if>
            <if test="tradeState != null  and tradeState != ''"> and trade_state = #{tradeState}</if>
            <if test="payerTotal != null  and payerTotal != ''"> and payer_total = #{payerTotal}</if>
            <if test="content != null  and content != ''"> and content = #{content}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
        </where>
    </select>
</mapper>