<?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="com.ruoyi.system.mapper.TInsuranceOrderMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.system.model.TInsuranceOrder">
|
<id column="id" property="id" />
|
<result column="app_user_id" property="appUserId" />
|
<result column="name" property="name" />
|
<result column="phone" property="phone" />
|
<result column="id_card" property="idCard" />
|
<result column="img" property="img" />
|
<result column="pay_type" property="payType" />
|
<result column="pay_no" property="payNo" />
|
<result column="pay_money" property="payMoney" />
|
<result column="pay_time" property="payTime" />
|
<result column="transaction_id" property="transactionId" />
|
<result column="status" property="status" />
|
<result column="refund_time" property="refundTime" />
|
<result column="request_refund_time" property="requestRefundTime" />
|
<result column="refund_money" property="refundMoney" />
|
<result column="refund_reason" property="refundReason" />
|
<result column="refund_reason_pictures" property="refundReasonPictures" />
|
<result column="refund_number" property="refundNumber" />
|
<result column="refund_transaction_id" property="refundTransactionId" />
|
<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" />
|
<result column="update_by" property="updateBy" />
|
<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 >= #{query.startTime}
|
AND tio.end_time <= #{query.endTime}
|
</if>
|
AND ((tio.pay_type = 1 AND tio.status != 0) OR (tio.pay_type = 2))
|
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 >= #{query.startTime}
|
AND tio.end_time <= #{query.endTime}
|
</if>
|
AND tio.refund_status != 0
|
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 >= #{query.startTime}
|
AND tio.end_time <= #{query.endTime}
|
</if>
|
AND ((tio.pay_type = 1 AND tio.status != 0) OR (tio.pay_type = 2))
|
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 >= #{query.startTime}
|
AND tio.end_time <= #{query.endTime}
|
</if>
|
AND tio.refund_status != 0
|
AND tio.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
|
</where>
|
ORDER BY tio.create_time DESC
|
</select>
|
|
</mapper>
|