| | |
| | | // 从商户余额分账到用户分账接收方 |
| | | JSONObject jsonObject = JuHeFuUtil.balancePay("CZ"+replace, byId.getFenzhangId(), bigDecimal1 + "" |
| | | , "https://xq.xqzhihui.com/api/user/client/app-user-withdraw/base/callback"); |
| | | |
| | | if (jsonObject.getString("error_msg")!=null){ |
| | | System.err.println("从商户余额分账到用户分账接收方报错异常"+jsonObject.getString("error_msg")); |
| | | |
| | | return R.fail("系统繁忙,5分钟后重试"); |
| | | // return R.fail(jsonObject.getString("error_msg")); |
| | | } |
| | | JSONObject jsonObject2 = JuHeFuUtil.balanceWithdraw("TX"+replace, bigDecimal1+"", byId.getFenzhangId(), |
| | | "https://xq.xqzhihui.com/api/user/client/app-user-withdraw/base/callbackA"); |
| | | if (jsonObject2.getString("error_msg")!=null){ |
| | | System.err.println("提现异常原因"+jsonObject2.getString("error_msg")); |
| | | |
| | | return R.fail("系统繁忙,5分钟后重试"); |
| | | } |
| | | System.err.println("执行完毕====="); |
| | |
| | | String s1 = "FZ" + time + s; |
| | | String user = JuHeFuUtil.createUser(s1, appUserWithdraw.getCardholder(), "00", |
| | | appUserWithdraw.getIdentityCard(), appUserWithdraw.getCellPhone(), appUserWithdraw.getCardNo()); |
| | | appUserWithdraw.setFenzhangId(s1); |
| | | appUserBankService.updateById(appUserWithdraw); |
| | | if (user.equals("success")){ |
| | | byId.setFenzhangId(s1); |
| | | appUserService.updateById(byId); |
| | | }else{ |
| | | return R.fail("添加银行卡失败,错误信息:"+user); |
| | | } |
| | | } |
| | | return R.ok(); |