hjl
2024-07-05 428519bd1056dd90cd4589dbf85b380e403ff254
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());
    }