部门代码修改
This commit is contained in:
+7
-2
@@ -197,8 +197,14 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
*/
|
||||
// authentication.setUserName(loginUser.getUsername());
|
||||
// authentication.setUserId(loginUser.getUserId());
|
||||
authentication.setName(name);
|
||||
|
||||
authentication.setIdentityNo(idcardno);
|
||||
// 查询认证表是否已存在该身份证信息的认证,不存在则新增,存在不处理
|
||||
IdentityAuthentication identityAuthentication = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
||||
if(identityAuthentication!=null) {
|
||||
return AjaxResult.success(identityAuthentication);
|
||||
}
|
||||
authentication.setName(name);
|
||||
authentication.setCertificationTime(new Date());
|
||||
authentication.setCertificationStatus(0);
|
||||
authentication.setCreateBy(name);
|
||||
@@ -209,7 +215,6 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
} catch (Exception e) {
|
||||
System.out.println("认证记录新增失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-3
@@ -115,10 +115,19 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
}else if(!codeCache.equals(ientityAuthentication.getVerifyCode())){
|
||||
return AjaxResult.warn("验证码校验失败");
|
||||
}
|
||||
SysUser sysUserName=sysUserMapper.selectUserByUserName(ientityAuthentication.getUserName());
|
||||
SysUser sysUserName=sysUserMapper.checkUserNameUnique(ientityAuthentication.getUserName());
|
||||
if(sysUserName!=null){
|
||||
return AjaxResult.warn("账号已存在");
|
||||
}
|
||||
SysUser checkPhoneUnique = sysUserMapper.checkPhoneUnique(ientityAuthentication.getPhone());
|
||||
if(checkPhoneUnique!=null){
|
||||
return AjaxResult.warn("手机号已存在");
|
||||
}
|
||||
SysUser checkEmailUnique = sysUserMapper.checkEmailUnique(ientityAuthentication.getEmail());
|
||||
if(checkEmailUnique!=null){
|
||||
return AjaxResult.warn("邮箱已存在");
|
||||
}
|
||||
|
||||
// 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
|
||||
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
|
||||
|
||||
@@ -133,8 +142,6 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
ientityAuthentication.setUserId(sysUser.getUserId());
|
||||
}else {
|
||||
sysUser=new SysUser();
|
||||
// 用户名设为电话号
|
||||
sysUser.setUserName(ientityAuthentication.getPhone());
|
||||
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
|
||||
sysUser.setNickName(ientityAuthentication.getName());
|
||||
sysUser.setUserName(ientityAuthentication.getUserName());
|
||||
|
||||
+3
@@ -60,6 +60,9 @@
|
||||
<if test="userId != null ">
|
||||
AND i.user_id = #{userId}
|
||||
</if>
|
||||
<if test="identityNo != null and identityNo != '' ">
|
||||
AND i.identity_no = #{identityNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user