| | |
| | | Calendar caln = Calendar.getInstance(); |
| | | caln.setTime(ydate); |
| | | // System.out.println(caln.get(Calendar.HOUR_OF_DAY) ); |
| | | if(caln.get(Calendar.HOUR_OF_DAY) >= 10){ |
| | | if(caln.get(Calendar.HOUR_OF_DAY) <= 10){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,最近同步时间只能截止到昨天10点前!"); |
| | | } |
| | | } |
| | |
| | | detail.setRefundApplyDate(DateUtil.getDateFromString2(info.getRefundTime())); //申请退款时间 |
| | | //计算自行车收入,匹配来自自行车小程序的所有支付成功和退款成功的金额,作为自行车收入(累计收款金额-累计退款成功金额) |
| | | if(StringUtils.equals(detail.getAppid(), WxMiniConfig.wxPayService.getConfig().getAppId())){ |
| | | //自行车收入累计收款金额 |
| | | //自行车收入累计收款金额(支付成功总金额-退款总金额) |
| | | if(StringUtils.equals(detail.getBillType(),"SUCCESS")){ |
| | | //如果是交易 |
| | | bill.setBikeFee(bill.getBikeFee().add(detail.getSettlementTotalFee())); |
| | | if(StringUtils.equals(detail.getRefundSuccessStatus(),"SUCCESS")){ |
| | | }else if(StringUtils.equals(info.getTradeType(),"REFUND" )){ |
| | | //如果退款成功,扣除退款金额 |
| | | bill.setBikeFee(bill.getBikeFee().subtract(detail.getApplyRefundFee())); |
| | | } |