新增了验证账户名与银行卡姓名

This commit is contained in:
wucongxing8150 2025-07-09 13:14:44 +08:00
parent dec2d80131
commit 4330be4be2
2 changed files with 21 additions and 0 deletions

View File

@ -634,6 +634,11 @@ public class ExpertController {
@ApiOperation(value = "添加专家银行卡数据")
@PostMapping("/user/addBank")
public ResponseDTO<String> bankVerify(@RequestBody @Valid CaseplatformBankAddForm addForm) {
Long expertId = SmartRequestUtil.getRequestUserId();
if (expertId == null) {
return ResponseDTO.error(LOGIN_STATE_INVALID);
}
boolean check = BankCardCheckAPI.check(addForm.getIdCardName(), addForm.getIdCardNo(), addForm.getBankCardNo());
if(check){
return caseplatformBankService.add(addForm);

View File

@ -1,7 +1,9 @@
package net.lab1024.sa.admin.module.business.bankcard.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertSignVO;
import net.lab1024.sa.admin.module.app.expert.dao.ExpertDao;
import net.lab1024.sa.admin.module.app.expert.dao.ExpertSignDao;
import net.lab1024.sa.admin.module.business.bankcard.dao.CaseplatformBankDao;
import net.lab1024.sa.admin.module.business.bankcard.domain.entity.CaseplatformBankEntity;
@ -18,6 +20,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Objects;
/**
* 银行卡 Service
@ -36,6 +39,9 @@ public class CaseplatformBankService {
@Autowired
private ExpertSignDao expertSignDao;
@Autowired
private ExpertDao expertDao;
/**
* 分页查询
*
@ -56,6 +62,16 @@ public class CaseplatformBankService {
public synchronized ResponseDTO<String> add(CaseplatformBankAddForm addForm) {
CaseplatformBankEntity caseplatformBankEntity = SmartBeanUtil.copy(addForm, CaseplatformBankEntity.class);
Long expertId = SmartRequestUtil.getRequestUserId();
// 获取专家数据
ExpertEntity expert = expertDao.selectById(expertId);
if (expert == null) {
return ResponseDTO.userErrorParam("操作失败");
}
if (!Objects.equals(expert.getName(), addForm.getIdCardName())){
return ResponseDTO.userErrorParam("账户名与银行卡姓名不一致");
}
caseplatformBankEntity.setExpertId(expertId);
CaseplatformBankVO expertBank = caseplatformBankDao.getExpertBank(expertId);