From 428519bd1056dd90cd4589dbf85b380e403ff254 Mon Sep 17 00:00:00 2001 From: hjl <1657978663@qq.com> Date: 星期五, 05 七月 2024 18:13:08 +0800 Subject: [PATCH] feat: 代码初始化、腾讯云短信SDK --- ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/WithdrawServiceImpl.java | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/WithdrawServiceImpl.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/WithdrawServiceImpl.java index 799c2d5..c88f7b1 100644 --- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/WithdrawServiceImpl.java +++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/service/impl/WithdrawServiceImpl.java @@ -88,7 +88,7 @@ public R<String> excelExport(WithdrawExportRequest exportRequest, HttpServletResponse response) { try { response.setCharacterEncoding(Constants.UTF8); - response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setContentType("application/vnd.ms-excel"); response.setHeader("Access-Control-Expose-Headers", "Content-disposition"); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(Constants.EXCEL_WITHDRAWAL_FILE_NAME, CharEncoding.UTF_8) + ".xlsx"); @@ -126,8 +126,8 @@ } @Override - public BigDecimal withdrawalTotalMoney(List<String> cityList) { - return baseMapper.withdrawalTotalMoney(cityList); + public BigDecimal withdrawalTotalMoney(List<String> cityList,String startDateStr, String endDateStr) { + return baseMapper.withdrawalTotalMoney(cityList,startDateStr,endDateStr); } @Override @@ -169,12 +169,10 @@ public Boolean confirmWithdraw(User user, Order order) { // 校验提现 List<Withdraw> list = this.lambdaQuery().eq(Withdraw::getUserId, user.getId()) - .eq(Withdraw::getOrderId, order).list(); + .eq(Withdraw::getOrderId, order.getId()).list(); List<Integer> stateList = list.stream().map(Withdraw::getState).collect(Collectors.toList()); - if (stateList.contains(Constants.ZERO)) { - throw new GlobalException("当前订单已提交提现申请,请等待审核!"); - } else if (stateList.contains(Constants.ONE)) { - throw new GlobalException("当前订单已提现通过!"); + if (stateList.contains(Constants.ONE)) { + throw new GlobalException("当前订单提现申请已通过!"); } return weChatPay(order.getOrderMoney(), user.getOpenId()); } -- Gitblit v1.7.1