|  |  |  | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | @RequiresPermissions("business:category:create") | 
|---|
|  |  |  | public ApiResponse create(@RequestBody Category category) { | 
|---|
|  |  |  | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
|---|
|  |  |  | category.setLoginUserInfo(user); | 
|---|
|  |  |  | return ApiResponse.success(categoryService.create(category)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation("修改状态") | 
|---|
|  |  |  | @PostMapping("/updateStatus") | 
|---|
|  |  |  | @RequiresPermissions("system:category:update") | 
|---|
|  |  |  | @RequiresPermissions("business:category:update") | 
|---|
|  |  |  | public ApiResponse updateStatus( @RequestBody Category param) { | 
|---|
|  |  |  | categoryService.updateById(param); | 
|---|
|  |  |  | categoryService.updateStatus(param); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/updateById") | 
|---|
|  |  |  | @RequiresPermissions("business:category:update") | 
|---|
|  |  |  | public ApiResponse updateById(@RequestBody Category category) { | 
|---|
|  |  |  | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
|---|
|  |  |  | category.setLoginUserInfo(user); | 
|---|
|  |  |  | categoryService.updateById(category); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|