xiaoyong931011
2022-08-30 ce6fc16f568cc3c396e141f1f9a7e16d3abf802d
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
<?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="cc.mrbird.febs.mall.mapper.MallRefundMapper">
 
    <select id="selectByItemIdAndOrderIdAndState" resultType="cc.mrbird.febs.mall.entity.MallRefundEntity">
 
        select a.* from mall_refund a
        <where>
            <if test="itemId != null and itemId != ''">
                and a.item_id = #{itemId}
            </if>
            <if test="orderId != null and orderId != ''">
                and a.order_id = #{orderId}
            </if>
            <if test="state != null and state != ''">
                and a.state = #{state}
            </if>
        </where>
 
    </select>
 
    <select id="getOrderRefundListInPage" resultType="cc.mrbird.febs.mall.entity.MallRefundEntity">
        select a.*,
               b.order_no orderNo,
               b.status,
               c.goods_name goodsName,
               c.cnt,
        from mall_refund a
        inner join mall_order_info b on a.order_id = b.id
        inner join mall_order_item c on a.item_id = c.id
        <where>
            <if test="record != null" >
                <if test="record.state!=null and record.state!=''">
                    and a.state = #{record.state}
                </if>
            </if>
        </where>
        order by a.CREATED_TIME desc
    </select>
 
 
</mapper>