Search in sources :

Example 6 with SysUser

use of com.artlongs.sys.model.SysUser in project act-eagle-allone by mailtous.

the class SysUserService method getMyRoleList.

public List<Integer> getMyRoleList(Integer sysUserId) {
    List<Integer> roleIdList = C.newList();
    SysUser sysUser = sysUserDao.get(new Long(sysUserId));
    if (null != sysUser) {
        roleIdList = sysUser.roleIdList();
    }
    return roleIdList;
}
Also used : SysUser(com.artlongs.sys.model.SysUser)

Example 7 with SysUser

use of com.artlongs.sys.model.SysUser in project act-eagle-allone by mailtous.

the class SysHomeController method home.

@GetAction({ "home", "" })
public RenderAny home(H.Session session, H.Request req) {
    H.Cookie cookie = SysUser.getMyCookie(req);
    if (null == cookie) {
        to("/sys/login");
    }
    SysUser sysUser = session.cached(cookie.value());
    if (null == sysUser) {
        to("/sys/login");
    }
    ctx.renderArg("sysUser", sysUser);
    ctx.renderArg("menuDataUrl", "/sys/home/my/menu.json?userId=" + sysUser.getId());
    return render("home.html");
}
Also used : SysUser(com.artlongs.sys.model.SysUser) H(org.osgl.http.H) GetAction(org.osgl.mvc.annotation.GetAction)

Example 8 with SysUser

use of com.artlongs.sys.model.SysUser in project act-eagle-allone by mailtous.

the class SysUserService method getByName.

public SysUser getByName(String userName) {
    String sql = " select * from sys_user where user_name = ?";
    SysUser sysUser = sysUserDao.getObj(sql, new Object[] { userName });
    return sysUser;
}
Also used : SysUser(com.artlongs.sys.model.SysUser)

Example 9 with SysUser

use of com.artlongs.sys.model.SysUser in project act-eagle-allone by mailtous.

the class SysUserService method checkLogin.

public R checkLogin(String userName, String pwd) {
    R r = new R();
    SysUser sysUser = sysUserDao.checkLogin(userName, pwd);
    r.setItem(sysUser);
    return null != sysUser ? r.setSuccess("登录成功。") : r.setFail("用户名或密码错误!");
}
Also used : R(com.artlongs.framework.vo.R) SysUser(com.artlongs.sys.model.SysUser)

Aggregations

SysUser (com.artlongs.sys.model.SysUser)9 R (com.artlongs.framework.vo.R)3 GetAction (org.osgl.mvc.annotation.GetAction)2 PostAction (org.osgl.mvc.annotation.PostAction)2 SysRole (com.artlongs.sys.model.SysRole)1 Date (java.util.Date)1 H (org.osgl.http.H)1