From e76b3d267706c06bd1f80e77f9d90890ac2fd546 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 29 十二月 2025 17:42:54 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mobile_community

---
 ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml |  143 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 143 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml
index a734300..7503d51 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TInsuranceOrderMapper.xml
@@ -26,6 +26,9 @@
         <result column="refund_status" property="refundStatus" />
         <result column="refund_voucher" property="refundVoucher" />
         <result column="reject_reason" property="rejectReason" />
+        <result column="offline_voucher" property="offlineVoucher" />
+        <result column="offline_reason" property="offlineReason" />
+        <result column="bank_name" property="bankName" />
         <result column="create_time" property="createTime" />
         <result column="update_time" property="updateTime" />
         <result column="create_by" property="createBy" />
@@ -33,4 +36,144 @@
         <result column="disabled" property="disabled" />
     </resultMap>
 
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, insurance_id, app_user_id, `name`, phone, id_card, end_time, img, pay_type, pay_no, pay_money,
+          pay_time, transaction_id, status, refund_time, request_refund_time, refund_money, refund_reason,
+          refund_reason_pictures, refund_number, refund_transaction_id, refund_status, refund_voucher,
+          reject_reason, create_time, update_time, create_by, update_by, disabled, bank_card_number,
+          cardholder_name,offline_voucher,offline_reason,bank_name
+    </sql>
+
+    <select id="pageList" resultType="com.ruoyi.system.vo.TInsuranceOrderVO">
+        select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+               tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+               tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+               tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+               tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+               tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+               tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+               t.insurance_money
+        from t_insurance_order tio
+        left join t_insurance t on tio.insurance_id = t.id
+        <where>
+            <if test="query.payType != null">
+                AND tio.pay_type = #{query.payType}
+            </if>
+            <if test="query.name != null and query.name != ''">
+                AND tio.`name` LIKE concat('%',#{query.name},'%')
+            </if>
+            <if test="query.phone != null and query.phone != ''">
+                AND tio.phone LIKE concat('%',#{query.phone},'%')
+            </if>
+            <if test="query.status != null">
+                AND tio.status = #{query.status}
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND tio.end_time &gt;= #{query.startTime}
+                AND tio.end_time &lt;= #{query.endTime}
+            </if>
+            AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY tio.create_time DESC
+    </select>
+    <select id="refundPageList" resultType="com.ruoyi.system.vo.TInsuranceOrderVO">
+        select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+        tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+        tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+        tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+        tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+        tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+        tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+        t.insurance_money
+        from t_insurance_order tio
+        left join t_insurance t on tio.insurance_id = t.id
+        <where>
+            <if test="query.payType != null">
+                AND tio.pay_type = #{query.payType}
+            </if>
+            <if test="query.name != null and query.name != ''">
+                AND tio.`name` LIKE concat('%',#{query.name},'%')
+            </if>
+            <if test="query.phone != null and query.phone != ''">
+                AND tio.phone LIKE concat('%',#{query.phone},'%')
+            </if>
+            <if test="query.status != null">
+                AND tio.status = #{query.status}
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND tio.end_time &gt;= #{query.startTime}
+                AND tio.end_time &lt;= #{query.endTime}
+            </if>
+            AND tio.refund_status = 1
+            AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY tio.create_time DESC
+    </select>
+    <select id="exportInsuranceOrder" resultType="com.ruoyi.system.export.TInsuranceOrderExport">
+        select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+        tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+        tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+        tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+        tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+        tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+        tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+        t.insurance_money
+        from t_insurance_order tio
+        left join t_insurance t on tio.insurance_id = t.id
+        <where>
+            <if test="query.payType != null">
+                AND tio.pay_type = #{query.payType}
+            </if>
+            <if test="query.name != null and query.name != ''">
+                AND tio.`name` LIKE concat('%',#{query.name},'%')
+            </if>
+            <if test="query.phone != null and query.phone != ''">
+                AND tio.phone LIKE concat('%',#{query.phone},'%')
+            </if>
+            <if test="query.status != null">
+                AND tio.status = #{query.status}
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND tio.end_time &gt;= #{query.startTime}
+                AND tio.end_time &lt;= #{query.endTime}
+            </if>
+            AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY tio.create_time DESC
+    </select>
+    <select id="exportRefundOrder" resultType="com.ruoyi.system.export.TInsuranceOrderRefundExport">
+        select tio.id, tio.insurance_id, tio.app_user_id, tio.`name`, tio.phone, tio.id_card,
+        tio.end_time, tio.img, tio.pay_type, tio.pay_no, tio.pay_money, tio.pay_time,
+        tio.transaction_id, tio.status, tio.refund_time, tio.request_refund_time,
+        tio.refund_money, tio.refund_reason, tio.refund_reason_pictures,tio.offline_reason,
+        tio.refund_number, tio.refund_transaction_id, tio.refund_status,tio.offline_voucher,
+        tio.refund_voucher, tio.reject_reason, tio.create_time, tio.update_time,tio.bank_name,
+        tio.create_by, tio.update_by, tio.disabled, tio.bank_card_number, tio.cardholder_name,
+        t.insurance_money
+        from t_insurance_order tio
+        left join t_insurance t on tio.insurance_id = t.id
+        <where>
+            <if test="query.payType != null">
+                AND tio.pay_type = #{query.payType}
+            </if>
+            <if test="query.name != null and query.name != ''">
+                AND tio.`name` LIKE concat('%',#{query.name},'%')
+            </if>
+            <if test="query.phone != null and query.phone != ''">
+                AND tio.phone LIKE concat('%',#{query.phone},'%')
+            </if>
+            <if test="query.status != null">
+                AND tio.status = #{query.status}
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND tio.end_time &gt;= #{query.startTime}
+                AND tio.end_time &lt;= #{query.endTime}
+            </if>
+            AND tio.refund_status = 1
+            AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY tio.create_time DESC
+    </select>
+
 </mapper>

--
Gitblit v1.7.1