<?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.TRefundApplicationMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.system.model.TRefundApplication">
|
<id column="id" property="id" />
|
<result column="big_gift_package_order_id" property="bigGiftPackageOrderId" />
|
<result column="applicant_user_id" property="applicantUserId" />
|
<result column="applicant_time" property="applicantTime" />
|
<result column="refund_reason" property="refundReason" />
|
<result column="voucher_picture" property="voucherPicture" />
|
<result column="status" property="status" />
|
<result column="audit_user_id" property="auditUserId" />
|
<result column="audit_time" property="auditTime" />
|
<result column="audit_remark" property="auditRemark" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, big_gift_package_order_id, applicant_user_id, applicant_time, refund_reason, voucher_picture, status, audit_user_id, audit_time, audit_remark
|
</sql>
|
<select id="pageRefundList" resultType="com.ruoyi.system.model.TBigGiftPackageOrder">
|
select t1.id,t2.code,t2.create_time ,t3.name userName,t3.phone,t2.order_price,t4.name bigGiftPackageName,t2.payment_type,t2.deposit,t2.final_payment,t1.status auditStatus from t_refund_application t1 left join t_big_gift_package_order t2 on t1.big_gift_package_order_id = t2.id
|
left join t_app_user t3 on t2.app_user_id = t3.id left join t_big_gift_package t4 on t2.big_gift_package_id = t4.id
|
where t1.del_flag = 0
|
<if test="query.code != null and query.code != ''">
|
and t2.code like concat('%',#{query.code},'%')
|
</if>
|
<if test="query.phone != null and query.phone != ''">
|
and t3.phone like concat('%',#{query.phone},'%')
|
</if>
|
<if test="query.time != null and query.time != ''">
|
and t2.create_time between concat(substring(#{query.time}, 1, 10), ' 00:00:00') and concat(substring(#{query.time}, 14, 10), ' 23:59:59')
|
</if>
|
<if test="query.auditStatus != null">
|
and t1.status = #{query.auditStatus}
|
</if>
|
<if test="query.companyId != null">
|
and t2.company_id = #{query.companyId}
|
</if>
|
<if test="query.name != null and query.name != ''">
|
and t4.name like concat('%',#{query.name},'%')
|
</if>
|
order by t1.applicant_time desc
|
|
</select>
|
<select id="pageRefundExportList" resultType="com.ruoyi.system.model.TBigGiftPackageOrder"
|
parameterType="com.ruoyi.system.query.BigGiftPackageQuery">
|
select t1.id,t2.code,t2.create_time,t3.name userName,t3.phone,t2.order_price,t4.name bigGiftPackageName,t2.payment_type,t2.deposit,t2.final_payment,t1.status auditStatus from t_refund_application t1 left join t_big_gift_package_order t2 on t1.big_gift_package_order_id = t2.id
|
left join t_app_user t3 on t2.app_user_id = t3.id left join t_big_gift_package t4 on t2.big_gift_package_id = t4.id
|
where 1=1
|
<if test="query.name != null and query.name != ''">
|
and t4.name like concat('%',#{query.name},'%')
|
</if>
|
order by t1.applicant_time desc
|
</select>
|
|
</mapper>
|