From 768d76ed8fd60091bcfb8ecfeee412f403d6f786 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期二, 12 十一月 2019 10:05:45 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java index 3a5bd18..38d683c 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java @@ -155,18 +155,6 @@ * 鏀粯鎴愬姛 */ private void paySuccess(BanLiShopOrder order) { - // 灏嗙孩鍖呮槑缁嗗鏄� - RedPackDetail detail = null; - try { - detail = RedPackDetailFactory.createUseByShopOrder(order.getId(), order.getUid(), "", "", - order.getHongBaoPayment()); - } catch (RedPackDetailException e) { - e.printStackTrace(); - } - - if (detail != null) { - redPackDetailService.changeDisplayByIdentifyCode(detail.getIdentifyCode(), true); - } } @Transactional @@ -229,10 +217,9 @@ throw new BanLiShopOrderException(6, "寰俊鏀粯閫�娆惧け璐�"); } } - // 妫�鏌� 鏄惁閫�娆炬垚鍔� - if (update.getMoneyPaymentState() != null - && update.getMoneyPaymentState() == BanLiShopOrder.PAY_STATE_REFUNDING) { + if (order.getMoneyPaymentState() != null + && order.getMoneyPaymentState() == BanLiShopOrder.PAY_STATE_REFUNDING) { try { boolean isS = BanLiShopWXPayUtil.isRefundSuccess(order.getOrderNo()); if (isS) { @@ -331,6 +318,21 @@ update.setSuccessTime(new Date()); banLiShopOrderService.udpateSelectiveByPrimaryKey(update); + if (order.getHongBaoPayment() != null && order.getHongBaoPayment().compareTo(new BigDecimal(0)) > 0) { + // 灏嗙孩鍖呮槑缁嗗鏄� + RedPackDetail detail = null; + try { + detail = RedPackDetailFactory.createUseByShopOrder(order.getId(), order.getUid(), "", "", + order.getHongBaoPayment()); + } catch (RedPackDetailException e) { + e.printStackTrace(); + } + + if (detail != null) { + redPackDetailService.changeDisplayByIdentifyCode(detail.getIdentifyCode(), true); + } + } + try { if (Constant.IS_TEST) { FuLuChargeApiUtil.shaXiangCharge(set.getChargeFuLuNum(), "banlishop" + order.getOrderNo(), -- Gitblit v1.8.0