| | |
| | | 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"); |
| | |
| | | } |
| | | |
| | | @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 |
| | |
| | | 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()); |
| | | } |