订单页面修改

This commit is contained in:
lu7213 committed 2026-10-19 03:35:47 -04:00
1 parent f5b1a9f638
commit 37754f3af0
3 files changed
+42 -3

No files matched your search

@@ -34,9 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from orders
</sql>
<select id="selectUsdtOrdersList" parameterType="UsdtOrders" resultMap="UsdtOrdersResult">
<include refid="selectUsdtOrdersVo"/>
<where>
<sql id="orderQueryWhere">
<where>
and deleted_at is null
<if test="params.beginTime != null and params.beginTime != ''"> and created_at &gt;= #{params.beginTime}</if>
<if test="params.endTime != null and params.endTime != ''"> and created_at &lt;= #{params.endTime}</if>
<if test="tradeId != null and tradeId != ''"> and trade_id like concat('%', #{tradeId}, '%')</if>
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
<if test="token != null and token != ''"> and token = #{token}</if>
@@ -48,6 +50,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null "> and user_id = #{userId}</if>
<if test="orderType != null "> and order_type = #{orderType}</if>
</where>
</sql>
<select id="selectUsdtOrdersList" parameterType="UsdtOrders" resultMap="UsdtOrdersResult">
<include refid="selectUsdtOrdersVo"/>
<include refid="orderQueryWhere"/>
order by created_at desc, id desc
</select>
<select id="selectOrderStatistics" parameterType="UsdtOrders" resultType="java.util.LinkedHashMap">
select count(*) as total,
coalesce(sum(case when status = 1 then 1 else 0 end), 0) as pending,
coalesce(sum(case when status = 2 then 1 else 0 end), 0) as paid,
coalesce(sum(case when status = 3 then 1 else 0 end), 0) as expired,
cast(coalesce(sum(case when status = 2 then actual_amount else 0 end), 0) as char) as receivedAmount,
coalesce(sum(case when status = 2 and (callback_confirm is null or callback_confirm != 1) then 1 else 0 end), 0) as callbackPending
from orders
<include refid="orderQueryWhere"/>
</select>
<select id="selectUsdtOrdersById" parameterType="Long" resultMap="UsdtOrdersResult">