| | |
| | | return new FebsResponse().success().message("新增成功"); |
| | | } |
| | | |
| | | /** |
| | | * 新闻分类-删除 |
| | | */ |
| | | @GetMapping("delNewsCategoryInfo/{id}") |
| | | @ControllerEndpoint(operation = "新闻分类-删除", exceptionMessage = "操作失败") |
| | | public FebsResponse delNewsCategoryInfo(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return mallNewsInfoService.delNewsCategoryInfo(id); |
| | | } |
| | | |
| | | @GetMapping(value = "findAllCategoryList") |
| | | public FebsResponse findAllCategoryList() { |
| | | List<MallNewsCategory> categories = mallNewsInfoService.findAllCategory(); |
| | | return new FebsResponse().success().data(categories); |
| | | } |
| | | |
| | | @PostMapping(value = "/topNews/{id}") |
| | | public FebsResponse topNews(@PathVariable Long id) { |
| | | MallNewsInfo mallNewsInfo = new MallNewsInfo(); |
| | | mallNewsInfo.setIsTop(1); |
| | | mallNewsInfo.setId(id); |
| | | mallNewsInfoService.updateById(mallNewsInfo); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @PostMapping(value = "/unTopNews/{id}") |
| | | public FebsResponse unTopNews(@PathVariable Long id) { |
| | | MallNewsInfo mallNewsInfo = new MallNewsInfo(); |
| | | mallNewsInfo.setIsTop(2); |
| | | mallNewsInfo.setId(id); |
| | | mallNewsInfoService.updateById(mallNewsInfo); |
| | | return new FebsResponse().success(); |
| | | } |
| | | } |