Files
pj_service_cloud/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/HardThirdMiOrderMapper.xml
T
dzc f1d6e2f2f6 feat:发票添加申请人
feat:添加微信小程序的用户入口
2026-01-15 09:26:44 +08:00

73 lines
2.6 KiB
XML
Executable File

<?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.bsd.pjcloud.hard.mapper.HardThirdMiOrderMapper">
<sql id="selectA">
select a.id,
a.biz_type,
a.user_id,
a.user_type,
a.auth_id,
a.flow_id,
a.order_id,
a.refund_id,
a.hard_id,
a.out_order_no,
a.third_order_no,
a.create_order_time,
a.pay_order_time,
a.refund_order_time,
a.order_status,
a.deposit_price,
a.order_price,
a.pay_price,
a.refund_price,
a.org_sign_json,
a.org_order_json,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.del_flag,
a.tenant_id
</sql>
<sql id="whereA">
a.del_flag = '0'
<if test="dto.bizType != null and dto.bizType != '' ">
and a.biz_type = #{dto.bizType}
</if>
<if test="dto.userId != null ">
and a.user_id = #{dto.userId}
</if>
<if test="dto.hardId != null ">
and a.hard_id = #{dto.hardId}
</if>
<if test="dto.userType != null and dto.userType != '' ">
and a.user_type = #{dto.userType}
</if>
<if test="dto.orderStatus != null and dto.orderStatus != '' ">
and a.order_status = #{dto.orderStatus}
</if>
<if test="dto.createOrderTimeList != null and dto.createOrderTimeList.length == 2">
and a.create_order_time between #{dto.createOrderTimeList[0]} and #{dto.createOrderTimeList[1]}
</if>
<if test="dto.payOrderTimeList != null and dto.payOrderTimeList.length == 2">
and a.pay_order_time between #{dto.payOrderTimeList[0]} and #{dto.payOrderTimeList[1]}
</if>
<if test="dto.refundOrderTimeList != null and dto.refundOrderTimeList.length == 2">
and a.refund_order_time between #{dto.refundOrderTimeList[0]} and #{dto.refundOrderTimeList[1]}
</if>
</sql>
<select id="scopePageJoin" resultType="com.bsd.pjcloud.hard.api.vo.HardThirdMiOrderVo">
<include refid="selectA"/>
from hard_third_mi_order a
<where>
<include refid="whereA"/>
</where>
order by a.create_order_time desc , a.id desc
</select>
</mapper>