From 7a7222e69c72ec013a8633aa8a6cbf71e356083c Mon Sep 17 00:00:00 2001
From: luqingjie <544309509@qq.com>
Date: Sun, 18 Oct 2026 05:21:01 -0400
Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=94=AF=E4=BB=98=E6=80=BB?=
=?UTF-8?q?=E8=A7=88=20=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E6=89=80=E6=9C=89=E5=BA=94=E7=94=A8=EF=BC=8C=E4=B9=9F=E5=8F=AF?=
=?UTF-8?q?=E4=BB=A5=E9=80=89=E6=8B=A9=E6=9F=90=E4=B8=AA=E5=BA=94=E7=94=A8?=
=?UTF-8?q?=EF=BC=8C=E7=84=B6=E5=90=8E=E6=9F=A5=E7=9C=8B=E6=80=BB=E8=A7=88?=
=?UTF-8?q?=EF=BC=8C=E8=AF=B7=E5=B8=AE=E6=88=91=E6=B7=BB=E5=8A=A0=E8=AF=A5?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PaymentDashboardController.java | 5 ++-
.../system/mapper/PaymentDashboardMapper.java | 36 ++++++++++--------
.../service/PaymentDashboardService.java | 38 +++++++++++++------
3 files changed, 50 insertions(+), 29 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/PaymentDashboardController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/PaymentDashboardController.java
index 3337880..649bc35 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/PaymentDashboardController.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/PaymentDashboardController.java
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.RequestParam;
/** 登录首页支付经营数据。 */
@RestController
@@ -15,7 +16,7 @@ public class PaymentDashboardController {
private PaymentDashboardService dashboardService;
@GetMapping("/overview")
- public AjaxResult overview() {
- return AjaxResult.success(dashboardService.overview());
+ public AjaxResult overview(@RequestParam(value = "appId", required = false) Long appId) {
+ return AjaxResult.success(dashboardService.overview(appId));
}
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PaymentDashboardMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PaymentDashboardMapper.java
index 5dd55b0..815ad53 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PaymentDashboardMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/PaymentDashboardMapper.java
@@ -14,16 +14,18 @@ public interface PaymentDashboardMapper {
"coalesce(sum(usdt_balance),0) usdtBalance, coalesce(sum(trx_balance),0) trxBalance,",
"coalesce(sum(usdt_frozen_balance),0) usdtFrozenBalance, coalesce(sum(trx_frozen_balance),0) trxFrozenBalance,",
"coalesce(sum(credit_limit),0) creditLimit from apps where deleted_at is null",
- " and user_id=#{userId}", ""})
- Map selectAppsSummary(@Param("userId") Long userId);
+ " and user_id=#{userId}",
+ " and id=#{appId}", ""})
+ Map selectAppsSummary(@Param("userId") Long userId, @Param("appId") Long appId);
@Select({""})
- Map selectWalletSummary(@Param("userId") Long userId);
+ " and user_id=#{userId}",
+ " and app_id=#{appId}", ""})
+ Map selectWalletSummary(@Param("userId") Long userId, @Param("appId") Long appId);
@Select({""})
- Map selectPaymentSummary(@Param("userId") Long userId);
+ " and user_id=#{userId}",
+ " and app_id=#{appId}", ""})
+ Map selectPaymentSummary(@Param("userId") Long userId, @Param("appId") Long appId);
@Select({""})
- Map selectPayoutSummary(@Param("userId") Long userId);
+ " and user_id=#{userId}",
+ " and app_id=#{appId}", ""})
+ Map selectPayoutSummary(@Param("userId") Long userId, @Param("appId") Long appId);
@Select({""})
- List