linwe
2024-05-29 c10d6358b9f014375a13821465bc978d0c0da22e
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
65
66
67
68
69
70
71
<?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.RefundInfoMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="refundInfoResultMap" type="org.springblade.modules.pay.entity.RefundInfoEntity">
    </resultMap>
 
 
    <select id="selectRefundInfoPage" resultMap="refundInfoResultMap">
        select * from jczz_refund_info where is_deleted = 0
    </select>
    <resultMap type="org.springblade.modules.pay.dto.RefundInfoDTO" id="RefundInfoDTOResult">
        <result property="id"    column="id"    />
        <result property="orderNo"    column="order_no"    />
        <result property="refundNo"    column="refund_no"    />
        <result property="refundId"    column="refund_id"    />
        <result property="totalFee"    column="total_fee"    />
        <result property="refund"    column="refund"    />
        <result property="reason"    column="reason"    />
        <result property="refundStatus"    column="refund_status"    />
        <result property="contentReturn"    column="content_return"    />
        <result property="contentNotify"    column="content_notify"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
 
    <sql id="selectRefundInfo">
        select
            id,
            order_no,
            refund_no,
            refund_id,
            total_fee,
            refund,
            reason,
            refund_status,
            content_return,
            content_notify,
            create_time,
            update_time
        from
            jczz_refund_info
    </sql>
 
    <select id="selectRefundInfoById" parameterType="long" resultMap="RefundInfoDTOResult">
        <include refid="selectRefundInfo"/>
        where
        id = #{id}
    </select>
 
    <select id="selectRefundInfoList" parameterType="org.springblade.modules.pay.dto.RefundInfoDTO" resultMap="RefundInfoDTOResult">
        <include refid="selectRefundInfo"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="orderNo != null "> and order_no = #{orderNo}</if>
            <if test="refundNo != null "> and refund_no = #{refundNo}</if>
            <if test="refundId != null "> and refund_id = #{refundId}</if>
            <if test="totalFee != null  and totalFee != ''"> and total_fee = #{totalFee}</if>
            <if test="refund != null  and refund != ''"> and refund = #{refund}</if>
            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
            <if test="refundStatus != null  and refundStatus != ''"> and refund_status = #{refundStatus}</if>
            <if test="contentReturn != null  and contentReturn != ''"> and content_return = #{contentReturn}</if>
            <if test="contentNotify != null  and contentNotify != ''"> and content_notify = #{contentNotify}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
        </where>
    </select>
 
 
</mapper>