use of org.osgl.mvc.annotation.PostAction in project act-eagle-allone by mailtous.
the class SysUserController method del.
@PostAction("del/{id}")
public RenderJSON del(Long id) {
SysUser sysUser = sysUserService.get(id);
if (null != sysUser) {
sysUser.setDelStatus(BaseEntity.DELETED);
sysUserService.update(sysUser);
return json(R.success("用户删除成功!"));
}
return json(R.fail("用户删除失败!"));
}
use of org.osgl.mvc.annotation.PostAction in project act-eagle-allone by mailtous.
the class SysUserController method assignPerm.
/**
* 保存---分配角色
* @param funcId
* @param roleAssignVoList
* @return
*/
@PostAction("assign/role/{userId}")
public RenderJSON assignPerm(Long userId, List<RoleAssignVo> roleAssignVoList) {
SysUser sysUser = sysUserService.get(userId);
if (null == sysUser)
return json(R.fail("用户不存在。"));
R r = sysUserService.assignRole(roleAssignVoList, sysUser);
return json(r);
}
use of org.osgl.mvc.annotation.PostAction in project act-eagle-allone by mailtous.
the class SysFuncController method assignPerm.
/**
* 保存--权限分配
* @param funcId
* @param roleAssignVoList
* @return
*/
@PostAction("assign/perm/{funcId}")
public RenderJSON assignPerm(Long funcId, List<RoleAssignVo> roleAssignVoList) {
SysFunc sysFunc = sysFuncService.get(new Long(funcId));
if (null == sysFunc)
return json(R.fail("功能或菜单不存在。"));
R r = sysPermissionService.savePermissionOfAssign(roleAssignVoList);
return json(r);
}
use of org.osgl.mvc.annotation.PostAction in project act-eagle-allone by mailtous.
the class SysLoginController method loginPost.
@PostAction("post")
public RenderAny loginPost(String userName, String pwd, H.Session session, H.Response response) {
R vo = loginCheck(userName, pwd, session, response);
if (vo.isSucc()) {
to("/sys/home");
}
ctx.renderArg("loginMsg", vo.getMsg());
return render("login.html");
}
use of org.osgl.mvc.annotation.PostAction in project actframework by actframework.
the class CliOverHttp method run.
@PostAction("cmd")
public Result run(String cmd, ActionContext context) throws IOException {
CliHandler handler = handler(cmd);
ByteArrayOutputStream os = new ByteArrayOutputStream();
CliContext cliContext = new CliOverHttpContext(context, os);
handler.handle(cliContext);
cliContext.flush();
String txt = new String(os.toByteArray(), "UTF-8");
txt = txt.replace("^J", "\n");
return text(txt);
}
Aggregations