Search in sources :

Example 1 with WebLog

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("修改失败");
}
Also used : AuthUser(com.besscroft.aurora.mall.common.entity.AuthUser) WebLog(com.besscroft.aurora.mall.common.annotation.WebLog) ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) ApiOperation(io.swagger.annotations.ApiOperation)

Example 2 with WebLog

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);
}
Also used : AuthMenu(com.besscroft.aurora.mall.common.entity.AuthMenu) AuthUser(com.besscroft.aurora.mall.common.entity.AuthUser) WebLog(com.besscroft.aurora.mall.common.annotation.WebLog) ApiOperation(io.swagger.annotations.ApiOperation)

Example 3 with WebLog

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);
}
Also used : AjaxResult(com.besscroft.aurora.mall.common.result.AjaxResult) WebLog(com.besscroft.aurora.mall.common.annotation.WebLog) ApiOperation(io.swagger.annotations.ApiOperation)

Example 4 with WebLog

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);
}
Also used : AuthUser(com.besscroft.aurora.mall.common.entity.AuthUser) WebLog(com.besscroft.aurora.mall.common.annotation.WebLog) ApiOperation(io.swagger.annotations.ApiOperation) ApiImplicitParam(io.swagger.annotations.ApiImplicitParam)

Aggregations

WebLog (com.besscroft.aurora.mall.common.annotation.WebLog)4 ApiOperation (io.swagger.annotations.ApiOperation)4 AuthUser (com.besscroft.aurora.mall.common.entity.AuthUser)3 AuthMenu (com.besscroft.aurora.mall.common.entity.AuthMenu)1 AjaxResult (com.besscroft.aurora.mall.common.result.AjaxResult)1 ApiImplicitParam (io.swagger.annotations.ApiImplicitParam)1 ApiImplicitParams (io.swagger.annotations.ApiImplicitParams)1