From 2bb847e3b8bdc2692d88ad9df0d4ad54a3ccd890 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期三, 08 十一月 2023 16:01:20 +0800 Subject: [PATCH] 111 --- server/services/src/main/java/com/doumee/service/business/impl/WxBillServiceImpl.java | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/server/services/src/main/java/com/doumee/service/business/impl/WxBillServiceImpl.java b/server/services/src/main/java/com/doumee/service/business/impl/WxBillServiceImpl.java index 1181f86..0b0d5fc 100644 --- a/server/services/src/main/java/com/doumee/service/business/impl/WxBillServiceImpl.java +++ b/server/services/src/main/java/com/doumee/service/business/impl/WxBillServiceImpl.java @@ -95,7 +95,7 @@ @Override public WxBill findOne(WxBill wxBill) { QueryWrapper<WxBill> wrapper = new QueryWrapper<>(wxBill); - return wxBillMapper.selectOne(wrapper); + return wxBillMapper.selectOne(wrapper.last(" limit 1")); } @Override @@ -149,6 +149,7 @@ } else if(StringUtils.equals(detail.getBillStatus(), "REFUND")){ //閫�娆炬暟鎹� bill4.setSumRefundBill(detail.getSumBill());//閫�娆剧瑪鏁� + bill4.setSumRefundFee(detail.getRefundFee()); bill4.setSumRefundCmmsAmt(Constants.formatDecimalNum(detail.getCmmsAmt()));//閫�娆炬墜缁垂 } } @@ -304,10 +305,6 @@ bill.setSumTotalFee(formatStringToDecimal(response.getTotalAmount())); //搴旂粨璁㈠崟鎬婚噾棰� bill.setSumSuccessFee(formatStringToDecimal(response.getTotalFee())); - //閫�娆炬�婚噾棰� - bill.setSumRefundFee(formatStringToDecimal(response.getTotalFee())); - //閫�娆炬�婚噾棰� - bill.setSumApplyRefundFee(formatStringToDecimal(response.getTotalAppliedRefundFee())); //浜ゆ槗鎬绘墜缁垂閲戦 bill.setSumCmmsAmt(formatStringToDecimal(response.getTotalPoundageFee())); detailList.addAll(getDetialModelByInfo(bill,response.getBillInfoList())); @@ -316,8 +313,12 @@ //閫�娆惧崟鎬绘暟绱杩涘叆 // bill.setSumBill(bill.getSumBill()+(Integer.parseInt(response.getTotalRecord())); bill.setSumRefundBill(Integer.parseInt(responseRefund.getTotalRecord()));//閫�娆剧殑璁㈠崟鏁� + //閫�娆炬�婚噾棰� + bill.setSumRefundFee(formatStringToDecimal(responseRefund.getTotalRefundFee())); + //閫�娆炬�婚噾棰� + bill.setSumApplyRefundFee(formatStringToDecimal(responseRefund.getTotalAppliedRefundFee())); bill.setSumRefundCmmsAmt(formatStringToDecimal(responseRefund.getTotalPoundageFee()));//閫�娆炬�绘墜缁垂 - bill.setSumCouponRefundFee(formatStringToDecimal(responseRefund.getTotalCouponFee()));//閫�娆炬�绘墜缁垂 + bill.setSumCouponRefundFee(formatStringToDecimal(responseRefund.getTotalCouponFee()));//閫�娆炬�婚噾棰� detailList.addAll(getDetialModelByInfo(bill,responseRefund.getBillInfoList())); } wxBillMapper.delete(new UpdateWrapper<WxBill>().lambda().eq( WxBill::getId, bill.getId())); @@ -348,7 +349,8 @@ //鍙兘鍚屾鏄ㄥぉ10涔嬪墠鐨勬暟鎹� Calendar caln = Calendar.getInstance(); caln.setTime(ydate); - if(caln.get(Calendar.HOUR_OF_DAY) <= 9){ +// System.out.println(caln.get(Calendar.HOUR_OF_DAY) ); + if(caln.get(Calendar.HOUR_OF_DAY) <= 10){ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝鏈�杩戝悓姝ユ椂闂村彧鑳芥埅姝㈠埌鏄ㄥぉ10鐐瑰墠锛�"); } } @@ -407,9 +409,11 @@ detail.setRefundApplyDate(DateUtil.getDateFromString2(info.getRefundTime())); //鐢宠閫�娆炬椂闂� //璁$畻鑷杞︽敹鍏ワ紝鍖归厤鏉ヨ嚜鑷杞﹀皬绋嬪簭鐨勬墍鏈夋敮浠樻垚鍔熷拰閫�娆炬垚鍔熺殑閲戦锛屼綔涓鸿嚜琛岃溅鏀跺叆锛堢疮璁℃敹娆鹃噾棰�-绱閫�娆炬垚鍔熼噾棰濓級 if(StringUtils.equals(detail.getAppid(), WxMiniConfig.wxPayService.getConfig().getAppId())){ - //鑷杞︽敹鍏ョ疮璁℃敹娆鹃噾棰� - bill.setBikeFee(bill.getBikeFee().add(detail.getSettlementTotalFee())); - if(StringUtils.equals(detail.getRefundSuccessStatus(),"SUCCESS")){ + //鑷杞︽敹鍏ョ疮璁℃敹娆鹃噾棰�(鏀粯鎴愬姛鎬婚噾棰�-閫�娆炬�婚噾棰濓級 + if(StringUtils.equals(detail.getBillType(),"SUCCESS")){ + //濡傛灉鏄氦鏄� + bill.setBikeFee(bill.getBikeFee().add(detail.getSettlementTotalFee())); + }else if(StringUtils.equals(info.getTradeType(),"REFUND" )){ //濡傛灉閫�娆炬垚鍔燂紝鎵i櫎閫�娆鹃噾棰� bill.setBikeFee(bill.getBikeFee().subtract(detail.getApplyRefundFee())); } -- Gitblit v1.9.3