无关风月
2 天以前 c19fd2da97b631cc720f039967760da475887554
二手新增迭代
2个文件已添加
14个文件已修改
298 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/UserVO.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Withdraw.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/WithdrawRecord.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/WithdrawFallbackFactory.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/WithdrawController.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-admin/src/main/resources/template/订单记录.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WithdrawController.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WxChatPayCallBack.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/User.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Withdraw.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/WithdrawRecord.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/WithdrawServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/task/TaskUtil.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vx/TestWxPay.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/UserVO.java
New file
@@ -0,0 +1,53 @@
package com.ruoyi.order.api.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
 * <p>
 * 用户列表
 * </p>
 *
 * @author hjl
 * @since 2024-05-29
 */
@Getter
@Setter
@ApiModel(value = "User对象", description = "用户列表")
public class UserVO extends BaseEntity {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("用户id")
    private String userNo;
    @ApiModelProperty("注册城市")
    private String city;
    @ApiModelProperty("城市编码")
    private String cityCode;
    @ApiModelProperty("用户昵称")
    private String nickname;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty("头像")
    private String profilePicture;
    @ApiModelProperty("账号状态 0未启用;1已启用")
    private Integer state;
    @ApiModelProperty("微信OpenId")
    private String openId;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/Withdraw.java
@@ -10,6 +10,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import java.math.BigDecimal;
import java.util.Date;
@@ -64,9 +65,26 @@
    @ApiModelProperty("城市code")
    @TableField("city_code")
    private String cityCode;
    @ApiModelProperty("用户信息")
    @TableField(exist = false)
    private UserVO user;
    @ApiModelProperty("提现进度")
    @TableField(exist = false)
    private List<WithdrawRecord> withdrawRecords;
    @ApiModelProperty("旧机品类")
    @TableField(exist = false)
    private String serveName;
    @ApiModelProperty("回收单金额")
    @TableField(exist = false)
    private BigDecimal servePrice;
    @ApiModelProperty("补贴金额")
    @TableField(exist = false)
    private BigDecimal subsidy;
    @ApiModelProperty("用户地址")
    @TableField(exist = false)
    private String reservationAddress;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/entity/WithdrawRecord.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -44,6 +45,7 @@
    private Integer withdrawType;
    @ApiModelProperty("创建时间")
    @TableField("createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @ApiModelProperty("审核结果 1=通过 0=拒绝")
    @TableField("auditStatus")
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/WithdrawFallbackFactory.java
@@ -104,6 +104,11 @@
            public R<WithdrawDetailVO> withdrawDetailByUser(String orderId) {
                return R.fail(cause.getMessage());
            }
            @Override
            public R<String> confirmMoney(String id) {
                return null;
            }
        };
    }
}
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java
@@ -408,7 +408,7 @@
        TFranchiseeBalanceChange tFranchiseeBalanceChange = new TFranchiseeBalanceChange();
        tFranchiseeBalanceChange.setAmount(money.multiply(new BigDecimal("0.9972")).setScale(2,BigDecimal.ROUND_DOWN));
        tFranchiseeBalanceChange.setAmount(money.multiply(new BigDecimal("0.9962")).setScale(2,BigDecimal.ROUND_DOWN));
        tFranchiseeBalanceChange.setIs_pay(0);
        tFranchiseeBalanceChange.setFranchiseeName(byId.getName());
        tFranchiseeBalanceChange.setFranchiseeId(String.valueOf(byId.getId()));
