新增了验证账户名与银行卡姓名
This commit is contained in:
parent
dec2d80131
commit
4330be4be2
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user