| | |
| | | || order.getBalancePaymentState() == BanLiShopOrder.PAY_STATE_PAID)
|
| | | && (order.getMoneyPaymentState() == null
|
| | | || order.getMoneyPaymentState() == BanLiShopOrder.PAY_STATE_PAID))// 其他待支付项已经支付
|
| | | {
|
| | | update.setState(BanLiShopOrder.STATE_PAID);
|
| | | update.setStateDesc("支付成功");
|
| | | }
|
| | | banLiShopOrderService.udpateSelectiveByPrimaryKey(update);
|
| | | if (update.getState() != null && update.getState() == BanLiShopOrder.STATE_PAID) {
|
| | | paySuccess(order);
|
| | |
| | | || order.getBalancePaymentState() == BanLiShopOrder.PAY_STATE_PAID)
|
| | | && (order.getHongBaoPaymentState() == null
|
| | | || order.getHongBaoPaymentState() == BanLiShopOrder.PAY_STATE_PAID))// 其他待支付项已经支付
|
| | | {
|
| | | update.setState(BanLiShopOrder.STATE_PAID);
|
| | | update.setStateDesc("支付成功");
|
| | | }
|
| | | banLiShopOrderService.udpateSelectiveByPrimaryKey(update);
|
| | | if (update.getState() != null && update.getState() == BanLiShopOrder.STATE_PAID) {
|
| | | paySuccess(order);
|
| | |
| | | * 支付成功
|
| | | */
|
| | | 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
|
| | |
| | | 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) {
|
| | |
| | | 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(),
|