Commit c7d2638e authored by hongguangwu's avatar hongguangwu

MVP1.4-salary代发户3次上传代码-加上校验银行卡

parent ca10ff2c
...@@ -121,4 +121,18 @@ public class TCheckBankNoController { ...@@ -121,4 +121,18 @@ public class TCheckBankNoController {
public CheckBankNoVo checkBankNoInner(@RequestBody TCheckBankNo checkBankNo) { public CheckBankNoVo checkBankNoInner(@RequestBody TCheckBankNo checkBankNo) {
return tCheckBankNoService.checkBankNoTwo(checkBankNo.getName(),checkBankNo.getBankNo()); return tCheckBankNoService.checkBankNoTwo(checkBankNo.getName(),checkBankNo.getBankNo());
} }
/**
* @Description: 代发户调用银行卡校验--如果其他接口也要调用,加上信息
* @Author: hgw
* @Date: 2023/1/13 9:41
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.check.entity.TCheckBankNo>
**/
@Operation(description = "调用银行卡校验")
@SysLog("调用银行卡校验" )
@PostMapping("/checkBankNo" )
public R<TCheckBankNo> checkBankNo(@RequestParam String name, @RequestParam String bankNo) {
return tCheckBankNoService.checkBankNo(name, bankNo);
}
} }
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.check.service; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.check.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo; import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo; import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
/** /**
* 银行卡卡号 校验 * 银行卡卡号 校验
...@@ -29,5 +30,13 @@ import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo; ...@@ -29,5 +30,13 @@ import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
*/ */
public interface TCheckBankNoService extends IService<TCheckBankNo> { public interface TCheckBankNoService extends IService<TCheckBankNo> {
/**
* @Description: 代发户调用银行卡校验
* @Author: hgw
* @Date: 2023/1/13 9:39
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.check.entity.TCheckBankNo>
**/
R<TCheckBankNo> checkBankNo(String name, String cardNo);
CheckBankNoVo checkBankNoTwo(String name, String cardNo); CheckBankNoVo checkBankNoTwo(String name, String cardNo);
} }
...@@ -44,6 +44,31 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh ...@@ -44,6 +44,31 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
private final TCanCheckService canCheckService; private final TCanCheckService canCheckService;
@Override
public R<TCheckBankNo> checkBankNo(String name, String cardNo) {
if (Common.isEmpty(name) || Common.isEmpty(cardNo)){
R.failed(MsgUtils.getMessage(ErrorCodes.CHECKS_BANK_NO_REQUEST_PARAM_ERROR));
}
synchronized (this){
TCheckBankNo checkBankNo = baseMapper.selectOne(Wrappers.<TCheckBankNo>query().lambda()
.eq(TCheckBankNo::getBankNo, cardNo)
.eq(TCheckBankNo::getName, name)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(checkBankNo)){
if ("01".equals(checkBankNo.getResult())) {
R.ok(checkBankNo);
} else {
R.failed(checkBankNo);
}
}
R<TCheckBankNo> resR = ChecksUtil.checkBankNoTwo(name,cardNo,canCheckService.getCanCheck());
if (Common.isNotNull(resR) && Common.isNotNull(resR.getData())){
baseMapper.insert(resR.getData());
}
return resR;
}
}
@Override @Override
public CheckBankNoVo checkBankNoTwo(String name, String cardNo) { public CheckBankNoVo checkBankNoTwo(String name, String cardNo) {
CheckBankNoVo vo = new CheckBankNoVo(); CheckBankNoVo vo = new CheckBankNoVo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment