From 3957b6be3bb361fb40439a38e1feeed4ffbbfe57 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期四, 19 十二月 2024 10:52:31 +0800
Subject: [PATCH] 1

---
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/BalanceChangeRecordController.java |   14 ++++++++++++++
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletStatisticsDetail.java                |    5 +++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/BalanceChangeRecordController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/BalanceChangeRecordController.java
index c1c56d4..7e5b7f4 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/BalanceChangeRecordController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/BalanceChangeRecordController.java
@@ -7,6 +7,7 @@
 import com.ruoyi.account.service.BalanceChangeRecordService;
 import com.ruoyi.account.vo.CommissionStatistics;
 import com.ruoyi.account.vo.WalletStatistics;
+import com.ruoyi.account.vo.WalletStatisticsDetail;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import io.swagger.annotations.ApiOperation;
@@ -87,5 +88,18 @@
         return R.ok(walletStatistics);
     }
 
+    /**
+     * 钱包统计导出
+     */
+    @GetMapping("/walletExport")
+    @ApiOperation(value = "钱包统计导出", tags = "管理后台-财务统计-钱包统计")
+    public void walletExport(HttpServletResponse response, BalanceChangeRecord balanceChangeRecord) {
+        WalletStatistics walletStatistics = balanceChangeRecordService.walletStatistics(Page.of(1, Integer.MAX_VALUE), balanceChangeRecord);
+        IPage<WalletStatisticsDetail> userPointPage = walletStatistics.getPage();
+        List<WalletStatisticsDetail> userPointList = userPointPage.getRecords();
+        ExcelUtil<WalletStatisticsDetail> util = new ExcelUtil<>(WalletStatisticsDetail.class);
+        util.exportExcel(response, userPointList, "钱包统计");
+    }
+
 
 }
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletStatisticsDetail.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletStatisticsDetail.java
index 76215da..4dba15b 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletStatisticsDetail.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/WalletStatisticsDetail.java
@@ -15,18 +15,21 @@
      * 门店名称
      */
     @ApiModelProperty(value = "门店名称")
+    @Excel(name = "门店名称")
     private String shopName;
 
     /**
      * 用户姓名
      */
     @ApiModelProperty(value = "用户姓名")
+    @Excel(name = "用户姓名")
     private String userName;
 
     /**
      * 联系电话
      */
     @ApiModelProperty(value = "联系电话")
+    @Excel(name = "联系电话")
     private String userPhone;
 
     @ApiModelProperty("类型:1充值2提现3红包4分佣5商城购物6订单取消回退7门店提现")
@@ -39,11 +42,13 @@
     @ApiModelProperty(value = "变更时间")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private LocalDateTime createTime;
 
     /**
      * 变更数量
      */
     @ApiModelProperty(value = "变更数量")
+    @Excel(name = "变更数量")
     private BigDecimal changeAmount;
 }

--
Gitblit v1.7.1