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>
<!-- 动态获取参数采用备参 -->