无关风月
1 天以前 3044a637a15e09d50ad733fd482c6e64e90df2f9
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/WithdrawServiceImpl.java
@@ -242,7 +242,7 @@
        withdraw.setUserId(userId);
        withdraw.setUserPhone(userPhone);
        withdraw.setApplyForTime(new Date());
        withdraw.setApplyForMoney(order.getSubsidy()!=null?order.getSubsidy().add(order.getOrderMoney()):order.getOrderMoney());
        withdraw.setApplyForMoney(order.getOrderMoney());
        withdraw.setOrderId(orderId);
        withdraw.setCityCode(order.getCityCode());
@@ -252,10 +252,10 @@
            // 已通过
            withdraw.setState(Constants.ONE);
            // 商家微信打款至微信零钱
            boolean update = weChatPay(order.getSubsidy()!=null?order.getSubsidy().add(order.getOrderMoney()):order.getOrderMoney(), openId,withdraw.getId(),order.getServerName());
//            if (!update) {
//                throw new GlobalException("交易提现失败,请检查是否绑定微信!");
//            }
            boolean update = weChatPay(order.getOrderMoney(), openId,withdraw.getId(),order.getServerName());
            if (!update) {
                throw new GlobalException("交易提现失败,请检查是否绑定微信!");
            }
        } else {
            // 待审核
            withdraw.setState(Constants.ZERO);
@@ -422,15 +422,12 @@
                withdrawDetail.setMoney(transferAmount);
                withdrawDetail.setOutBatchNo(postMap.get("out_bill_no")+"");
                withdrawDetailService.save(withdrawDetail);
            } else {
                allTransfersSuccessful = false;
                break;
                throw new GlobalException("提现失败,失败原因:"+jsonObject.getString("message"));
//                allTransfersSuccessful = false;
//                break;
            }
        }
        return allTransfersSuccessful;
    }