Merge remote-tracking branch 'origin/master'
| | |
| | | // 结算卡信息 |
| | | JSONObject cardInfo = new JSONObject(); |
| | | cardInfo.put("card_type", "1"); |
| | | cardInfo.put("card_name", userWithdrawal.getBindAcctName()); |
| | | cardInfo.put("card_name", userWithdrawal.getOpenAccountName()); |
| | | cardInfo.put("card_no", userWithdrawal.getBankCardCode()); |
| | | cardInfo.put("prov_id", userWithdrawal.getBankCardProvinceCode()); |
| | | cardInfo.put("area_id", userWithdrawal.getBankCardCityCode()); |
| | |
| | | * DM:当日到账;到账资金不包括当天的交易资金; |
| | | * 示例值:T1 |
| | | */ |
| | | cashConfig.put("switch_state", "1"); |
| | | cashConfig.put("cash_type", "D1"); |
| | | cashConfig.put("fix_amt", "0.00"); |
| | | cashConfig.put("weekday_fix_amt", "0.00"); |
| | |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/trade/acctpayment/balance/query", paramsInfo, null, false); |
| | | log.info("账户余额信息查询返回参数:{}", response); |
| | | JSONArray accountList = JSONArray.parseArray(JSONObject.toJSONString(response.get("acctInfo_list"))); |
| | | JSONArray accountList = JSONArray.parseArray(response.get("acctInfo_list").toString()); |
| | | if (accountList != null && !accountList.isEmpty()) { |
| | | JSONObject acctInfo = accountList.getJSONObject(0); |
| | | log.info("账户余额信息查询返回余额:{}", acctInfo.getString("avail_bal")); |
| | |
| | | if(null == driver.getLaveActivityMoney()){ |
| | | return ResultUtil.error("账户没有余额,不能提现"); |
| | | } |
| | | if(driver.getLaveActivityMoney().compareTo(money) < 0){ |
| | | return ResultUtil.error("提现金额必须小于账户余额"); |
| | | } |
| | | // if(driver.getLaveActivityMoney().compareTo(money) < 0){ |
| | | // return ResultUtil.error("提现金额必须小于账户余额"); |
| | | // } |
| | | withdrawal.setBalance(driver.getLaveActivityMoney()); |
| | | } |
| | | if(type == 2){ |
| | |
| | | |
| | | userBankAccount.setUserId(driverId); |
| | | userBankAccount.setBankName(userWithdrawal.getBankName()); |
| | | userBankAccount.setBankCardProvinceCode(userWithdrawal.getBankCardProvinceCode()); |
| | | userBankAccount.setBankCardCityCode(userWithdrawal.getBankCardCityCode()); |
| | | userBankAccountService.insert(userBankAccount); |
| | | |
| | | |
| | |
| | | UserInfo userInfo1 = userInfoService.selectById(uid); |
| | | // 查询银行卡的银行连号和编号 |
| | | UserBankAccount bankCard = bankAccountService.selectOne(new EntityWrapper<UserBankAccount>() |
| | | .eq("bankCardCode", code).eq("phone",userInfo1.getPhone()) |
| | | .eq("bankCardCode", code).eq("phone",userInfo1.getPhone()).eq("status",1) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(bankCard)){ |
| | | return ResultUtil.runErr("该银行卡不存在!"); |
| | |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 请求流水号 |
| | | paramsInfo.put("req_seq_id", "rQ20252119164e1667715e"); |
| | | paramsInfo.put("req_seq_id", "rQ20252119164e1617715e"); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", "20251125"); |
| | | // 出款方商户号 |
| | |
| | | // 支付金额 |
| | | paramsInfo.put("ord_amt", "0.01"); |
| | | // 分账对象 |
| | | paramsInfo.put("acct_split_bunch", "{\"acct_infos\":[{\"div_amt\":\"0.01\",\"huifu_id\":\"6666000183997312\"}]}"); |
| | | paramsInfo.put("acct_split_bunch", "{\"acct_infos\":[{\"div_amt\":\"0.01\",\"huifu_id\":\"6666000183987699\"}]}"); |
| | | // 安全信息 |
| | | paramsInfo.put("risk_check_data", "{\"sub_product\":\"1\",\"transfer_type\":\"05\"}"); |
| | | // 手续费承担方标识余额支付手续费承担方标识;商户余额支付扣收规则为接口指定承担方时必填!枚举值:<br/>OUT:出款方;<br/>IN:分账接受方。<br/><font color="green">示例值:IN</font> |