无关风月
2025-04-09 4e30491ff75e23e4cce21713a79c03421addd3f5
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/WithdrawServiceImpl.java
@@ -372,7 +372,8 @@
            Map<String, Object> postMap = new HashMap<>(8);
            postMap.put(WechatConstants.APP_ID, "wx98563d0ec9cf21c8");
            // 订单号
            postMap.put("out_bill_no", String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
            String s = String.valueOf(UUID.randomUUID()).replaceAll("-", "");
            postMap.put("out_bill_no", s);
            System.err.println("====="+postMap.get(WechatConstants.OUT_BATCH_NO));
            postMap.put(WechatConstants.OPEN_ID, openId);
            // 转账金额
@@ -399,13 +400,19 @@
//            withdrawDetail.setOutBatchNo((String) postMap.get(WechatConstants.OUT_BATCH_NO));
//            withdrawDetailService.save(withdrawDetail);
            if (jsonObject.containsKey(WechatConstants.CREATE_TIME)) {
                String string = jsonObject.getString("package_info");
                Withdraw withdraw = this.getById(withdrawId);
                Order order = orderService.getById(withdraw.getOrderId());
                order.setPackageInfo(string);
                orderService.updateById(order);
                // 转账成功
                //保存转账明细
//                WithdrawDetail withdrawDetail = new WithdrawDetail();
//                withdrawDetail.setWithdrawId(withdrawId);
//                withdrawDetail.setMoney(transferAmount);
//                withdrawDetail.setOutBatchNo((String) postMap.get(WechatConstants.OUT_BATCH_NO));
//                withdrawDetailService.save(withdrawDetail);
                WithdrawDetail withdrawDetail = new WithdrawDetail();
                withdrawDetail.setWithdrawId(withdrawId);
                withdrawDetail.setMoney(transferAmount);
                withdrawDetail.setOutBatchNo(s);
                withdrawDetailService.save(withdrawDetail);
            } else {