From cf59c548d06bcb8dd824a97403658ca90164abfd Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 23 Jan 2024 10:06:08 +0800
Subject: [PATCH] Merge branch 'blnka' into blnka-vip

---
 src/main/resources/mapper/modules/MallInvoiceMapper.xml |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/modules/MallInvoiceMapper.xml b/src/main/resources/mapper/modules/MallInvoiceMapper.xml
new file mode 100644
index 0000000..e717aa3
--- /dev/null
+++ b/src/main/resources/mapper/modules/MallInvoiceMapper.xml
@@ -0,0 +1,67 @@
+<?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 record.orderNo != ''">
+                and a.order_no = #{record.orderNo}
+            </if>
+            <if test="record.payOrderNo != null and record.payOrderNo != ''">
+                and a.fapiao_apply_id = #{record.payOrderNo}
+            </if>
+        </where>
+        order by a.created_time desc
+    </select>
+
+    <select id="getAdminInvoiceDetailVoById" resultType="cc.mrbird.febs.mall.vo.AdminInvoiceDetailVo">
+        select
+            a.*
+        from mall_invoice a
+        where id = #{id}
+    </select>
+
+    <select id="getInvoiceItemList" resultType="cc.mrbird.febs.mall.entity.MallOrderItem">
+        select
+        a.*,
+               b.unit
+        from mall_order_item a
+        left join mall_goods b on a.goods_id = b.id
+        where order_id = #{record.orderId}
+    </select>
+
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.1