From b1516fedd7deedb61641321158fce862f77b4b4d Mon Sep 17 00:00:00 2001 From: fangyuan <527392886@qq.com> Date: 星期二, 22 十一月 2022 11:51:53 +0800 Subject: [PATCH] 更新访问路径白名单,部分接口修改 --- ycl-platform/src/main/java/com/ycl/controller/NewsPoliceController.java | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/NewsPoliceController.java b/ycl-platform/src/main/java/com/ycl/controller/NewsPoliceController.java index 6c8d759..815d910 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/NewsPoliceController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/NewsPoliceController.java @@ -9,6 +9,8 @@ import com.ycl.entity.NewsPolice; import com.ycl.service.NewsAdminService; import com.ycl.service.NewsPoliceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; @@ -27,6 +29,7 @@ */ @RestController @RequestMapping("newsPolice") +@Api(tags = "璀﹀憳绠$悊") public class NewsPoliceController extends ApiController { /** * 鏈嶅姟瀵硅薄 @@ -45,6 +48,7 @@ * @return 鎵�鏈夋暟鎹� */ @GetMapping + @ApiOperation(value = "鏌ヨ鎵�鏈夋暟鎹�") public R selectAll(Page<NewsPolice> page, NewsPolice newsPolice) { return success(this.newsPoliceService.page(page, new QueryWrapper<>(newsPolice))); } @@ -56,6 +60,7 @@ * @return 鍗曟潯鏁版嵁 */ @GetMapping("{id}") + @ApiOperation(value = "鎸塱d鏌ヨ鏁版嵁") public R selectOne(@PathVariable Serializable id) { return success(this.newsPoliceService.getById(id)); } @@ -68,6 +73,7 @@ */ @Transactional(rollbackFor = SQLException.class) @PostMapping + @ApiOperation(value = "鏂板璀﹀憳骞舵敞鍐�") public R insert(@RequestBody NewsPolice newsPolice) { this.newsPoliceService.save(newsPolice); return success(newsAdminService.autoCreateAdmin(newsPolice)); @@ -80,6 +86,7 @@ * @return 淇敼缁撴灉 */ @PutMapping + @ApiOperation(value = "淇敼鏁版嵁") public R update(@RequestBody NewsPolice newsPolice) { return success(this.newsPoliceService.updateById(newsPolice)); } @@ -91,6 +98,7 @@ * @return 鍒犻櫎缁撴灉 */ @DeleteMapping + @ApiOperation(value = "鍒犻櫎鏁版嵁") public R delete(@RequestParam("idList") List<Long> idList) { return success(this.newsPoliceService.removeByIds(idList)); } -- Gitblit v1.8.0