部门代码修改
This commit is contained in:
+17
-12
@@ -197,19 +197,24 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
|||||||
*/
|
*/
|
||||||
// authentication.setUserName(loginUser.getUsername());
|
// authentication.setUserName(loginUser.getUsername());
|
||||||
// authentication.setUserId(loginUser.getUserId());
|
// authentication.setUserId(loginUser.getUserId());
|
||||||
authentication.setName(name);
|
|
||||||
authentication.setIdentityNo(idcardno);
|
|
||||||
authentication.setCertificationTime(new Date());
|
|
||||||
authentication.setCertificationStatus(0);
|
|
||||||
authentication.setCreateBy(name);
|
|
||||||
// authentication.setCreateBy(loginUser.getUsername());
|
|
||||||
try {
|
|
||||||
identityAuthenticationMapper.insertIdentityAuthentication(authentication);
|
|
||||||
authentication.setId(authentication.getId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println("认证记录新增失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
// authentication.setCreateBy(loginUser.getUsername());
|
||||||
|
try {
|
||||||
|
identityAuthenticationMapper.insertIdentityAuthentication(authentication);
|
||||||
|
authentication.setId(authentication.getId());
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("认证记录新增失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-3
@@ -115,10 +115,19 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
}else if(!codeCache.equals(ientityAuthentication.getVerifyCode())){
|
}else if(!codeCache.equals(ientityAuthentication.getVerifyCode())){
|
||||||
return AjaxResult.warn("验证码校验失败");
|
return AjaxResult.warn("验证码校验失败");
|
||||||
}
|
}
|
||||||
SysUser sysUserName=sysUserMapper.selectUserByUserName(ientityAuthentication.getUserName());
|
SysUser sysUserName=sysUserMapper.checkUserNameUnique(ientityAuthentication.getUserName());
|
||||||
if(sysUserName!=null){
|
if(sysUserName!=null){
|
||||||
return AjaxResult.warn("账号已存在");
|
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());
|
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
|
||||||
|
|
||||||
@@ -133,8 +142,6 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
|||||||
ientityAuthentication.setUserId(sysUser.getUserId());
|
ientityAuthentication.setUserId(sysUser.getUserId());
|
||||||
}else {
|
}else {
|
||||||
sysUser=new SysUser();
|
sysUser=new SysUser();
|
||||||
// 用户名设为电话号
|
|
||||||
sysUser.setUserName(ientityAuthentication.getPhone());
|
|
||||||
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
|
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
|
||||||
sysUser.setNickName(ientityAuthentication.getName());
|
sysUser.setNickName(ientityAuthentication.getName());
|
||||||
sysUser.setUserName(ientityAuthentication.getUserName());
|
sysUser.setUserName(ientityAuthentication.getUserName());
|
||||||
|
|||||||
+3
@@ -60,6 +60,9 @@
|
|||||||
<if test="userId != null ">
|
<if test="userId != null ">
|
||||||
AND i.user_id = #{userId}
|
AND i.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="identityNo != null and identityNo != '' ">
|
||||||
|
AND i.identity_no = #{identityNo}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user