Commit 72ffc37f authored by wujiang's avatar wujiang

Merge branch 'develop_unit_register' of…

Merge branch 'develop_unit_register' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_unit_register
parents 416c5759 ba983186
......@@ -57,4 +57,11 @@ public interface IRegUnitInfoService {
* @return true 已存在相同账号,不能注册 false 不存在账号,可以注册
*/
Boolean checkRepeatAccount(String userName);
/**
* 手机号重复校验
* @param phoneNo 手机号
* @return true 已存在不能注册 false 不存在可以注册
*/
Boolean checkRepeatPhone(String phoneNo);
}
......@@ -99,6 +99,10 @@ public class RegUnitInfoController extends BaseController {
if (isReg) {
throw new RuntimeException("该手机号已注册!");
}
Boolean isExist = iRegUnitInfoService.checkRepeatPhone(tel);
if (isExist) {
throw new RuntimeException("该手机号已注册!");
}
Boolean flag;
HashMap<String, String> params = new HashMap<>();
String code = this.getRandomCode();
......
......@@ -286,6 +286,11 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
return this.count(new LambdaQueryWrapper<RegUnitInfo>().eq(RegUnitInfo::getAdminLoginName,userName)) > 0;
}
@Override
public Boolean checkRepeatPhone(String phoneNo) {
return this.count(new LambdaQueryWrapper<RegUnitInfo>().eq(RegUnitInfo::getAdminTel,phoneNo)) > 0;
}
private CompanyModel dealChildCompany(CompanyModel cm) {
cm.setChildren(this.getFilterChild(cm.getChildren() != null ? cm.getChildren() : new ArrayList()));
cm.getChildren().stream().filter(n -> {
......
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