| | |
| | | package com.stylefeng.guns.modular.account.controller; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.account.model.TBankNext; |
| | |
| | | import com.stylefeng.guns.modular.cloudPayment.req.AllocationReq; |
| | | import com.stylefeng.guns.modular.cloudPayment.req.BalanceAcctReq; |
| | | import com.stylefeng.guns.modular.cloudPayment.req.UserBankAccountReq; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongBasicDataBiz; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.IBankCardService; |
| | | import com.stylefeng.guns.modular.system.service.ICompanyService; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @Api(tags = "司机进件(提现操作)/创建电子账簿") |
| | |
| | | private final IDriverService driverService; |
| | | private final ICompanyService companyService; |
| | | private final ITBankNextService bankNextService; |
| | | private final DouGongBasicDataBiz douGongBasicDataBiz; |
| | | |
| | | @Autowired |
| | | public UserWithdrawalController(ElectronicLedgerService electronicLedgerService, UserWithdrawalService userWithdrawalService, UserBankAccountService userBankAccountService, IBankCardService bankCardService, IDriverService driverService, ICompanyService companyService, ITBankNextService bankNextService) { |
| | | public UserWithdrawalController(ElectronicLedgerService electronicLedgerService, UserWithdrawalService userWithdrawalService, UserBankAccountService userBankAccountService, IBankCardService bankCardService, IDriverService driverService, ICompanyService companyService, ITBankNextService bankNextService, DouGongBasicDataBiz douGongBasicDataBiz) { |
| | | this.electronicLedgerService = electronicLedgerService; |
| | | this.userWithdrawalService = userWithdrawalService; |
| | | this.userBankAccountService = userBankAccountService; |
| | |
| | | this.driverService = driverService; |
| | | this.companyService = companyService; |
| | | this.bankNextService = bankNextService; |
| | | this.douGongBasicDataBiz = douGongBasicDataBiz; |
| | | } |
| | | |
| | | |
| | |
| | | userWithdrawalReq.setBankName(userWithdrawalReq.getBankName().replace("& #41;",")")); |
| | | } |
| | | |
| | | userWithdrawalReq.setCopy1(userWithdrawalReq.getCopy1().replaceAll(" ","+")); |
| | | userWithdrawalReq.setCopy2(userWithdrawalReq.getCopy2().replaceAll(" ","+")); |
| | | //userWithdrawalReq.setCopy1(userWithdrawalReq.getCopy1().replaceAll(" ","+")); |
| | | //userWithdrawalReq.setCopy2(userWithdrawalReq.getCopy2().replaceAll(" ","+")); |
| | | // 用户进件 |
| | | // 获取当前用户id |
| | | Integer driverId = null; |
| | |
| | | } |
| | | // 查询司机 |
| | | // Driver driver = driverService.selectById(id); |
| | | |
| | | Driver driver = driverService.selectById(driverId); |
| | | List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone",driver.getPhone()).eq("type", 1)); |
| | | if (CollUtil.isNotEmpty(userWithdrawals)) { |
| | | return ResultUtil.error("该手机号已绑定进件信息"); |
| | | } |
| | | userWithdrawalReq.setOutRequestNo(ToolUtil.getRandomString(32)); |
| | | UserWithdrawal userWithdrawal = new UserWithdrawal(); |
| | | BeanUtils.copyProperties(userWithdrawalReq,userWithdrawal); |
| | | |
| | | String password = userWithdrawal.getTransactionAuthorizationCode(); |
| | | //String password = userWithdrawal.getTransactionAuthorizationCode(); |
| | | userWithdrawal.setOutRequestNo(ToolUtil.getRandomString(32)); |
| | | try { |
| | | // 司机进件 |
| | | CusApplicationResp cusApplicationResp = CusApplicationExample.create(userWithdrawalReq); |
| | | System.out.println(cusApplicationResp); |
| | | Map<String, Object> resultMap = douGongBasicDataBiz.userBasicDataIndv(userWithdrawalReq); |
| | | String respCode = (String) resultMap.get("resp_code"); |
| | | if(!"00000000".equals(respCode)) { |
| | | return ResultUtil.error((String) resultMap.get("resp_desc")); |
| | | } |
| | | //CusApplicationResp cusApplicationResp = CusApplicationExample.create(userWithdrawalReq); |
| | | //System.out.println(cusApplicationResp); |
| | | // 交易授权码加密,并保存司机进件信息 |
| | | userWithdrawal.setTransactionAuthorizationCode(Base64Util.encode(userWithdrawal.getTransactionAuthorizationCode())); |
| | | //userWithdrawal.setTransactionAuthorizationCode(Base64Util.encode(userWithdrawal.getTransactionAuthorizationCode())); |
| | | // userWithdrawal.setUserId(userWithdrawal.getUserId()); |
| | | userWithdrawal.setUserId(driverId); |
| | | userWithdrawal.setUserType(2); |
| | |
| | | userWithdrawal.setImgUrlOne(userWithdrawalReq.getIdCardReversePicture()); |
| | | userWithdrawal.setIdCardFrontPicture(userWithdrawalReq.getCopy1()); |
| | | userWithdrawal.setIdCardReversePicture(userWithdrawalReq.getCopy2()); |
| | | userWithdrawal.setHuiFuId((String) resultMap.get("huifu_id")); |
| | | //调用汇付业务入驻接口 |
| | | Map<String, Object> map = douGongBasicDataBiz.userBusinessOpen(userWithdrawal); |
| | | if (!"00000000".equals(map.get("resp_code"))){ |
| | | return ResultUtil.error((String) map.get("resp_desc")); |
| | | } |
| | | String tokenNo = (String) map.get("token_no"); |
| | | userWithdrawal.setTokenNo(tokenNo); |
| | | userWithdrawalService.insert(userWithdrawal); |
| | | |
| | | // 通过司机进件信息封装银行卡信息进行数据库存储 |
| | |
| | | userBankAccountService.insert(userBankAccount); |
| | | |
| | | // 判断是否开户成功 |
| | | if("succeeded".equals(cusApplicationResp.getApplicationStatus())){ |
| | | |
| | | // 开户将司机进件返回的信息进行保存 |
| | | userWithdrawalService.cusApplicationRespToUserWithdrawal(userWithdrawal,cusApplicationResp); |
| | | userWithdrawalService.updateById(userWithdrawal); |
| | | System.out.println("开户将司机进件返回的信息"); |
| | | //userWithdrawalService.cusApplicationRespToUserWithdrawal(userWithdrawal,cusApplicationResp); |
| | | //userWithdrawalService.updateById(userWithdrawal); |
| | | //System.out.println("开户将司机进件返回的信息"); |
| | | // 开户成功,开通电子账户,绑定账户 |
| | | // 开通电子账簿 |
| | | // BalanceAcctReq balanceAcctReq = electronicLedgerService.createBalanceAcctReq(userWithdrawal.getCusId(),password); |
| | | // BalanceAcctStoreResp balanceAcctStoreResp = BalanceAcctExample.create(balanceAcctReq); |
| | | |
| | | // 开通电子账簿成功,封装实体 |
| | | ElectronicLedger electronicLedger = electronicLedgerService.createElectronicLedger(cusApplicationResp,userWithdrawal,password); |
| | | System.out.println("开通电子账簿成功,封装实体11111"); |
| | | electronicLedgerService.insert(electronicLedger); |
| | | System.out.println("开通电子账簿成功,封装实体22222"); |
| | | //ElectronicLedger electronicLedger = electronicLedgerService.createElectronicLedger(cusApplicationResp,userWithdrawal,password); |
| | | //System.out.println("开通电子账簿成功,封装实体11111"); |
| | | //electronicLedgerService.insert(electronicLedger); |
| | | //System.out.println("开通电子账簿成功,封装实体22222"); |
| | | |
| | | // 绑定银行卡 |
| | | // UserBankAccountReq userBankAccountReq = electronicLedgerService.createUserBankAccountReq(bankCard,userWithdrawal.getCusId(),userWithdrawal.getCode()); |
| | |
| | | // bankCard.setAcctValidationFinishedAt(settleAcctResp.getAcctValidationFinishedAt()); |
| | | // bankCardService.updateById(bankCard); |
| | | return ResultUtil.success(); |
| | | } |
| | | if("failed".equals(cusApplicationResp.getApplicationStatus())){ |
| | | List<FailureMsgParam> failureMsgs = cusApplicationResp.getFailureMsgs(); |
| | | if(failureMsgs != null && failureMsgs.size()>0){ |
| | | return ResultUtil.error(failureMsgs.get(0).getReason()); |
| | | } |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (UpyztException e){ |
| | | e.printStackTrace(); |
| | | if(e.getCode().equals("100101")){ |
| | | return ResultUtil.error(e.getIssue()); |
| | | } |
| | | return ResultUtil.error(e.getMessage()); |
| | | } catch (Exception e){ |
| | | return ResultUtil.error(e.getMessage()); |
| | | } |
| | |
| | | UserWithdrawal userWithdrawal1 = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() |
| | | .eq("userId",driver.getId()) |
| | | .eq("userType",2) |
| | | .eq("type", 1) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(userWithdrawal1)){ |
| | | return ResultUtil.error("请先进行个人用户进件信息填写"); |
| | |
| | | userWithdrawal.setCertificateExpireTime(certificateExpireTime); |
| | | userWithdrawal.setOpenAccountName(openAccountName); |
| | | userWithdrawal.setBankCardCode(bankCardCode); |
| | | userWithdrawal.setCusId(userWithdrawal1.getCusId()); |
| | | //userWithdrawal.setCusId(userWithdrawal1.getCusId()); |
| | | userWithdrawal.setPhone(phone); |
| | | userWithdrawal.setBankCode(bankCode); |
| | | userWithdrawal.setBankBranchCode(bankBranchCode); |
| | | userWithdrawal.setCode(code); |
| | | System.out.println(userWithdrawal); |
| | | CusApplicationResp renew = CusApplicationExample.renew(userWithdrawal); |
| | | System.out.println("修改个人用户进件信息返回:{}"+renew); |
| | | if("succeeded".equals(renew.getApplicationStatus())){ |
| | | System.out.println("修改成功"); |
| | | Map<String, Object> resultMap = douGongBasicDataBiz.userBasicDataIndvModify(userWithdrawal); |
| | | //CusApplicationResp renew = CusApplicationExample.renew(userWithdrawal); |
| | | //System.out.println("修改个人用户进件信息返回:{}"+renew); |
| | | if (!"00000000".equals(resultMap.get("resp_code"))){ |
| | | return ResultUtil.error((String) resultMap.get("resp_desc")); |
| | | } |
| | | //用户业务入驻修改 |
| | | Map<String, Object> map = douGongBasicDataBiz.userBusinessOpenModify(userWithdrawal); |
| | | if (!"00000000".equals(map.get("resp_code"))){ |
| | | return ResultUtil.error((String) map.get("resp_desc")); |
| | | } |
| | | userWithdrawal1.setIdCardFrontPicture(copy1); |
| | | userWithdrawal1.setIdCardReversePicture(copy2); |
| | | userWithdrawal1.setImgUrl(idCardFrontPicture); |
| | |
| | | userBankAccountService.insert(userBankAccount); |
| | | System.out.println("该银行卡账户添加成功"); |
| | | } |
| | | } |
| | | if("failed".equals(renew.getApplicationStatus())){ |
| | | List<FailureMsgParam> failureMsgs = renew.getFailureMsgs(); |
| | | if(failureMsgs != null && failureMsgs.size()>0){ |
| | | return ResultUtil.error(failureMsgs.get(0).getReason()); |
| | | } |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (UpyztException e){ |
| | | e.printStackTrace(); |
| | | if(e.getCode().equals("100101")){ |
| | | return ResultUtil.error(e.getIssue()); |
| | | } |
| | | return ResultUtil.error(e.getMessage()); |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.error(e.getMessage()); |
| | |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | Driver driver = driverService.selectById(driverId); |
| | | List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("userId",driver.getId()) |
| | | .eq("userType",2)); |
| | | List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone",driver.getPhone()).eq("type", 1)); |
| | | if(userWithdrawals.size()==0){ |
| | | return ResultUtil.success("yes"); |
| | | } |
| | |
| | | .eq("userId",driver.getId()) |
| | | .eq("userType",2) |
| | | .eq("applicationStatus","succeeded") |
| | | .eq("type", 1) |
| | | .last("LIMIT 1")); |
| | | if(Objects.isNull(userWithdrawal)){ |
| | | return ResultUtil.success(new Object()); |
| | |
| | | // TODO 司机进件信息 |
| | | List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>() |
| | | .eq("userId", driver.getId()) |
| | | .eq("userType",2)); |
| | | .eq("userType",2) |
| | | .eq("type", 1)); |
| | | if(userWithdrawals.size()==0){ |
| | | return ResultUtil.error("请先进行个人用户进件信息填写"); |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.huifu.biz; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.huifu.bspay.sdk.opps.core.BasePay; |
| | | import com.huifu.bspay.sdk.opps.core.config.MerConfig; |
| | | import com.huifu.bspay.sdk.opps.core.net.BasePayRequest; |
| | | import com.stylefeng.guns.core.util.RequestSeqUtil; |
| | | import com.stylefeng.guns.modular.account.req.UserWithdrawalReq; |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import com.stylefeng.guns.modular.system.model.UserWithdrawal; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 斗拱进件业务 |
| | | * @author mitao |
| | | * @date 2025/11/14 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class DouGongBasicDataBiz { |
| | | @Autowired |
| | | private HuiFuProperties huiFuProperties; |
| | | |
| | | /** |
| | | * 个人用户基本信息开户 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public Map<String, Object> userBasicDataIndv(UserWithdrawal userWithdrawal) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | merConfig.setSysId(huiFuProperties.getSysId()); |
| | | merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 请求流水号(动态生成,确保唯一性) |
| | | paramsInfo.put("req_seq_id", RequestSeqUtil.generateForHuiFu()); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", DateUtil.format(new Date(),"yyyyMMdd")); |
| | | // 个人证件类型 |
| | | paramsInfo.put("cert_type", "00"); |
| | | String[] certificateExpireDateArr = userWithdrawal.getCertificateExpireTime().split(","); |
| | | String startDateStr = certificateExpireDateArr[0]; |
| | | // 个人证件有效期开始日期 |
| | | paramsInfo.put("cert_begin_date", startDateStr.replace("-", "")); |
| | | // 个人证件有效期截止日期 |
| | | String endDateStr = certificateExpireDateArr[1]; |
| | | if (!"长期".equals(endDateStr)) { |
| | | String formatEndDate = endDateStr.replace("-", ""); |
| | | paramsInfo.put("cert_end_date", formatEndDate); |
| | | // 个人证件有效期类型 |
| | | paramsInfo.put("cert_validity_type", "0"); |
| | | }else { |
| | | // 个人证件有效期类型 |
| | | paramsInfo.put("cert_validity_type", "1"); |
| | | } |
| | | // 手机号 |
| | | paramsInfo.put("mobile_no", userWithdrawal.getPhone()); |
| | | // 个人姓名 |
| | | paramsInfo.put("name", userWithdrawal.getOpenAccountName()); |
| | | // 个人证件号码 |
| | | paramsInfo.put("cert_no", userWithdrawal.getCertificateCode()); |
| | | // 是否发送短信标识 |
| | | paramsInfo.put("sms_send_flag", "1"); |
| | | // 3. 发起API调用 |
| | | log.info("个人用户基本信息开户请求参数:{}", paramsInfo); |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/basicdata/indv", paramsInfo, null, false); |
| | | log.info("个人用户基本信息开户返回参数:{}", response); |
| | | return response; |
| | | } |
| | | /** |
| | | * 个人用户基本信息修改 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public Map<String, Object> userBasicDataIndvModify(UserWithdrawal userWithdrawal) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | merConfig.setSysId(huiFuProperties.getSysId()); |
| | | merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 请求流水号 |
| | | paramsInfo.put("req_seq_id", RequestSeqUtil.generateForHuiFu()); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", DateUtil.format(new Date(),"yyyyMMdd")); |
| | | // 汇付客户Id |
| | | paramsInfo.put("huifu_id", userWithdrawal.getHuiFuId()); |
| | | String[] certificateExpireDateArr = userWithdrawal.getCertificateExpireTime().split(","); |
| | | String startDateStr = certificateExpireDateArr[0]; |
| | | // 个人证件有效期开始日期 |
| | | paramsInfo.put("cert_begin_date", startDateStr.replace("-", "")); |
| | | // 个人证件有效期截止日期 |
| | | String endDateStr = certificateExpireDateArr[1]; |
| | | if (!"长期".equals(endDateStr)) { |
| | | String formatEndDate = endDateStr.replace("-", ""); |
| | | paramsInfo.put("cert_end_date", formatEndDate); |
| | | // 个人证件有效期类型 |
| | | paramsInfo.put("cert_validity_type", "0"); |
| | | }else { |
| | | // 个人证件有效期类型 |
| | | paramsInfo.put("cert_validity_type", "1"); |
| | | } |
| | | // 手机号 |
| | | paramsInfo.put("mobile_no", userWithdrawal.getPhone()); |
| | | log.info("个人用户基本信息修改返回参数:{}", paramsInfo); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/basicdata/indv/modify", paramsInfo, null, false); |
| | | log.info("个人用户基本信息修改返回参数:{}", response); |
| | | return response; |
| | | } |
| | | /** |
| | | * 用户业务入驻 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public Map<String, Object> userBusinessOpen(UserWithdrawal userWithdrawal) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | merConfig.setSysId(huiFuProperties.getSysId()); |
| | | merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 汇付ID |
| | | paramsInfo.put("huifu_id", userWithdrawal.getHuiFuId()); |
| | | // 请求流水号 |
| | | paramsInfo.put("req_seq_id", RequestSeqUtil.generateForHuiFu()); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", DateUtil.format(new Date(),"yyyyMMdd")); |
| | | // 渠道商/商户汇付Id |
| | | paramsInfo.put("upper_huifu_id", huiFuProperties.getUpperHuifuId()); |
| | | //// 结算信息配置 |
| | | //paramsInfo.put("settle_config", "{\"settle_cycle\":\"D1\",\"min_amt\":\"0.01\",\"remained_amt\":\"10.00\",\"settle_abstract\":\"结算摘要\",\"out_settle_flag\":\"2\",\"settle_batch_no\":\"300\",\"fixed_ratio\":\"2\"}"); |
| | | // 结算卡信息 |
| | | JSONObject cardInfo = new JSONObject(); |
| | | cardInfo.put("card_type", "1"); |
| | | cardInfo.put("card_name", userWithdrawal.getBindAcctName()); |
| | | cardInfo.put("card_no", userWithdrawal.getBankCardCode()); |
| | | cardInfo.put("prov_id", userWithdrawal.getBankCardProvinceCode()); |
| | | cardInfo.put("area_id", userWithdrawal.getBankCardCityCode()); |
| | | cardInfo.put("cert_type", "00"); |
| | | cardInfo.put("cert_no", userWithdrawal.getCertificateCode()); |
| | | String[] certificateExpireDateArr = userWithdrawal.getCertificateExpireTime().split(","); |
| | | String startDateStr = certificateExpireDateArr[0]; |
| | | // 个人证件有效期开始日期 |
| | | cardInfo.put("cert_begin_date", startDateStr.replace("-", "")); |
| | | // 个人证件有效期截止日期 |
| | | String endDateStr = certificateExpireDateArr[1]; |
| | | if (!"长期".equals(endDateStr)) { |
| | | String formatEndDate = endDateStr.replace("-", ""); |
| | | cardInfo.put("cert_end_date", formatEndDate); |
| | | // 个人证件有效期类型 |
| | | cardInfo.put("cert_validity_type", "0"); |
| | | }else { |
| | | // 个人证件有效期类型 |
| | | cardInfo.put("cert_validity_type", "1"); |
| | | } |
| | | paramsInfo.put("card_info", cardInfo.toJSONString()); |
| | | log.info("用户业务入驻返回参数:{}", paramsInfo); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/busi/open", paramsInfo, null, false);; |
| | | log.info("用户业务入驻返回参数:{}", response); |
| | | return response; |
| | | } |
| | | /** |
| | | * 用户业务入驻 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public Map<String, Object> userBusinessOpenModify(UserWithdrawal userWithdrawal) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | merConfig.setSysId(huiFuProperties.getSysId()); |
| | | merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 汇付ID |
| | | paramsInfo.put("huifu_id", userWithdrawal.getHuiFuId()); |
| | | // 请求流水号 |
| | | paramsInfo.put("req_seq_id", RequestSeqUtil.generateForHuiFu()); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", DateUtil.format(new Date(),"yyyyMMdd")); |
| | | // 渠道商/商户汇付Id |
| | | paramsInfo.put("upper_huifu_id", huiFuProperties.getUpperHuifuId()); |
| | | // 结算卡信息 |
| | | JSONObject cardInfo = new JSONObject(); |
| | | cardInfo.put("card_type", "1"); |
| | | cardInfo.put("card_name", userWithdrawal.getBindAcctName()); |
| | | cardInfo.put("card_no", userWithdrawal.getBankCardCode()); |
| | | cardInfo.put("prov_id", userWithdrawal.getBankCardProvinceCode()); |
| | | cardInfo.put("area_id", userWithdrawal.getBankCardCityCode()); |
| | | cardInfo.put("cert_type", "00"); |
| | | cardInfo.put("cert_no", userWithdrawal.getCertificateCode()); |
| | | String[] certificateExpireDateArr = userWithdrawal.getCertificateExpireTime().split(","); |
| | | String startDateStr = certificateExpireDateArr[0]; |
| | | // 个人证件有效期开始日期 |
| | | cardInfo.put("cert_begin_date", startDateStr.replace("-", "")); |
| | | // 个人证件有效期截止日期 |
| | | String endDateStr = certificateExpireDateArr[1]; |
| | | if (!"长期".equals(endDateStr)) { |
| | | String formatEndDate = endDateStr.replace("-", ""); |
| | | cardInfo.put("cert_end_date", formatEndDate); |
| | | // 个人证件有效期类型 |
| | | cardInfo.put("cert_validity_type", "0"); |
| | | }else { |
| | | // 个人证件有效期类型 |
| | | cardInfo.put("cert_validity_type", "1"); |
| | | } |
| | | paramsInfo.put("card_info", cardInfo.toJSONString()); |
| | | log.info("用户业务入驻修改返回参数:{}", paramsInfo); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/busi/open", paramsInfo, null, false);; |
| | | log.info("用户业务入驻修改返回参数:{}", response); |
| | | return response; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.huifu.config; |
| | | |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2025/11/14 |
| | | */ |
| | | @Configuration |
| | | @EnableConfigurationProperties({HuiFuProperties.class}) |
| | | public class HuiFuPropertiesConfiguration { |
| | | } |
| New file |
| | |
| | | package com.stylefeng.guns.modular.huifu.properties; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @author mitao |
| | | * @date 2025/11/14 |
| | | */ |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = "huifu") |
| | | public class HuiFuProperties { |
| | | /** |
| | | * 汇付分配的产品号 |
| | | */ |
| | | private String productId; |
| | | /** |
| | | * 汇付分配的系统号 |
| | | */ |
| | | private String sysId; |
| | | /** |
| | | * 服务商私钥,用于调用接口时进行签名 |
| | | */ |
| | | private String rsaPrivateKey; |
| | | /** |
| | | * 汇付公钥,用于对汇付返回报文进行签名验证 |
| | | */ |
| | | private String rsaPublicKey; |
| | | /** |
| | | * 汇付ID |
| | | */ |
| | | private String huifuId; |
| | | /** |
| | | * 渠道商/商户汇付Id |
| | | */ |
| | | private String upperHuifuId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "验证码") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "开户行所在省编码") |
| | | private String bankCardProvinceCode; |
| | | |
| | | @ApiModelProperty(value = "开户行所在市编码") |
| | | private String bankCardCityCode; |
| | | |
| | | @ApiModelProperty(value = "进件类型 0-江苏银行;1-汇付") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "汇付ID") |
| | | private String huiFuId; |
| | | |
| | | @ApiModelProperty(value = "取现卡序列号") |
| | | private String tokenNo; |
| | | |
| | | |
| | | /* |
| | | @TableField("companyId") |
| | | @ApiModelProperty(value = "分公司ID") |
| | |
| | | # filters: wall,mergeStat |
| | | |
| | | #spring: |
| | | datasource: |
| | | url: jdbc:mysql://rm-2ze3v6o025804w200ho.mysql.rds.aliyuncs.com:3306/jyxtravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: ztjyx |
| | | password: g@arm2tx+fcxFREizr6LDt84s)UKv2EZ |
| | | db-name: jyxtravel #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | # datasource: |
| | | # url: jdbc:mysql://rm-2ze3v6o025804w200ho.mysql.rds.aliyuncs.com:3306/jyxtravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | # username: ztjyx |
| | | # password: g@arm2tx+fcxFREizr6LDt84s)UKv2EZ |
| | | # db-name: jyxtravel #用来搜集数据库的所有表 |
| | | # filters: wall,mergeStat |
| | | # datasource: |
| | | # url: jdbc:mysql://123.56.89.63:3306/jyxtravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | # username: root |
| | | # password: root |
| | | # db-name: jyxtravel #用来搜集数据库的所有表 |
| | | # filters: wall,mergeStat |
| | | # datasource: |
| | | # url: jdbc:mysql://127.0.0.1:3306/jyxtravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | # username: root |
| | | # password: 123456 |
| | | # db-name: jyxtravel #用来搜集数据库的所有表 |
| | | # filters: wall,mergeStat |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3307/jyxtravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root_remote |
| | | password: 123456 |
| | | db-name: jyxtravel #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | redis: |
| | | #测试环境 |
| | | host: 127.0.0.1 |
| | |
| | | # mid: 898201612345678 |
| | | # tid: 88880001 |
| | | # instMid: QRPAYDEFAULT |
| | | huifu: |
| | | product_id: KAZX |
| | | sys_id: 6666000182995771 |
| | | rsa_private_key: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCR6W3ynQJL7f2C8vFYMcQkcirpkif9ZhLq1374jIlV87nv0T9uIm6DoW8LyNEl9w2Yc5qoBv70tt/oVpemA6IZY6NXzE2USNi/sv2qUTtapcIRYxe4acCfY8K+x+p7W2e6wUWIpl9qgZA+UnFmHQ0HT6Ywzq2jJL92JdIs147Ud1aVi3aX8LYItj0z3ZKwZQkaJawZSWQk2+EdPfN059L2qFkPtnT7JIthAdUTJYZA13K4tzw6mXp/DbgwVmLhrlmwl/ccSv2Q0ABfEk7jIxF1nZmCmSy3HrEw9xWyrg1BC+DgXBdyF0OEtpNfv+UW080syUVBNN0irHVuDP81BaAjAgMBAAECggEAGlBZprZQErdxz6rWgYxADj6UpJjaI2XEJZwFZveZUOnqb2hyIv+MpKp5Z0upBErApey7SHAyjJlqWfE72hGvqxp/+7Z5izNz+2ZhPtT1ekyIajBPt89CkLwiA9vz2plKZLC0RIeUj5WcGNEvaDX3AomHtCehwtk+uiTp+XJKbOBtkkQszcdCGY1DVoQ0ppFoINnM9VLbEzaFaG7VS3eFkU4cf2CwcrnJB1RncyPFK+bGFvjkLM/eQbsh8YxkBqaGz/8UM1Na1SEidqdyUF71ltqnI0u8pLe0V+5jugVW+3lPL/p1C3i7mAbQOs4yqRWlFaGVTzOawoQUOPVwDpzeeQKBgQDs1P7F4wURqX1qZR0hSTqOigg48ychaOF66new3SuWk2CVBy8Q8b7odGSPyxJSGZvFLoznPYuSaXCtQ935WWfjB7Z5JpSWCi9BmJnkh41k/KvgMqAEGkZP6ul/zFnDWj94VwXEBz3TuRk574vK2coWoxjM6h1dlJjRBVVTs8dnrQKBgQCduKCjPDUuOHbcNn3VsaHEZX1XyiXN5gds08o61PjiHM42wYXxfUt59nBJmg2yAVRIrKYHfswJcxb5XUTDI5ZhCBnIPrdrQzj7FNadm/7mKDvSsvZdpfTiHY341XnvCq7OcNNj8g5fVsWF769strepQReSug7xgX7ojPvVcAZhDwKBgD57KwP2Er5IIuhQ6NCBS0uTqvurWqV70BDnjtBAaWF+XDq0/HvR63XUTzuIbbrvOqNY1p+jIxFrc+iiQQupxLimrkNkJEs5QKJjqiYahPkhmA68DG9Ip0gqR5QJy5y4UIplGwZOiscyzC72vcC0mJZETSSylzC7JV3vtEUy5ua5AoGAEwlDqjAMIyYBgpa5HV+xLKkrNbtaUL2gy8vMLsmhuHjNkuJMrlb3EyNhbiC/4moyqArehy0Qp1tSvIo7UGotLkzx/69CKBoW+IcNWDyJyXG1trqO7cKoCdqTViM98lIRwyzu9rMydONeN8o0HCT5id4nYDhAsXl1vc+2XY6F1pUCgYEA0dxGHBTKD/WzIvTYGYD6Xx224Y84mO6x2Mu16zFoq/NjuIdKi2O+92yrKDCMMCqaY77fXvWD3eI7QYYlbKAOqdLKVipTbhnBccDyNbtYHVg59t4xS+K6HyD+quVkL9n40UkxSZbKZBQhqt+vlQy0FUgONFii1ACZO0A8Sc/bvn4= |
| | | rsa_public_key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsWrruP9JBxrUd8uEX5Z8y7pg/UIr5RNHSgDnHqNI1hbi2MfTzB5vZ275wSFFaLDD9BesgDWqsUepPS/opROlDCg9y6WYH8mkN23NmHL9F8kT48OMmH722am+Hp0XVMMwXqA0oNt4f7oW6kDemjZW8/RT4vIE7cyxoxSsVRvjqSpx9wDgFLPWh3o0pHQaoxLyeUsGBATHFrxEDlosBvsuXjMcgjPKXALrcemzKOhBmBkLgyxNVmh61ZK+FNXd+/X4PeZlnWf54NRQAUKe1308E6IIaszo+CjneKuhj1m/X4f7AIvxAqlhuCV5E/DfKRmGopxaWqdtE960Y/H4SmBh2wIDAQAB |
| | | upper_huifu_id: 6666000182995771 |
| | |
| | | package com.stylefeng.guns; |
| | | |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import org.apache.http.client.HttpClient; |
| | | import org.apache.http.config.SocketConfig; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.builder.SpringApplicationBuilder; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
| | | import org.springframework.cloud.client.loadbalancer.LoadBalanced; |
| | | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
| | |
| | | return ResultUtil.error("不能重复添加银行卡"); |
| | | } |
| | | |
| | | List<UserWithdrawal> userId = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", user.getPhone()).eq("userType",1)); |
| | | List<UserWithdrawal> userId = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", user.getPhone()).eq("userType",1).eq("type", 1)); |
| | | if(userId.size()==0){ |
| | | return ResultUtil.error("请先进行个人用户进件信息填写"); |
| | | } |
| | |
| | | userBankAccount1.setOutRequestNo(ToolUtil.getRandomString(32)); |
| | | userBankAccount1.setBankAcctType("1"); |
| | | bankAccountService.insert(userBankAccount1); |
| | | UserBankAccountReq userBankAccountReq = new UserBankAccountReq(); |
| | | BeanUtils.copyProperties(userBankAccount1,userBankAccountReq); |
| | | userBankAccountReq.setCusId(userId.get(0).getCusId()); |
| | | //UserBankAccountReq userBankAccountReq = new UserBankAccountReq(); |
| | | //BeanUtils.copyProperties(userBankAccount1,userBankAccountReq); |
| | | //userBankAccountReq.setCusId(userId.get(0).getCusId()); |
| | | // SettleAcctResp settleAcctResp = SettleAcctExample.create(userBankAccountReq); |
| | | // userBankAccount1.setOutRequestNo(settleAcctResp.getOutRequestNo()); |
| | | // userBankAccount1.setVerifyStatus(settleAcctResp.getVerifyStatus()); |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | @Transactional(rollbackFor = UpyztException.class,propagation = Propagation.REQUIRES_NEW) |
| | | public ResultUtil addElectronicLedger( UserWithdrawalReq userWithdrawalReq,HttpServletRequest request) throws UnsupportedEncodingException { |
| | | public ResultUtil addElectronicLedger( UserWithdrawalReq userWithdrawalReq,HttpServletRequest request) { |
| | | System.out.println("进件信息:"+userWithdrawalReq); |
| | | // TODO 用户有无提现密码,无则设置开户密码 |
| | | if(StringUtils.hasLength(userWithdrawalReq.getBankName())){ |
| | |
| | | UserWithdrawal userWithdrawal = new UserWithdrawal(); |
| | | BeanUtils.copyProperties(userWithdrawalReq,userWithdrawal); |
| | | try { |
| | | String password=userWithdrawal.getTransactionAuthorizationCode(); |
| | | //String password=userWithdrawal.getTransactionAuthorizationCode(); |
| | | Integer id = userInfoService.getUserIdFormRedis(request); |
| | | if(null == id){ |
| | | return ResultUtil.tokenErr(); |
| | |
| | | userWithdrawalReq.setCopy1(userWithdrawalReq.getCopy1().replaceAll(" ","+")); |
| | | userWithdrawalReq.setCopy2(userWithdrawalReq.getCopy2().replaceAll(" ","+")); |
| | | // 用户进件 |
| | | Map<String, Object> resultMap = douGongBasicDataBiz.userBasicDataIndv(userWithdrawalReq); |
| | | Map<String, Object> resultMap = douGongBasicDataBiz.userBasicDataIndv(userWithdrawal); |
| | | String respCode = (String) resultMap.get("resp_code"); |
| | | //CusApplicationResp cusApplicationResp = CusApplicationExample.create(userWithdrawalReq); |
| | | if(!"200".equals(respCode)) { |
| | | if(!"00000000".equals(respCode)) { |
| | | return ResultUtil.error((String) resultMap.get("resp_desc")); |
| | | } |
| | | userWithdrawal.setTransactionAuthorizationCode(Base64Util.encode(password)); |
| | | //userWithdrawal.setTransactionAuthorizationCode(Base64Util.encode(password)); |
| | | userWithdrawal.setUserType(1); |
| | | userWithdrawal.setUserId(id); |
| | | userWithdrawal.setImgUrl(userWithdrawalReq.getIdCardFrontPicture()); |
| | |
| | | userWithdrawal.setHuiFuId((String) resultMap.get("huifu_id")); |
| | | //调用汇付业务入驻接口 |
| | | Map<String, Object> map = douGongBasicDataBiz.userBusinessOpen(userWithdrawal); |
| | | if (!"200".equals(map.get("resp_code"))){ |
| | | if (!"00000000".equals(map.get("resp_code"))){ |
| | | return ResultUtil.error((String) map.get("resp_desc")); |
| | | } |
| | | String tokenNo = (String) map.get("token_no"); |
| | | userWithdrawal.setTokenNo(tokenNo); |
| | | userWithdrawal.setType(1); |
| | | userWithdrawalService.insert(userWithdrawal); |
| | | // 开通电子账簿 |
| | | /* BalanceAcctReq balanceAcctReq = new BalanceAcctReq(); |
| | |
| | | } |
| | | UserInfo userInfo = userInfoService.selectById(driverId); |
| | | UserWithdrawal userWithdrawal1 = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() |
| | | .eq("phone", userInfo.getPhone()) |
| | | .eq("phone", userInfo.getPhone()).eq("type", 1) |
| | | .last("LIMIT 1")); |
| | | if(userWithdrawal1==null|| userWithdrawal1.getCusId()==null){ |
| | | if(userWithdrawal1==null|| userWithdrawal1.getHuiFuId()==null){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | UserWithdrawal userWithdrawal = new UserWithdrawal(); |
| | |
| | | userWithdrawal.setBankCardCityCode(bankCardCityCode); |
| | | //CusApplicationResp renew = CusApplicationExample.renew(userWithdrawal); |
| | | Map<String, Object> resultMap = douGongBasicDataBiz.userBasicDataIndvModify(userWithdrawal); |
| | | if (!"200".equals(resultMap.get("resp_code"))){ |
| | | if (!"00000000".equals(resultMap.get("resp_code"))){ |
| | | return ResultUtil.error((String) resultMap.get("resp_desc")); |
| | | } |
| | | //调用用户业务入驻修改 |
| | | Map<String, Object> map = douGongBasicDataBiz.userBusinessOpenModify(userWithdrawal); |
| | | if (!"200".equals(map.get("resp_code"))){ |
| | | if (!"00000000".equals(map.get("resp_code"))){ |
| | | return ResultUtil.error((String) map.get("resp_desc")); |
| | | } |
| | | userWithdrawal1.setIdCardFrontPicture(copy1); |
| | |
| | | import com.huifu.bspay.sdk.opps.core.config.MerConfig; |
| | | import com.huifu.bspay.sdk.opps.core.net.BasePayRequest; |
| | | import com.huifu.bspay.sdk.opps.core.utils.RsaUtils; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.account.req.UserWithdrawalReq; |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import com.stylefeng.guns.core.util.RequestSeqUtil; |
| | |
| | | @Component |
| | | public class DouGongBasicDataBiz { |
| | | @Autowired |
| | | private static HuiFuProperties huiFuProperties; |
| | | private HuiFuProperties huiFuProperties; |
| | | |
| | | /** |
| | | * 个人用户基本信息开户 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public Map<String, Object> userBasicDataIndv(UserWithdrawalReq userWithdrawalReq) throws Exception { |
| | | public Map<String, Object> userBasicDataIndv(UserWithdrawal userWithdrawal) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | merConfig.setProcutId(huiFuProperties.getProductId()); |
| | |
| | | paramsInfo.put("req_date", DateUtil.format(new Date(),"yyyyMMdd")); |
| | | // 个人证件类型 |
| | | paramsInfo.put("cert_type", "00"); |
| | | String[] certificateExpireDateArr = userWithdrawalReq.getCertificateExpireTime().split(","); |
| | | String[] certificateExpireDateArr = userWithdrawal.getCertificateExpireTime().split(","); |
| | | String startDateStr = certificateExpireDateArr[0]; |
| | | // 个人证件有效期开始日期 |
| | | paramsInfo.put("cert_begin_date", startDateStr.replace("-", "")); |
| | |
| | | paramsInfo.put("cert_validity_type", "1"); |
| | | } |
| | | // 手机号 |
| | | paramsInfo.put("mobile_no", userWithdrawalReq.getPhone()); |
| | | paramsInfo.put("mobile_no", userWithdrawal.getPhone()); |
| | | // 个人姓名 |
| | | paramsInfo.put("name", RsaUtils.encrypt(userWithdrawalReq.getOpenAccountName(), huiFuProperties.getRsaPublicKey())); |
| | | paramsInfo.put("name", userWithdrawal.getOpenAccountName()); |
| | | // 个人证件号码 |
| | | paramsInfo.put("cert_no", RsaUtils.encrypt(userWithdrawalReq.getCertificateCode(), huiFuProperties.getRsaPublicKey())); |
| | | paramsInfo.put("cert_no", userWithdrawal.getCertificateCode()); |
| | | // 是否发送短信标识 |
| | | paramsInfo.put("sms_send_flag", "1"); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/basicdata/indv", paramsInfo, null, false);; |
| | | log.info("个人用户基本信息开户返回参数:" + response); |
| | | log.info("个人用户基本信息开户请求参数:{}", paramsInfo); |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/basicdata/indv", paramsInfo, null, false); |
| | | log.info("个人用户基本信息开户返回参数:{}", response); |
| | | return response; |
| | | } |
| | | /** |
| | |
| | | } |
| | | // 手机号 |
| | | paramsInfo.put("mobile_no", userWithdrawal.getPhone()); |
| | | log.info("个人用户基本信息修改返回参数:{}", paramsInfo); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/basicdata/indv/modify", paramsInfo, null, false); |
| | | log.info("个人用户基本信息修改返回参数:" + response); |
| | | log.info("个人用户基本信息修改返回参数:{}", response); |
| | | return response; |
| | | } |
| | | /** |
| | |
| | | // 结算卡信息 |
| | | 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()); |
| | | cardInfo.put("cert_type", "00"); |
| | | cardInfo.put("cert_no", userWithdrawal.getCertificateCode()); |
| | | String[] certificateExpireDateArr = userWithdrawal.getCertificateExpireTime().split(","); |
| | | String startDateStr = certificateExpireDateArr[0]; |
| | | // 个人证件有效期开始日期 |
| | |
| | | cardInfo.put("cert_validity_type", "1"); |
| | | } |
| | | paramsInfo.put("card_info", cardInfo.toJSONString()); |
| | | log.info("用户业务入驻返回参数:{}", paramsInfo); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/busi/open", paramsInfo, null, false);; |
| | | log.info("用户业务入驻返回参数:" + response); |
| | | log.info("用户业务入驻返回参数:{}", response); |
| | | return response; |
| | | } |
| | | /** |
| | |
| | | // 结算卡信息 |
| | | 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()); |
| | | cardInfo.put("cert_type", "00"); |
| | | cardInfo.put("cert_no", userWithdrawal.getCertificateCode()); |
| | | String[] certificateExpireDateArr = userWithdrawal.getCertificateExpireTime().split(","); |
| | | String startDateStr = certificateExpireDateArr[0]; |
| | | // 个人证件有效期开始日期 |
| | |
| | | cardInfo.put("cert_validity_type", "1"); |
| | | } |
| | | paramsInfo.put("card_info", cardInfo.toJSONString()); |
| | | log.info("用户业务入驻修改返回参数:{}", paramsInfo); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/user/busi/open", paramsInfo, null, false);; |
| | | log.info("用户业务入驻修改返回参数:" + response); |
| | | log.info("用户业务入驻修改返回参数:{}", response); |
| | | return response; |
| | | } |
| | | } |