From 71656127d2d3fa023eb767343a9ac01172f2802d Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 27 八月 2025 21:31:40 +0800
Subject: [PATCH] bug修改

---
 cloud-server-account/src/main/java/com/dsh/account/controller/FinanceController.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/FinanceController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/FinanceController.java
index 9d646c1..3577d45 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/controller/FinanceController.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/controller/FinanceController.java
@@ -105,33 +105,35 @@
         if (parse.before(new Date())){
             appUser.setIsVip(0);
         }
+        vipPayment.setRemark(vipRefundDto.getRemark());
         appUserService.updateById(appUser);
-        vipPayment.setState(3);
+        vipPayment.setPayStatus(3);
         vipPaymentService.updateById(vipPayment);
         return "200";
     }
 
     @ResponseBody
-    @RequestMapping("/finance/vipPayment")
+    @PostMapping("/finance/vipPayment")
     List<VipPaymentListVO> vipPayment(@RequestBody VipPaymentDto vipPaymentDto){
         List<VipPaymentListVO> vipPaymentListVOS = new ArrayList<>();
 
         List<Integer> payStatus = new ArrayList<>();
         payStatus.add(2);
         LambdaQueryWrapper<VipPayment> vipPaymentLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        vipPaymentLambdaQueryWrapper.in(!vipPaymentDto.getUserIds().isEmpty(),VipPayment::getAppUserId, vipPaymentDto.getUserIds());
-        vipPaymentLambdaQueryWrapper.in(!vipPaymentDto.getVipIds().isEmpty(),VipPayment::getVipId, vipPaymentDto.getVipIds());
+        vipPaymentLambdaQueryWrapper.in(vipPaymentDto.getUserIds()!=null&&!vipPaymentDto.getUserIds().isEmpty(),VipPayment::getAppUserId, vipPaymentDto.getUserIds());
+        vipPaymentLambdaQueryWrapper.in(vipPaymentDto.getVipIds()!=null&&!vipPaymentDto.getVipIds().isEmpty(),VipPayment::getVipId, vipPaymentDto.getVipIds());
         vipPaymentLambdaQueryWrapper.in(VipPayment::getPayStatus,payStatus);
         vipPaymentLambdaQueryWrapper.ge(StringUtils.hasLength(vipPaymentDto.getStartTime()), VipPayment::getInsertTime, vipPaymentDto.getStartTime());
         vipPaymentLambdaQueryWrapper.le(StringUtils.hasLength(vipPaymentDto.getEndTime()), VipPayment::getInsertTime, vipPaymentDto.getEndTime());
         if (vipPaymentDto.getIsRefund()!=null&&vipPaymentDto.getIsRefund()==1){
             payStatus.add(3);
         }
+        vipPaymentLambdaQueryWrapper.orderByDesc(VipPayment::getInsertTime);
         List<VipPayment> list = vipPaymentService.list(vipPaymentLambdaQueryWrapper);
         // 使用 Stream + 手动拷贝提升性能和可读性(或使用 MapStruct)
         vipPaymentListVOS = list.stream().map(vipDetail -> {
                 VipPaymentListVO vo = new VipPaymentListVO();
-            BeanUtils.copyProperties(vo, vipDetail); // 注意参数顺序是否正确
+            BeanUtils.copyProperties(vipDetail,vo); // 注意参数顺序是否正确
             return vo;
         }).collect(Collectors.toList());
         for (VipPaymentListVO vipPaymentListVO : vipPaymentListVOS) {

--
Gitblit v1.7.1