use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class LogController method list.
/**
* 查询操作日志列表
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String logName, @RequestParam(required = false) Integer logType) {
Page<OperationLog> page = new PageFactory<OperationLog>().defaultPage();
List<Map<String, Object>> result = logDao.getOperationLogs(page, beginTime, endTime, logName, BizLogType.valueOf(logType), page.getOrderByField(), page.isAsc());
page.setRecords((List<OperationLog>) new LogWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class LoginLogController method list.
/**
* 查询登录日志列表
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String logName) {
Page<OperationLog> page = new PageFactory<OperationLog>().defaultPage();
List<Map<String, Object>> result = logDao.getLoginLogs(page, beginTime, endTime, logName, page.getOrderByField(), page.isAsc());
page.setRecords((List<OperationLog>) new LogWarpper(result).warp());
return super.packForBT(page);
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class MenuController method menuEdit.
/**
* 跳转到菜单详情列表页面
*/
@Permission(Const.ADMIN_NAME)
@RequestMapping(value = "/menu_edit/{menuId}")
public String menuEdit(@PathVariable Integer menuId, Model model) {
if (ToolUtil.isEmpty(menuId)) {
throw new BussinessException(BizExceptionEnum.REQUEST_NULL);
}
Menu menu = this.menuMapper.selectById(menuId);
// 获取父级菜单的id
Menu temp = new Menu();
temp.setCode(menu.getPcode());
Menu pMenu = this.menuMapper.selectOne(temp);
// 如果父级是顶级菜单
if (pMenu == null) {
menu.setPcode("0");
} else {
// 设置父级菜单的code为父级菜单的id
menu.setPcode(String.valueOf(pMenu.getId()));
}
Map<String, Object> menuMap = BeanKit.beanToMap(menu);
menuMap.put("pcodeName", ConstantFactory.me().getMenuNameByCode(temp.getCode()));
model.addAttribute("menu", menuMap);
LogObjectHolder.me().set(menu);
return PREFIX + "menu_edit.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class RoleController method roleEdit.
/**
* 跳转到修改角色
*/
@Permission
@RequestMapping(value = "/role_edit/{roleId}")
public String roleEdit(@PathVariable Integer roleId, Model model) {
if (ToolUtil.isEmpty(roleId)) {
throw new BussinessException(BizExceptionEnum.REQUEST_NULL);
}
Role role = this.roleMapper.selectById(roleId);
model.addAttribute(role);
model.addAttribute("pName", ConstantFactory.me().getSingleRoleName(role.getPid()));
model.addAttribute("deptName", ConstantFactory.me().getDeptName(role.getDeptid()));
LogObjectHolder.me().set(role);
return PREFIX + "/role_edit.html";
}
use of com.ikoori.vip.common.annotion.Permission in project vip by guangdada.
the class UserMgrController method roleAssign.
/**
* 跳转到角色分配页面
*/
@Permission
@RequestMapping("/role_assign/{userId}")
public String roleAssign(@PathVariable Integer userId, Model model) {
if (ToolUtil.isEmpty(userId)) {
throw new BussinessException(BizExceptionEnum.REQUEST_NULL);
}
User user = (User) Db.create(UserMapper.class).selectOneByCon("id", userId);
model.addAttribute("userId", userId);
model.addAttribute("userAccount", user.getAccount());
return PREFIX + "user_roleassign.html";
}
Aggregations