|
@@ -29,6 +29,7 @@ import com.alibaba.fastjson.TypeReference;
|
|
import constant.CommonConstant;
|
|
import constant.CommonConstant;
|
|
import enums.ValidStatusEnum;
|
|
import enums.ValidStatusEnum;
|
|
import exception.BackendRuntimeException;
|
|
import exception.BackendRuntimeException;
|
|
|
|
+import exception.TooManyDeviceException;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
@@ -331,15 +332,13 @@ public class AuthServiceImpl implements AuthService {
|
|
memberVo.setTimeZone(member.getTimeZone());
|
|
memberVo.setTimeZone(member.getTimeZone());
|
|
memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
|
|
memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
|
|
}else {
|
|
}else {
|
|
- if("false".equals(password)){
|
|
|
|
- memberVo.setName(member.getName());
|
|
|
|
- memberVo.setEmail(member.getEmail());
|
|
|
|
- memberVo.setPhone(member.getPhone());
|
|
|
|
- memberVo.setPhoneZone(member.getPhoneZone());
|
|
|
|
- memberVo.setTimeZone(member.getTimeZone());
|
|
|
|
- memberId = member.getId();
|
|
|
|
- memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
|
|
|
|
- }
|
|
|
|
|
|
+ memberVo.setName(member.getName());
|
|
|
|
+ memberVo.setEmail(member.getEmail());
|
|
|
|
+ memberVo.setPhone(member.getPhone());
|
|
|
|
+ memberVo.setPhoneZone(member.getPhoneZone());
|
|
|
|
+ memberVo.setTimeZone(member.getTimeZone());
|
|
|
|
+ memberId = member.getId();
|
|
|
|
+ memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
//如果用户存在将用户id返回,否则其他情况(邮箱登录)全部抛异常:用户未注册
|
|
//如果用户存在将用户id返回,否则其他情况(邮箱登录)全部抛异常:用户未注册
|
|
@@ -368,7 +367,7 @@ public class AuthServiceImpl implements AuthService {
|
|
Devices queryDevice;
|
|
Devices queryDevice;
|
|
try {
|
|
try {
|
|
queryDevice = deviceService.selectByMemberId(memberId, loginDevice.getUuid());
|
|
queryDevice = deviceService.selectByMemberId(memberId, loginDevice.getUuid());
|
|
- }catch (BackendRuntimeException e){
|
|
|
|
|
|
+ }catch (TooManyDeviceException e){
|
|
vo.setId(memberId);
|
|
vo.setId(memberId);
|
|
vo.setMessage(e.getMessage());
|
|
vo.setMessage(e.getMessage());
|
|
return vo;
|
|
return vo;
|
|
@@ -538,6 +537,7 @@ public class AuthServiceImpl implements AuthService {
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = BackendRuntimeException.class)
|
|
@Transactional(rollbackFor = BackendRuntimeException.class)
|
|
public String clearDevice(String id) {
|
|
public String clearDevice(String id) {
|
|
|
|
+ log.info("用户{}清除设备信息:",id);
|
|
Members member = memberService.getById(id);
|
|
Members member = memberService.getById(id);
|
|
//清除设备信息
|
|
//清除设备信息
|
|
deviceService.clearDevice(id);
|
|
deviceService.clearDevice(id);
|