fix(订单中心):首页统计问题优化修复,显示数据更新

This commit is contained in:
2025-08-06 12:40:52 +08:00
parent 6d4fa0f26e
commit c571b7b894
11 changed files with 344 additions and 295 deletions
@@ -4,20 +4,33 @@
<mapper namespace="com.central.order.mapper.OrderMapper">
<select id="findList" resultType="com.central.order.model.Order">
select * from orders t
SELECT o.*, t.tourism_name as tourismName
FROM orders o
LEFT JOIN tourisms t ON o.tourism_id = t.id
<where>
<if test="p.orderNo != null and p.orderNo != ''">
AND t.order_no LIKE CONCAT('%', #{p.orderNo}, '%')
</if>
<if test="p.deviceSn != null and p.deviceSn != ''">
AND t.deviceSn LIKE CONCAT('%', #{p.deviceSn}, '%')
AND o.order_no LIKE CONCAT('%', #{p.orderNo}, '%')
</if>
<if test="p.orderStatus != null">
AND t.order_status = #{p.orderStatus}
AND o.order_status = #{p.orderStatus}
</if>
<if test="p.tourismId != null">
AND o.tourism_id = #{p.tourismId}
</if>
<if test="p.deviceSn != null and p.deviceSn != ''">
AND o.device_sn LIKE CONCAT('%', #{p.deviceSn}, '%')
</if>
<if test="p.codeId != null and p.codeId != ''">
AND o.code_id LIKE CONCAT('%', #{p.codeId}, '%')
</if>
<if test="p.userId != null and p.userId != ''">
AND o.user_id LIKE CONCAT('%', #{p.userId}, '%')
</if>
<if test="p.mobile != null and p.mobile != ''">
AND o.mobile LIKE CONCAT('%', #{p.mobile}, '%')
</if>
</where>
ORDER BY t.id DESC
ORDER BY o.create_time DESC
</select>
<!-- 动态获取参数采用备参 -->
@@ -4,7 +4,34 @@
<mapper namespace="com.central.order.mapper.QrCodeMapper">
<select id="findList" resultType="com.central.order.model.QrCode">
select * from qrcodes t
SELECT * FROM qrcodes q
<where>
<if test="p.tourismId != null and p.tourismId != ''">
AND q.tourism_id = #{p.tourismId}
</if>
<if test="p.waylineId != null and p.waylineId != ''">
AND q.wayline_id = #{p.waylineId}
</if>
<if test="p.status != null">
AND q.status = #{p.status}
</if>
<if test="p.isTest != null">
AND q.is_test = #{p.isTest}
</if>
<if test="p.tenantId != null and p.tenantId != ''">
AND q.tenant_id = #{p.tenantId}
</if>
<if test="p.name != null and p.name != ''">
AND q.name LIKE CONCAT('%', #{p.name}, '%')
</if>
<if test="p.codeId != null and p.codeId != ''">
AND q.code_id LIKE CONCAT('%', #{p.codeId}, '%')
</if>
<if test="p.deviceSn != null and p.deviceSn != ''">
AND q.device_sn = #{p.deviceSn}
</if>
</where>
ORDER BY q.create_time DESC
</select>
<resultMap id="QrCodeResultMap" type="com.central.order.model.QrCode">