Merge branch 'feature/bug-558' into develop
This commit is contained in:
commit
77a1981f20
|
|
@ -62,8 +62,8 @@ public class AppController extends ControllerBase {
|
||||||
public ApiResult<AppLoginVO> login(String userName, String password) {
|
public ApiResult<AppLoginVO> login(String userName, String password) {
|
||||||
AppUser user = appUserService.getUser(userName, password);
|
AppUser user = appUserService.getUser(userName, password);
|
||||||
if (Objects.nonNull(user)) {
|
if (Objects.nonNull(user)) {
|
||||||
VUtils.trueThrowBusinessError(!PASSWORDENCODER.matches(password, user.getPassword()))
|
VUtils.trueThrow(!PASSWORDENCODER.matches(password, user.getPassword()))
|
||||||
.throwMessage(dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_INCORRECTUSERNAMEORPASSWORD, MultilingualUtil.getLanguage()));
|
.throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_INCORRECTUSERNAMEORPASSWORD, MultilingualUtil.getLanguage()));
|
||||||
VUtils.trueThrow(Objects.equals(user.getState(), UserState.Disabled.getState()))
|
VUtils.trueThrow(Objects.equals(user.getState(), UserState.Disabled.getState()))
|
||||||
.throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_ACCOUNT_DISABLED, user.getLanguageCode()));
|
.throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_ACCOUNT_DISABLED, user.getLanguageCode()));
|
||||||
VUtils.trueThrow(Objects.equals(user.getState(), UserState.ToBeActivated.getState()))
|
VUtils.trueThrow(Objects.equals(user.getState(), UserState.ToBeActivated.getState()))
|
||||||
|
|
@ -89,6 +89,8 @@ public class AppController extends ControllerBase {
|
||||||
.setPlatform(Constant.FROM_APP));
|
.setPlatform(Constant.FROM_APP));
|
||||||
} else {
|
} else {
|
||||||
AdminUser adminUser = adminUserService.getUser(userName, password);
|
AdminUser adminUser = adminUserService.getUser(userName, password);
|
||||||
|
VUtils.trueThrow(Objects.isNull(adminUser))
|
||||||
|
.throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_INCORRECTUSERNAMEORPASSWORD, MultilingualUtil.getLanguage()));
|
||||||
VUtils.trueThrow(Objects.equals(adminUser.getState(), UserState.Disabled.getState()))
|
VUtils.trueThrow(Objects.equals(adminUser.getState(), UserState.Disabled.getState()))
|
||||||
.throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_ACCOUNT_DISABLED, MultilingualUtil.getLanguage()));
|
.throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_ACCOUNT_DISABLED, MultilingualUtil.getLanguage()));
|
||||||
VUtils.trueThrow(Objects.equals(adminUser.getState(), UserState.ToBeActivated.getState()))
|
VUtils.trueThrow(Objects.equals(adminUser.getState(), UserState.ToBeActivated.getState()))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue