KKSU
2024-01-19 08aa2024f664d2c7e7eb60a25922a07d60aca2f2
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
<?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.MallInvoiceMapper">
 
    <select id="selectApiMallInvoiceVoInPage" resultType="cc.mrbird.febs.mall.vo.ApiMallInvoiceVo">
        select
            a.id,
            a.order_no,
            a.amount,
            a.goods_img,
            a.state,
            a.invoice_url
        from mall_invoice a
        <where>
            <if test="record.memberId != null">
                and a.member_id=#{record.memberId}
            </if>
            <if test="record.state != null">
                and a.state=#{record.state}
            </if>
        </where>
        order by a.created_time desc
    </select>
 
    <select id="selectByFapiaoApplyIdAndMemberId" resultType="cc.mrbird.febs.mall.entity.MallInvoice">
        select
            a.*
        from mall_invoice a
        where fapiao_apply_id = #{fapiaoApplyId}
            and member_id = #{memberId}
    </select>
 
    <select id="getInvoiceListInPage" resultType="cc.mrbird.febs.mall.entity.MallInvoice">
        select
        a.*
        from mall_invoice a
        <where>
            <if test="record.state != null">
                and a.state = #{record.state}
            </if>
            <if test="record.orderNo != null">
                and a.order_no = #{record.orderNo}
            </if>
            <if test="record.payOrderNo != null">
                and a.fapiao_apply_id = #{record.payOrderNo}
            </if>
        </where>
        order by a.created_time desc
    </select>
 
</mapper>