无关风月
2024-11-26 5cf8494a6da08dfcdc5fdb4c5e55aefd8b27d684
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserWalletRecordController.java
@@ -178,6 +178,7 @@
            appUserWalletRecordLambdaQueryWrapper.eq(AppUserWalletRecord::getChangeType, state-1);
        }
        appUserWalletRecordLambdaQueryWrapper.eq(AppUserWalletRecord::getAppUserId, userId);
        appUserWalletRecordLambdaQueryWrapper.ne(AppUserWalletRecord::getAmount, 0);
        appUserWalletRecordLambdaQueryWrapper.orderByDesc(BaseModel::getCreateTime);
        Page<AppUserWalletRecord> page = walletRecordService
                .page(new Page<>(pageCurr, pageSize),appUserWalletRecordLambdaQueryWrapper);
@@ -352,6 +353,25 @@
                    if (data1!=null)orderDetailVO.setRemark("疗愈购买【"+data1.getMeditationTitle()+"】");
                }
                return R.ok(orderDetailVO);
            }else if (byId.getReason().contains("退款")){
                Order data = remoteOrderService.getOrderById(byId.getOrderId()).getData();
                if (data!=null){
                    orderDetailVO.setType("后台退款");
                    orderDetailVO.setPayOrderNo(data.getRefundCode());
                    orderDetailVO.setAmount(byId.getAmount());
                    orderDetailVO.setChangeType(1);
                    orderDetailVO.setPaymentTime(data.getRefundTime());
                    switch (data.getOrderFrom()){
                        case 1:
                            Meditation data1 = remoteMeditationService.getMeditationById(data.getBusinessId()).getData();
                            if (data1!=null)orderDetailVO.setRemark("疗愈购买【"+data1.getMeditationTitle()+"】");
                            break;
                        case 2:
                            Course data2 = remoteCourseService.getCourseById(data.getBusinessId()).getData();
                            if (data2!=null)orderDetailVO.setRemark("课程购买【"+data2.getCourseTitle()+"】");
                            break;
                    }
                }
            }
        }