diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java index 1f6b11d1..ee8fd887 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java @@ -108,8 +108,20 @@ public class CustomerPaymentController extends JeecgController edit(@RequestBody CustomerPayment customerPayment) { - customerPaymentService.updateById(customerPayment); - return Result.OK("编辑成功!"); + + if(customerPayment.getPaymentType().equals("2")){ + BankUtil bankUtil = new BankUtil(); + if (bankUtil.checkBankCard(customerPayment.getAccountNo())){ + customerPayment.setBankDeposit(bankUtil.getNameOfBank(customerPayment.getAccountNo())); + customerPaymentService.updateById(customerPayment); + return Result.OK("添加成功!你的银行开是"+bankUtil.getNameOfBank(customerPayment.getAccountNo())); + }else { + return Result.error("请检查银行卡号"); + } + }else { + customerPaymentService.updateById(customerPayment); + return Result.OK("编辑成功!"); + } } /**