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;
}
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");
}
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;
}
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("用户名或密码错误!");
}