Pu Zhibing
4 天以前 0cc73a9ffcdd356e0b797e458b400acfb660da94
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/WithdrawalController.java
@@ -6,7 +6,6 @@
import com.stylefeng.guns.modular.account.model.TBankNext;
import com.stylefeng.guns.modular.account.server.UserBankAccountService;
import com.stylefeng.guns.modular.account.server.UserWithdrawalService;
import com.stylefeng.guns.modular.cloudPayment.example.CusApplicationExample;
import com.stylefeng.guns.modular.system.model.UserBankAccount;
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.model.UserWithdrawal;
@@ -14,7 +13,6 @@
import com.stylefeng.guns.modular.system.service.IWithdrawalService;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.stylefeng.guns.modular.system.warpper.WithdrawalWarpper;
import com.unionpay.upyzt.resp.CusApplicationResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -106,26 +104,26 @@
            userWithdrawal.setBankCode(bankName1.getDrecCode());
            userWithdrawal.setBankBranchCode(bankName1.getBankCode());
            userWithdrawal.setCode(smsCode);
            CusApplicationResp renew = CusApplicationExample.renew(userWithdrawal);
            System.err.println("修改个人用户进件信息返回"+renew);
            if("succeeded".equals(renew.getApplicationStatus())){
                // 修改银行卡信息
                bankCard.setSettleAcctId(renew.getSettleAcctId());
                bankAccountService.updateById(bankCard);
//            CusApplicationResp renew = CusApplicationExample.renew(userWithdrawal);
//            System.err.println("修改个人用户进件信息返回"+renew);
//            if("succeeded".equals(renew.getApplicationStatus())){
//                // 修改银行卡信息
//                bankCard.setSettleAcctId(renew.getSettleAcctId());
//                bankAccountService.updateById(bankCard);
//
//                userWithdrawal.setBankCardCode(code);
//                userWithdrawal.setBankCode(bankCard.getBankCode());
//                userWithdrawal.setBankBranchCode(bankCard.getBankBranchCode());
//                userWithdrawal.setBankName(bankCard.getBankName());
//                userWithdrawal.setSettleAcctId(renew.getSettleAcctId());
//                userWithdrawal.setBalanceAcctId(renew.getBalanceAcctId());
//                userWithdrawalService.updateById(userWithdrawal);
//                return withdrawalService.withdrawal(money, bankName, code, name, uid);
//            }else {
//                return ResultUtil.error(renew.getFailureMsgs().get(0).getReason());
//            }
                userWithdrawal.setBankCardCode(code);
                userWithdrawal.setBankCode(bankCard.getBankCode());
                userWithdrawal.setBankBranchCode(bankCard.getBankBranchCode());
                userWithdrawal.setBankName(bankCard.getBankName());
                userWithdrawal.setSettleAcctId(renew.getSettleAcctId());
                userWithdrawal.setBalanceAcctId(renew.getBalanceAcctId());
                userWithdrawalService.updateById(userWithdrawal);
                return withdrawalService.withdrawal(money, bankName, code, name, uid);
            }else {
                return ResultUtil.error(renew.getFailureMsgs().get(0).getReason());
            }
            return ResultUtil.success();
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();