@@ -1068,14 +1068,20 @@
    @ApiOperation(value = "设置加盟商操作密码【202506】", tags = {"后台-加盟商管理"})
    @PutMapping(value = "/setPayPassword")
    public R<String> setPayPassword(@RequestParam(value = "payPassword") String payPassword) {
        Long userid = tokenService.getLoginUser().getUserid();
        SysUser sysUser = sysUserService.getById(userid);
        if(Objects.isNull(sysUser.getFranchiseeId())){
            return R.fail("加盟商信息不存在!");
        List<Franchisee> franchisee = franchiseeService.list();
        for (Franchisee franchisee1 : franchisee) {
            franchisee1.setPayPassword(payPassword);
        }
        Franchisee franchisee = franchiseeService.getById(sysUser.getFranchiseeId());
        franchisee.setPayPassword(SecurityUtils.encryptPassword(payPassword));
        return franchiseeService.updateById(franchisee) ? R.ok() : R.fail();
        return franchiseeService.updateBatchById(franchisee) ? R.ok() : R.fail();
    }
    @ApiOperation(value = "获取加盟商操作密码", tags = {"后台-加盟商管理"})
    @PutMapping(value = "/getPayPassword")
    public R<String> getPayPassword() {
        List<Franchisee> franchisee = franchiseeService.list();
        if (!franchisee.isEmpty()){
            return R.ok(franchisee.get(0).getPayPassword());
        }
        return R.ok();
    }
    /**
@@ -1086,22 +1092,17 @@
    @PutMapping(value = "/balanceWithdraw")
    public R<String> balanceWithdraw(@RequestParam(value = "id") Integer id,
                                     @RequestParam(value = "payPassword") String payPassword) {
        TFranchiseeBalanceChange balanceChange = balanceChangeService.getById(id);
        Franchisee franchisee = franchiseeService.getById(balanceChange.getFranchiseeId());
        if(!SecurityUtils.matchesPassword(payPassword, franchisee.getPayPassword())){
        if(!payPassword.equals(franchisee.getPayPassword())){
            return R.fail("密码错误!");
        }
        franchisee.setBalance(franchisee.getBalance().add(balanceChange.getAmount()));
        franchiseeService.updateById(franchisee);
        // 删除操作记录
        balanceChangeService.removeById(id);
        return R.ok();
    }
}
ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/WithdrawController.java
@@ -9,10 +9,10 @@
import com.ruoyi.admin.service.WithdrawService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.exception.GlobalException;
import com.ruoyi.common.core.utils.bean.BeanUtils;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.order.api.entity.UserWithdrawRecordVO;
import com.ruoyi.order.api.entity.Withdraw;
import com.ruoyi.order.api.entity.WithdrawExportRequest;
import com.ruoyi.order.api.entity.*;
import com.ruoyi.order.api.feignClient.OrderClient;
import com.ruoyi.order.api.feignClient.WithdrawClient;
import com.ruoyi.system.api.model.LoginUser;
import io.swagger.annotations.Api;
@@ -45,6 +45,8 @@
    private WithdrawService withdrawService;
    @Resource
    private WithdrawClient withdrawClient;
    @Resource
    private OrderClient orderClient;
    @Resource
    private UserService userService;
@@ -124,7 +126,17 @@
            @ApiImplicitParam(value = "提现记录id", name = "id", dataType = "Integer", required = true)
    })
    public R<Withdraw> withdrawRecordDetail(@RequestParam Long id) {
        return withdrawClient.withdrawRecordDetail(id);
        Withdraw data = withdrawClient.withdrawRecordDetail(id).getData();
        User user = userService.getById(data.getUserId());
        UserVO userVO = new UserVO();
        BeanUtils.copyProperties(user, userVO);
        data.setUser(userVO);
        Order data1 = orderClient.detail(data.getOrderId()).getData();
        data.setSubsidy(data1.getSubsidy());
        data.setServeName(data1.getServeName());
        data.setServePrice(data1.getServePrice());
        data.setReservationAddress(data1.getReservationAddress());
        return R.ok(data);
    }
    /**
ruoyi-service/ruoyi-admin/src/main/resources/template/订单记录.xlsx
Binary files differ
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WithdrawController.java
@@ -324,7 +324,13 @@
    @GetMapping("/confirmMoney")
    R<String> confirmWithdraw(@RequestParam("id")String id){
        Withdraw withdraw = withdrawService.getById(id);
        Order order = orderService.getById(id);
        Withdraw withdraw = withdrawService.lambdaQuery()
                .eq(Withdraw::getOrderId,order.getId()).last("limit 1")
                .one();
        List<WithdrawRecord> list = withdrawRecordService.lambdaQuery().eq(WithdrawRecord::getWithdrawId, withdraw.getId())
                .eq(WithdrawRecord::getWithdrawType, 3).list();
        if (list.isEmpty()){
        WithdrawRecord withdrawRecord = new WithdrawRecord();
        withdrawRecord.setWithdrawId(withdraw.getId());
        withdrawRecord.setOrderId(withdraw.getOrderId());
@@ -333,6 +339,8 @@
        withdrawRecord.setCreateTime(new Date());
        withdrawRecord.setAuditStatus(1);
        withdrawRecordService.save(withdrawRecord);
        }
        return R.ok();
    }
    @GetMapping("/withdrawDetailByUser")
@@ -374,16 +382,17 @@
        if (null != withdraw) {
            withdrawDetailVO.setWithdrawalState(withdraw.getState());
            withdrawDetailVO.setWithdrawalTime(withdraw.getCreateTime());
            List<WithdrawRecord> list = withdrawRecordService.lambdaQuery().eq(WithdrawRecord::getOrderId, orderId)
                    .eq(WithdrawRecord::getWithdrawId, withdraw.getId())
                    .eq(WithdrawRecord::getUserId, withdraw.getUserId()).list();
            withdrawDetailVO.setWithdrawRecords(list);
        }
        withdrawDetailVO.setPackageInfo(order.getPackageInfo());
        withdrawDetailVO.setAddress(order.getAddress());
        if (null != serveRecord) {
            withdrawDetailVO.setPhoto(serveRecord.getPhoto());
        }
        List<WithdrawRecord> list = withdrawRecordService.lambdaQuery().eq(WithdrawRecord::getOrderId, orderId)
                .eq(WithdrawRecord::getWithdrawId, withdraw.getId())
                .eq(WithdrawRecord::getUserId, withdraw.getUserId()).list();
        withdrawDetailVO.setWithdrawRecords(list);
        return R.ok(withdrawDetailVO);
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WxChatPayCallBack.java
@@ -114,6 +114,7 @@
                withdrawRecord.setWithdrawType(4);
                withdrawRecord.setCreateTime(new Date());
                withdrawRecord.setAuditStatus(1);
                withdrawRecordService.save(withdrawRecord);
            }else if ("CANCELLED".equals(state)||"CANCELING".equals(state)||"FAIL".equals(state)){
@@ -175,7 +176,10 @@
                    com.alibaba.fastjson2.JSONObject.toJSONString(postMap),
                    "7EEA04429B006E12AAA421C002EC48BBEED5BE94",
                    "1665330417",
                    "/usr/local/vx/apiclient_key.pem", WechatConstants.WE_CHAT_URL_SUF);
//                    "/usr/local/vx/apiclient_key.pem",
                    "D:\\apiclient_key.pem",
                    WechatConstants.WE_CHAT_URL_SUF);
            com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(result);
//            WithdrawDetail withdrawDetail = new WithdrawDetail();
//            withdrawDetail.setWithdrawId(withdrawId);
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/User.java
New file
@@ -0,0 +1,62 @@
package com.ruoyi.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
 * <p>
 * 用户列表
 * </p>
 *
 * @author hjl
 * @since 2024-05-29
 */
@Getter
@Setter
@TableName("t_user")
@ApiModel(value = "User对象", description = "用户列表")
public class User extends BaseEntity {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("用户id")
    @TableField("user_no")
    private String userNo;
    @ApiModelProperty("注册城市")
    @TableField("city")
    private String city;
    @ApiModelProperty("城市编码")
    @TableField("city_code")
    private String cityCode;
    @ApiModelProperty("用户昵称")
    @TableField("nickname")
    private String nickname;
    @ApiModelProperty("手机号")
    @TableField("phone")
    private String phone;
    @ApiModelProperty("头像")
    @TableField("profile_picture")
    private String profilePicture;
    @ApiModelProperty("账号状态 0未启用;1已启用")
    @TableField("state")
    private Integer state;
    @ApiModelProperty("微信OpenId")
    @TableField("open_id")
    private String openId;
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/Withdraw.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.user.api.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@@ -72,6 +73,9 @@
    @ApiModelProperty("城市code")
    @TableField("city_code")
    private String cityCode;
    @ApiModelProperty("用户信息")
    @TableField(exist = false)
    private User user;
    @ApiModelProperty("提现进度")
    @TableField(exist = false)
    private List<WithdrawRecord> withdrawRecords;
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/entity/WithdrawRecord.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -31,7 +32,7 @@
    private Integer id;
    @ApiModelProperty("提现记录id")
    @TableField(value = "withdraw_id")
    @TableField(value = "withdrawId")
    private String withdrawId;
    @ApiModelProperty("订单id")
@@ -46,6 +47,7 @@
    private Integer withdrawType;
    @ApiModelProperty("创建时间")
    @TableField("createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @ApiModelProperty("审核结果 1=通过 0=拒绝")
    @TableField("auditStatus")
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/WithdrawServiceImpl.java
@@ -398,7 +398,10 @@
                    JSONObject.toJSONString(postMap),
                    "7EEA04429B006E12AAA421C002EC48BBEED5BE94",
                    "1665330417",
                    "/usr/local/vx/apiclient_key.pem", "/v3/fund-app/mch-transfer/transfer-bills");
                    "D:\\apiclient_key.pem",
//                    "/usr/local/vx/apiclient_key.pem",
                    "/v3/fund-app/mch-transfer/transfer-bills");
            JSONObject jsonObject = JSONObject.parseObject(result);
//            WithdrawDetail withdrawDetail = new WithdrawDetail();
//            withdrawDetail.setWithdrawId(withdrawId);
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/task/TaskUtil.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.constant.WechatConstants;
import com.ruoyi.common.core.exception.GlobalException;
import com.ruoyi.common.core.vo.UserDto;
import com.ruoyi.order.entity.Order;
import com.ruoyi.order.entity.Withdraw;
@@ -21,10 +22,7 @@
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
/**
@@ -48,7 +46,7 @@
    @Scheduled(fixedRate = 1000 * 3600)
    public void taskMinute(){
        try {
            List<Withdraw> list1 = withdrawService.list();
            List<Withdraw> list1 = withdrawService.lambdaQuery().eq(Withdraw::getId,"1938794177477832705").list();
            List<WithdrawDetail> list = withdrawDetailService.lambdaQuery()
                    .isNotNull(WithdrawDetail::getOutBatchNo).ne(WithdrawDetail::getStatus, "SUCCESS").list();
@@ -61,7 +59,9 @@
                String s1 = HttpUtil.queryTransBatRequest(WechatConstants.WE_CHAT_PAY_QUERY_URL_PRE + s,
                        "7EEA04429B006E12AAA421C002EC48BBEED5BE94",
                        "1665330417",
                        "D:\\apiclient_key.pem", WechatConstants.WE_CHAT_QUERY_URL_SUF + s);
//                        "/usr/local/vx/apiclient_key.pem",
                        "D:\\apiclient_key.pem",
                        WechatConstants.WE_CHAT_QUERY_URL_SUF + s);
                System.err.println(s1);
                JSONObject jsonObject = JSONObject.parseObject(s1);
                String string = jsonObject.getString("state");
@@ -71,7 +71,7 @@
                        orderService.updateById(order);
                        withdrawDetail.setStatus("SUCCESS");
                        withdrawDetailService.updateById(withdrawDetail);
                    } else if (s.equals("FAIL")||s.equals("CANCELING")||s.equals("CANCELLED")) {
                    } else if (string.equals("FAIL")||string.equals("CANCELING")||string.equals("CANCELLED")) {
                        // 重新发起一笔转账
                        withdrawDetail.setStatus("FAIL");
                        withdrawDetailService.updateById(withdrawDetail);
@@ -108,28 +108,39 @@
            Map<String, Object> postMap = new HashMap<>(8);
            postMap.put(WechatConstants.APP_ID, "wx98563d0ec9cf21c8");
            // 订单号
            String s = String.valueOf(UUID.randomUUID()).replaceAll("-", "");
            postMap.put("out_bill_no", s);
            postMap.put("out_bill_no", String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
            System.err.println("====="+postMap.get("out_bill_no"));
            postMap.put(WechatConstants.OPEN_ID, openId);
            // 转账金额
            postMap.put("transfer_amount", transferAmount);
            postMap.put("transfer_scene_id", "1010");
            // 转账备注
            postMap.put("transfer_remark", "二手回收提现确认收款");
            // 回调地址
            postMap.put("notify_url", "https://hyhsbqgc.com/api/ruoyi-order/wx/wxChatPay");
            // 转账场景报备信息
            List<Map<String, Object>> list = new ArrayList<>();
            Map<String, Object> info = new HashMap<>();
            info.put("info_type","回收商品名称");
            info.put("info_content",serverName);
            postMap.put("transfer_scene_report_infos", com.alibaba.fastjson2.JSONObject.toJSONString(info));
            list.add(info);
            postMap.put("transfer_scene_report_infos", list);
            String result = HttpUtil.postTransBatRequest(
                    WechatConstants.WE_CHAT_PAY_URL_PRE,
                    com.alibaba.fastjson2.JSONObject.toJSONString(postMap),
                    "7EEA04429B006E12AAA421C002EC48BBEED5BE94",
                    "1665330417",
                    "/usr/local/vx/apiclient_key.pem", WechatConstants.WE_CHAT_URL_SUF);
                    "D:\\apiclient_key.pem",
//                    "/usr/local/vx/apiclient_key.pem",
                    "/v3/fund-app/mch-transfer/transfer-bills");
            com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(result);
//            WithdrawDetail withdrawDetail = new WithdrawDetail();
//            withdrawDetail.setWithdrawId(withdrawId);
//            withdrawDetail.setMoney(transferAmount);
//            withdrawDetail.setOutBatchNo((String) postMap.get(WechatConstants.OUT_BATCH_NO));
//            withdrawDetailService.save(withdrawDetail);
            System.err.println(jsonObject);
//            WithdrawDetail withdrawDetail = new WithdrawDetail();
//            withdrawDetail.setWithdrawId(withdrawId);
//            withdrawDetail.setMoney(transferAmount);
@@ -138,23 +149,33 @@
            if (jsonObject.containsKey(WechatConstants.CREATE_TIME)) {
                String string = jsonObject.getString("package_info");
                Withdraw withdraw = withdrawService.getById(withdrawId);
                WithdrawDetail one = withdrawDetailService.lambdaQuery().eq(WithdrawDetail::getWithdrawId, withdrawId).last("limit 1").one();
                Order order = orderService.getById(withdraw.getOrderId());
                order.setIsWithdrawal(2);
                order.setPackageInfo(string);
                orderService.updateById(order);
                // 转账成功
                //保存转账明细
                WithdrawDetail one = withdrawDetailService.lambdaQuery().eq(WithdrawDetail::getWithdrawId, withdrawId).last("limit 1")
                        .one();
                if (one!=null){
                    one.setOutBatchNo(s);
                    one.setOutBatchNo(postMap.get("out_bill_no")+"");
                    one.setStatus("PENDING");
                    withdrawDetailService.updateById(one);
                    Order order = orderService.getById(withdraw.getOrderId());
                    order.setPackageInfo(string);
                    order.setIsWithdrawal(2);
                    orderService.updateById(order);
                }
            } else {
                allTransfersSuccessful = false;
                break;
                    WithdrawDetail withdrawDetail = new WithdrawDetail();
                    withdrawDetail.setWithdrawId(withdrawId);
                    withdrawDetail.setMoney(transferAmount);
                    withdrawDetail.setOutBatchNo(postMap.get("out_bill_no")+"");
                    withdrawDetailService.save(withdrawDetail);
            }
            } else {
                throw new GlobalException("提现失败,失败原因:"+jsonObject.getString("message"));
//                allTransfersSuccessful = false;
//                break;
        }
        }
        return allTransfersSuccessful;
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vx/TestWxPay.java
@@ -53,7 +53,10 @@
                    JSONObject.toJSONString(postMap),
                    "7EEA04429B006E12AAA421C002EC48BBEED5BE94",
                    "1665330417",
                    "/usr/local/vx/apiclient_key.pem", "/v3/fund-app/mch-transfer/transfer-bills");
//                    "/usr/local/vx/apiclient_key.pem",
                    "D:\\apiclient_key.pem",
                    "/v3/fund-app/mch-transfer/transfer-bills");
            JSONObject jsonObject = JSONObject.parseObject(result);
//            WithdrawDetail withdrawDetail = new WithdrawDetail();
//            withdrawDetail.setWithdrawId(withdrawId);
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -506,6 +506,7 @@
        ,o.server_name
        ,o.server_phone
        ,o.remark
        ,o.reservation_remark
        from t_order o
        <where>