| | |
| | | stateObj = 1; |
| | | // 支付宝提现 |
| | | String certNo = ""; |
| | | String name = ""; |
| | | if (tPubWithdrawal.getUserType()==1){ |
| | | TUser tUser = userService.selectById(tPubWithdrawal.getUserId()); |
| | | certNo = tUser.getIdCard(); |
| | | name = tUser.getName(); |
| | | |
| | | }else{ |
| | | TDriver tDriver = driverService.selectById(tPubWithdrawal.getUserId()); |
| | | certNo = tDriver.getIdCard(); |
| | | name = tDriver.getName(); |
| | | } |
| | | if (SinataUtil.isEmpty(name)){ |
| | | return ResultUtil.error("提现失败:用户未保存真实姓名!"); |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String code = sdf.format(new Date()) + UUIDUtil.getNumberRandom(5); |
| | | String s = AlipayUtils.aliWithdrawal(code, tPubWithdrawal.getMoney() + "", tPubWithdrawal.getCode(), certNo); |
| | | String s = AlipayUtils.aliWithdrawal(code, tPubWithdrawal.getMoney() + "", tPubWithdrawal.getCode(), certNo, name); |
| | | JSONObject res = JSONObject.parseObject(s); |
| | | JSONObject alipayFundTransUniTransferResponse = res.getJSONObject("alipay_fund_trans_uni_transfer_response"); |
| | | if (alipayFundTransUniTransferResponse!=null){ |
| | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | // public static void main(String[] args) throws AlipayApiException { |
| | | // SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | // String code = sdf.format(new Date()) + UUIDUtil.getNumberRandom(5); |
| | | // String s = AlipayUtils.aliWithdrawal(code, 1 + "", "19983174515", "513902200006257079","周帅"); |
| | | // JSONObject res = JSONObject.parseObject(s); |
| | | // JSONObject alipayFundTransUniTransferResponse = res.getJSONObject("alipay_fund_trans_uni_transfer_response"); |
| | | // if (alipayFundTransUniTransferResponse!=null){ |
| | | // if (alipayFundTransUniTransferResponse.getString("status").equals("Success")){ |
| | | // String string = alipayFundTransUniTransferResponse.getString("order_id"); |
| | | // }else{ |
| | | // System.err.println("提现失败"+alipayFundTransUniTransferResponse.getString("msg")); |
| | | // } |
| | | // } |
| | | // } |
| | | /** |
| | | * 修改提现列表 |
| | | */ |