Commit e88a10bd authored by fangxinjiang's avatar fangxinjiang

VO调整

parent 2fb6df10
...@@ -147,4 +147,19 @@ public class TCheckIdCardController { ...@@ -147,4 +147,19 @@ public class TCheckIdCardController {
public R<List<TCheckIdCard>> checkIdCardInner(@RequestBody List<TCheckIdCard> checkList) { public R<List<TCheckIdCard>> checkIdCardInner(@RequestBody List<TCheckIdCard> checkList) {
return tCheckIdCardService.checkIdCard(checkList); return tCheckIdCardService.checkIdCard(checkList);
} }
/**
* @Author fxj
* @Description 校验姓名身份证 --- 单个
* @Date 16:52 2022/6/22
* @Param
* @return
**/
@Operation(description = "校验姓名身份证 --- 单个")
@SysLog("校验姓名身份证 --- 单个")
//@Inner
@PostMapping("/inner/checkIdCardSingle")
public R<TCheckIdCard> checkIdCardSingle(String idCard, String name) {
return tCheckIdCardService.checkIdCardSingle(idCard, name);
}
} }
...@@ -45,4 +45,5 @@ public interface TCheckIdCardService extends IService<TCheckIdCard> { ...@@ -45,4 +45,5 @@ public interface TCheckIdCardService extends IService<TCheckIdCard> {
**/ **/
R<List<TCheckIdCard>> checkIdCard(List<TCheckIdCard> checkList); R<List<TCheckIdCard>> checkIdCard(List<TCheckIdCard> checkList);
R<TCheckIdCard> checkIdCardSingle(String idCard, String name);
} }
...@@ -48,6 +48,7 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh ...@@ -48,6 +48,7 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
if (Common.isEmpty(name) || Common.isEmpty(idNum) || Common.isEmpty(cardNo)){ if (Common.isEmpty(name) || Common.isEmpty(idNum) || Common.isEmpty(cardNo)){
return R.failed(MsgUtils.getMessage(ErrorCodes.CHECKS_BANK_NO_REQUEST_PARAM_ERROR)); return R.failed(MsgUtils.getMessage(ErrorCodes.CHECKS_BANK_NO_REQUEST_PARAM_ERROR));
} }
synchronized (this){
TCheckBankNo checkBankNo = baseMapper.selectOne(Wrappers.<TCheckBankNo>query().lambda() TCheckBankNo checkBankNo = baseMapper.selectOne(Wrappers.<TCheckBankNo>query().lambda()
.eq(TCheckBankNo::getBankNo,cardNo) .eq(TCheckBankNo::getBankNo,cardNo)
.eq(TCheckBankNo::getName,name) .eq(TCheckBankNo::getName,name)
...@@ -62,4 +63,5 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh ...@@ -62,4 +63,5 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
} }
return res; return res;
} }
}
} }
package com.yifu.cloud.plus.v1.check.service.impl; package com.yifu.cloud.plus.v1.check.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.entity.TCheckApiNum; import com.yifu.cloud.plus.v1.check.entity.TCheckApiNum;
...@@ -224,4 +225,26 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh ...@@ -224,4 +225,26 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
return flag; return flag;
} }
@Override
public R<TCheckIdCard> checkIdCardSingle(String idCard, String name) {
if (Common.isEmpty(idCard) || Common.isEmpty(name)){
return R.failed(CommonConstants.PARAM_IS_NOT_EMPTY);
}
synchronized (this){
TCheckIdCard checkIdCard = baseMapper.selectOne(Wrappers.<TCheckIdCard>query().lambda()
.eq(TCheckIdCard::getIdCard,idCard)
.eq(TCheckIdCard::getIsTrue,CommonConstants.ONE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(checkIdCard)){
return R.ok(checkIdCard);
}
TCheckIdCard c = new TCheckIdCard();
c.setIdCard(idCard);
c.setName(name);
ChecksUtil.checkIdCard(c,canCheckService.getCanCheck());
baseMapper.insert(c);
return R.ok(c);
}
}
} }
...@@ -54,7 +54,7 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh ...@@ -54,7 +54,7 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
* @Date 19:18 2022/6/20 * @Date 19:18 2022/6/20
**/ **/
@Override @Override
public R<Map<String,TCheckMobile>> checkMobiles(String mobiles){ public synchronized R<Map<String,TCheckMobile>> checkMobiles(String mobiles){
R<Map<String,TCheckMobile>> mobileMapR = null; R<Map<String,TCheckMobile>> mobileMapR = null;
Map<String,TCheckMobile> checkMobileMap = null; Map<String,TCheckMobile> checkMobileMap = null;
Map<String,TCheckMobile> existMap = new HashMap<>(); Map<String,TCheckMobile> existMap = new HashMap<>();
......
...@@ -216,8 +216,10 @@ public interface CommonConstants { ...@@ -216,8 +216,10 @@ public interface CommonConstants {
* @Author pwang * @Author pwang
* @Date 2020-05-14 14:10 * @Date 2020-05-14 14:10
**/ **/
public static final int EMPLOYEE_INIT_NO_START = 7; int EMPLOYEE_INIT_NO_START = 7;
String SAVE_FAILED = "保存失败!"; String SAVE_FAILED = "保存失败!";
String RESULT_EMPTY = "获取结果为空"; String RESULT_EMPTY = "获取结果为空";
/** /**
...@@ -225,6 +227,9 @@ public interface CommonConstants { ...@@ -225,6 +227,9 @@ public interface CommonConstants {
* @Date 2020-03-12 14:48 * @Date 2020-03-12 14:48
* @return * @return
**/ **/
public static final String RESULT_DATA_FAIL= "操作失败"; String RESULT_DATA_FAIL= "操作失败";
String SAVE_SUCCESS = "保存成功!"; String SAVE_SUCCESS = "保存成功!";
String PARAM_IS_NOT_EMPTY = "参数不可为空";
} }
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