Search in sources :

Example 6 with AgileSysUser

use of com.jeeagile.system.entity.AgileSysUser in project jeeagile by jeeagile.

the class AgileSysUserServiceImpl method selectModel.

@Override
public AgileSysUser selectModel(Serializable userId) {
    AgileSysUser agileSysUser = this.getById(userId);
    agileSysUser.setRoleIdList(this.selectUserRoleIdList(userId));
    agileSysUser.setPostIdList(this.selectUserPostIdList(userId));
    return agileSysUser;
}
Also used : AgileSysUser(com.jeeagile.system.entity.AgileSysUser)

Example 7 with AgileSysUser

use of com.jeeagile.system.entity.AgileSysUser in project jeeagile by jeeagile.

the class AgileSysUserServiceImpl method resetUserPwd.

@Override
public boolean resetUserPwd(AgileUpdatePwd agileUpdatePwd) {
    String userPwd = agileUpdatePwd.getNewPwd();
    if (AgileStringUtil.isEmpty(userPwd)) {
        userPwd = agileSysConfigService.getDefaultPwd();
    }
    userPwd = AgileSecurityUtil.encryptPassword(userPwd);
    AgileSysUser agileSysUser = new AgileSysUser();
    agileSysUser.setId(agileUpdatePwd.getUserId());
    agileSysUser.setUserPwd(userPwd);
    return this.updateById(agileSysUser);
}
Also used : AgileSysUser(com.jeeagile.system.entity.AgileSysUser)

Example 8 with AgileSysUser

use of com.jeeagile.system.entity.AgileSysUser in project jeeagile by jeeagile.

the class AgileSysUserServiceImpl method changeUserStatus.

@Override
public boolean changeUserStatus(AgileUpdateStatus agileUpdateStatus) {
    AgileSysUser agileSysUser = new AgileSysUser();
    agileSysUser.setId(agileUpdateStatus.getId());
    agileSysUser.setUserStatus(agileUpdateStatus.getStatus());
    return this.updateById(agileSysUser);
}
Also used : AgileSysUser(com.jeeagile.system.entity.AgileSysUser)

Example 9 with AgileSysUser

use of com.jeeagile.system.entity.AgileSysUser in project jeeagile by jeeagile.

the class AgileUserDetailsServiceImpl method getUserDataByLoginName.

@Override
public AgileUserData getUserDataByLoginName(String loginName) {
    try {
        AgileSysUser agileSysUser = this.getAgileSysUser(loginName);
        if (agileSysUser == null) {
            throw new AgileAuthException("用户《" + loginName + "》不存在,请核实!");
        }
        this.checkAgileSysUser(agileSysUser);
        return getAgileUserData(agileSysUser);
    } catch (AgileBaseException ex) {
        throw ex;
    } catch (Exception ex) {
        throw new AgileAuthException("加载用户信息异常!");
    }
}
Also used : AgileBaseException(com.jeeagile.core.exception.AgileBaseException) AgileSysUser(com.jeeagile.system.entity.AgileSysUser) AgileAuthException(com.jeeagile.core.exception.AgileAuthException) AgileAuthException(com.jeeagile.core.exception.AgileAuthException) AgileBaseException(com.jeeagile.core.exception.AgileBaseException)

Example 10 with AgileSysUser

use of com.jeeagile.system.entity.AgileSysUser in project jeeagile by jeeagile.

the class AgileUserDetailsServiceImpl method getUserDataByUserId.

@Override
public AgileBaseUser getUserDataByUserId(String userId) {
    try {
        AgileSysUser agileSysUser = agileSysUserService.getById(userId);
        this.checkAgileSysUser(agileSysUser);
        return getAgileUserData(agileSysUserService.getById(userId));
    } catch (AgileBaseException ex) {
        throw ex;
    } catch (Exception ex) {
        throw new AgileAuthException("加载用户信息异常!");
    }
}
Also used : AgileBaseException(com.jeeagile.core.exception.AgileBaseException) AgileSysUser(com.jeeagile.system.entity.AgileSysUser) AgileAuthException(com.jeeagile.core.exception.AgileAuthException) AgileAuthException(com.jeeagile.core.exception.AgileAuthException) AgileBaseException(com.jeeagile.core.exception.AgileBaseException)

Aggregations

AgileSysUser (com.jeeagile.system.entity.AgileSysUser)10 AgileAuthException (com.jeeagile.core.exception.AgileAuthException)3 AgileBaseException (com.jeeagile.core.exception.AgileBaseException)3 AgileBaseUser (com.jeeagile.core.security.user.AgileBaseUser)3 AgileValidateException (com.jeeagile.core.exception.AgileValidateException)1 AgilePersonInfo (com.jeeagile.system.vo.AgilePersonInfo)1