bug fix
This commit is contained in:
parent
345c020869
commit
17d57dbc7a
|
@ -238,7 +238,7 @@ public class UserServiceImpl implements UserService {
|
||||||
|
|
||||||
|
|
||||||
UserEntity data = this.entityManager.find(UserEntity.class, userId);
|
UserEntity data = this.entityManager.find(UserEntity.class, userId);
|
||||||
if (data == null) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{model.getId(), User.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
if (data == null) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{userId, User.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
||||||
|
|
||||||
AdditionalInfoEntity additionalInfoEntity = this.jsonHandlingService.fromJsonSafe(AdditionalInfoEntity.class, data.getAdditionalInfo());
|
AdditionalInfoEntity additionalInfoEntity = this.jsonHandlingService.fromJsonSafe(AdditionalInfoEntity.class, data.getAdditionalInfo());
|
||||||
if (additionalInfoEntity == null) additionalInfoEntity = new AdditionalInfoEntity();
|
if (additionalInfoEntity == null) additionalInfoEntity = new AdditionalInfoEntity();
|
||||||
|
@ -264,7 +264,7 @@ public class UserServiceImpl implements UserService {
|
||||||
|
|
||||||
|
|
||||||
UserEntity data = this.entityManager.find(UserEntity.class, userId);
|
UserEntity data = this.entityManager.find(UserEntity.class, userId);
|
||||||
if (data == null) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{model.getId(), User.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
if (data == null) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{userId, User.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
||||||
|
|
||||||
AdditionalInfoEntity additionalInfoEntity = this.jsonHandlingService.fromJsonSafe(AdditionalInfoEntity.class, data.getAdditionalInfo());
|
AdditionalInfoEntity additionalInfoEntity = this.jsonHandlingService.fromJsonSafe(AdditionalInfoEntity.class, data.getAdditionalInfo());
|
||||||
if (additionalInfoEntity == null) additionalInfoEntity = new AdditionalInfoEntity();
|
if (additionalInfoEntity == null) additionalInfoEntity = new AdditionalInfoEntity();
|
||||||
|
@ -288,9 +288,8 @@ public class UserServiceImpl implements UserService {
|
||||||
|
|
||||||
if (userId == null) throw new MyForbiddenException(this.errors.getForbidden().getCode(), this.errors.getForbidden().getMessage());
|
if (userId == null) throw new MyForbiddenException(this.errors.getForbidden().getCode(), this.errors.getForbidden().getMessage());
|
||||||
|
|
||||||
|
|
||||||
UserEntity data = this.entityManager.find(UserEntity.class, userId);
|
UserEntity data = this.entityManager.find(UserEntity.class, userId);
|
||||||
if (data == null) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{model.getId(), User.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
if (data == null) throw new MyNotFoundException(messageSource.getMessage("General_ItemNotFound", new Object[]{userId, User.class.getSimpleName()}, LocaleContextHolder.getLocale()));
|
||||||
|
|
||||||
AdditionalInfoEntity additionalInfoEntity = this.jsonHandlingService.fromJsonSafe(AdditionalInfoEntity.class, data.getAdditionalInfo());
|
AdditionalInfoEntity additionalInfoEntity = this.jsonHandlingService.fromJsonSafe(AdditionalInfoEntity.class, data.getAdditionalInfo());
|
||||||
if (additionalInfoEntity == null) additionalInfoEntity = new AdditionalInfoEntity();
|
if (additionalInfoEntity == null) additionalInfoEntity = new AdditionalInfoEntity();
|
||||||
|
|
Loading…
Reference in New Issue