use of com.besscroft.aurora.mall.common.annotation.WebLog in project aurora-mall by besscroft.
the class MenuController method changeSwitch.
@WebLog(description = "菜单是否显示状态更新")
@ApiOperation("菜单是否显示状态更新")
@ApiImplicitParams({ @ApiImplicitParam(name = "hidden", value = "显示状态", required = true, dataType = "Boolean"), @ApiImplicitParam(name = "id", value = "菜单id", required = true, dataType = "Long") })
@PutMapping("/changeSwitch")
public AjaxResult changeSwitch(@RequestParam("hidden") boolean hidden, @RequestParam("id") Long id) {
AuthUser currentAdmin = userService.getCurrentAdmin();
boolean b = menuService.changeSwitch(hidden, id, currentAdmin.getId());
if (b) {
return AjaxResult.success("修改成功");
}
return AjaxResult.success("修改失败");
}
use of com.besscroft.aurora.mall.common.annotation.WebLog 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.annotation.WebLog in project aurora-mall by besscroft.
the class UserController method login.
@WebLog(description = "登录接口")
@ApiOperation(value = "登录并返回token")
@PostMapping(value = "/login")
public AjaxResult login(@Validated @RequestBody UserLoginParam userLoginParam) {
log.info("请求进来了,打印UserLoginParam:{}", userLoginParam);
AjaxResult result = userService.login(userLoginParam.getUsername(), userLoginParam.getPassword());
log.info("请求进来了,oauth2Token:{}", result);
return AjaxResult.success(result);
}
use of com.besscroft.aurora.mall.common.annotation.WebLog in project aurora-mall by besscroft.
the class UserController method getUser.
@WebLog(description = "查询权限管理模块用户详情")
@ApiOperation("查询权限管理模块用户详情")
@ApiImplicitParam(name = "id", value = "用户id", required = true, dataType = "Long")
@GetMapping("/getUser/{id}")
public AjaxResult getUser(@PathVariable("id") Long id) {
AuthUser user = userService.getUserById(id);
user.setPassword("");
return AjaxResult.success(user);
}
Aggregations