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