|
|
@ -362,8 +362,7 @@ public class UserService implements IUserService { |
|
|
|
SysAuth theAuth; |
|
|
|
SysAuthExample authExample = new SysAuthExample(); |
|
|
|
authExample.createCriteria() |
|
|
|
.andIdentifierEqualTo(username) |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value).andIdentifierEqualTo(username); |
|
|
|
authList = authDao.selectByExample(authExample); |
|
|
|
if (CollectionUtil.isNotEmpty(authList)) { |
|
|
|
theAuth = authList.get(0); |
|
|
@ -427,7 +426,7 @@ public class UserService implements IUserService { |
|
|
|
} |
|
|
|
|
|
|
|
SysAuthExample authExample = new SysAuthExample(); |
|
|
|
authExample.createCriteria().andIdentifierEqualTo(openId).andIdentifyTypeEqualTo(identifyType); |
|
|
|
authExample.createCriteria().andIdentifyTypeEqualTo(identifyType).andIdentifierEqualTo(openId); |
|
|
|
authList = authDao.selectByExample(authExample); |
|
|
|
long end1 = System.currentTimeMillis(); |
|
|
|
log.info("查auth表耗时:{}",end1 - start); |
|
|
@ -698,8 +697,7 @@ public class UserService implements IUserService { |
|
|
|
//检查手机号是否已被注册
|
|
|
|
SysAuthExample authExample = new SysAuthExample(); |
|
|
|
authExample.createCriteria() |
|
|
|
.andIdentifierEqualTo(userSignup.getPhone()) |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(userSignup.getPhone()); |
|
|
|
List<SysAuth> authList = authDao.selectByExample(authExample); |
|
|
|
if (CollectionUtil.isEmpty(authList)) { |
|
|
|
//验证账号是否被注册
|
|
|
@ -1036,8 +1034,8 @@ public class UserService implements IUserService { |
|
|
|
public Long selectUserIdByPhone(String phoneCell) { |
|
|
|
Long userId = null; |
|
|
|
SysAuthExample authExample = new SysAuthExample(); |
|
|
|
authExample.createCriteria().andIdentifierEqualTo(phoneCell) |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); |
|
|
|
authExample.createCriteria() |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(phoneCell); |
|
|
|
List<SysAuth> authList = authDao.selectByExample(authExample); |
|
|
|
if (CollectionUtil.isNotEmpty(authList)) { |
|
|
|
userId = authList.get(0).getUserId(); |
|
|
@ -1053,8 +1051,8 @@ public class UserService implements IUserService { |
|
|
|
String account = null; |
|
|
|
if (StrUtil.isNotEmpty(phone)) { |
|
|
|
SysAuthExample authExample = new SysAuthExample(); |
|
|
|
authExample.createCriteria().andIdentifierEqualTo(phone) |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); |
|
|
|
authExample.createCriteria() |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(phone); |
|
|
|
List<SysAuth> authList = authDao.selectByExample(authExample); |
|
|
|
if (CollectionUtil.isNotEmpty(authList)) { |
|
|
|
SysAuthExample authExample1 = new SysAuthExample(); |
|
|
@ -1151,8 +1149,7 @@ public class UserService implements IUserService { |
|
|
|
//检查手机号是否已被注册
|
|
|
|
SysAuthExample authExample = new SysAuthExample(); |
|
|
|
authExample.createCriteria() |
|
|
|
.andIdentifierEqualTo(signup.getPhone()) |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); |
|
|
|
.andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(signup.getPhone()); |
|
|
|
List<SysAuth> authList = authDao.selectByExample(authExample); |
|
|
|
if (CollectionUtil.isNotEmpty(authList)) { |
|
|
|
log.info("用户已存在,直接返回user"); |
|
|
@ -1567,7 +1564,7 @@ public class UserService implements IUserService { |
|
|
|
if(StrUtil.isNotEmpty(userSignup.getAccount())){ |
|
|
|
accountName = userSignup.getAccount(); |
|
|
|
SysAuthExample sysAuthExample = new SysAuthExample(); |
|
|
|
sysAuthExample.createCriteria().andIdentifierEqualTo(accountName).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); |
|
|
|
sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value).andIdentifierEqualTo(accountName); |
|
|
|
List<SysAuth> authList = authDao.selectByExample(sysAuthExample); |
|
|
|
if(CollectionUtil.isNotEmpty(authList)){ |
|
|
|
throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); |
|
|
|