use of com.besscroft.aurora.mall.common.entity.AuthMenu in project aurora-mall by besscroft.
the class MenuServiceTest method addMenu.
@Test
void addMenu() {
AuthMenu authMenu = AuthMenu.builder().id(1000L).name("测试菜单").level(1).parentId(1L).parentTitle("测试父菜单").sort(10).title("测试菜单").createTime(LocalDateTime.now()).hidden(0).component("").build();
boolean b = menuService.addMenu(authMenu);
assertNotNull(b, "新增菜单失败!");
}
use of com.besscroft.aurora.mall.common.entity.AuthMenu in project aurora-mall by besscroft.
the class MenuServiceTest method getMenuById.
@Test
void getMenuById() throws JsonProcessingException {
Long menuId = 1L;
AuthMenu authMenu = menuService.getMenuById(menuId);
assertNotNull(authMenu, "获取菜单失败!");
LOGGER.info("菜单:{}", objectMapper.writeValueAsString(authMenu));
}
use of com.besscroft.aurora.mall.common.entity.AuthMenu in project aurora-mall by besscroft.
the class MenuController method getRouter.
@WebLog(description = "获取当前用户管理系统菜单")
@ApiOperation(value = "获取当前用户管理系统菜单")
@GetMapping(value = "/getMenu")
public AjaxResult getRouter() {
AuthUser currentAdmin = userService.getCurrentAdmin();
List<AuthMenu> list = menuService.getMenuListById(currentAdmin.getId());
log.info("菜单:{}", list);
return AjaxResult.success(list);
}
use of com.besscroft.aurora.mall.common.entity.AuthMenu in project aurora-mall by besscroft.
the class MenuServiceTest method updateMenu.
@Test
void updateMenu() {
AuthMenu authMenu = AuthMenu.builder().name("测试菜单").level(1).parentId(1L).parentTitle("测试父菜单").sort(10).title("测试菜单").createTime(LocalDateTime.now()).hidden(0).component("").build();
boolean b = menuService.updateMenu(authMenu);
assertNotNull(b, "更新菜单失败!");
}
Aggregations