From c13a4ace55d547a40022b96cf975f1e8e3983a74 Mon Sep 17 00:00:00 2001 From: lyf66 Date: Wed, 24 Jan 2024 17:14:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0op?= =?UTF-8?q?enapi=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 13 ------------- .../xyt/controller/BzProtocolInfoController.java | 8 +++++++- .../xyt/controller/BzServiceResourceController.java | 12 +++++++++++- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index f05decc..818ec7c 100644 --- a/pom.xml +++ b/pom.xml @@ -34,19 +34,6 @@ org.apache.maven.plugins maven-dependency-plugin - - - copy-lib - - copy-dependencies - - - false - false - runtime - - - diff --git a/src/main/java/com/gunshi/project/xyt/controller/BzProtocolInfoController.java b/src/main/java/com/gunshi/project/xyt/controller/BzProtocolInfoController.java index fbd5ba2..df762e5 100644 --- a/src/main/java/com/gunshi/project/xyt/controller/BzProtocolInfoController.java +++ b/src/main/java/com/gunshi/project/xyt/controller/BzProtocolInfoController.java @@ -8,6 +8,7 @@ import com.gunshi.project.xyt.service.ProtocolInfoService; import com.gunshi.project.xyt.so.BzProtocolInfoSo; import com.gunshi.project.xyt.validate.markers.Insert; import com.gunshi.project.xyt.validate.markers.Update; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; @@ -24,7 +25,7 @@ import java.util.Date; */ @RestController @RequestMapping("/protocolInfo") -@Tag(name = "协议信息") +@Tag(name = "系统管理-统一接收-协议管理") public class BzProtocolInfoController { @Autowired private BzProtocolInfoAutoDao dao; @@ -32,6 +33,7 @@ public class BzProtocolInfoController { @Autowired private ProtocolInfoService service; + @Operation(summary = "新增协议信息") @PostMapping("/save") public R save(@Validated({Insert.class}) @RequestBody BzProtocolInfo entity) { // todo 无论是数据库设置默认值为GETDATE()还是使用注解fill = FieldFill.INSERT都不能自动插入当前时间 @@ -40,21 +42,25 @@ public class BzProtocolInfoController { return R.ok(dao.save(entity)); } + @Operation(summary = "更新协议信息") @PostMapping("/update") public R update(@Validated({Update.class}) @RequestBody BzProtocolInfo entity) { return R.ok(dao.updateById(entity)); } + @Operation(summary = "删除协议信息") @GetMapping("/delete/{id}") public R delete(@PathVariable String id) { return R.ok(dao.removeById(id)); } + @Operation(summary = "按id查询接口") @GetMapping("/get/{id}") public R getById(@PathVariable("id") String id) { return R.ok(dao.getById(id)); } + @Operation(summary = "分页查询接口") @PostMapping("/page") public R> page(@Validated @RequestBody BzProtocolInfoSo so) { return R.ok(service.page(so)); diff --git a/src/main/java/com/gunshi/project/xyt/controller/BzServiceResourceController.java b/src/main/java/com/gunshi/project/xyt/controller/BzServiceResourceController.java index 6baaaed..58074a9 100644 --- a/src/main/java/com/gunshi/project/xyt/controller/BzServiceResourceController.java +++ b/src/main/java/com/gunshi/project/xyt/controller/BzServiceResourceController.java @@ -16,6 +16,7 @@ import com.gunshi.project.xyt.validate.markers.QueryPage; import com.gunshi.project.xyt.validate.markers.QueryTimeRange; import com.gunshi.project.xyt.validate.markers.Update; import com.gunshi.project.xyt.vo.BzServiceResourceMonitorVo; +import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -33,7 +34,7 @@ import java.util.Date; */ @RestController @RequestMapping("/serviceResource") -@Tag(name = "服务资源及监控") +@Tag(name = "系统管理-数据共享服务-服务资源及监控") public class BzServiceResourceController { @Autowired @@ -45,6 +46,7 @@ public class BzServiceResourceController { @Autowired private BzServiceResourceTypeAutoDao serviceTypeDao; + @Operation(summary = "新增服务资源") @PostMapping("/save") public R save(@Validated(Insert.class) @RequestBody BzServiceResource entity) { entity.setId(IdWorker.getIdStr()); @@ -53,6 +55,7 @@ public class BzServiceResourceController { return R.ok(serviceResourceDao.save(entity)); } + @Operation(summary = "更新服务资源") @PostMapping("/update") public R update(@Validated(Update.class) @RequestBody BzServiceResource entity) { BzServiceResource byId = serviceResourceDao.getById(entity.getId()); @@ -64,11 +67,13 @@ public class BzServiceResourceController { return R.ok(serviceResourceDao.updateById(entity)); } + @Operation(summary = "删除服务资源") @GetMapping("/delete/{id}") public R delete(@PathVariable("id") String id) { return R.ok(serviceMonitorService.removeById(id)); } + @Operation(summary = "分页查询服务资源") @PostMapping("/page") public R> page( @Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so @@ -86,6 +91,7 @@ public class BzServiceResourceController { return R.ok(page); } + @Operation(summary = "分页查询服务资源监控") @PostMapping("/monitor/page") public R> pageMonitorR( @Validated({QueryPage.class, QueryTimeRange.class}) @RequestBody BzServiceResourceSo so @@ -94,22 +100,26 @@ public class BzServiceResourceController { return R.ok(page); } + @Operation(summary = "新增服务资源类型") @PostMapping("/type/save") public R saveType(@Validated(Insert.class) @RequestBody BzServiceResourceType entity) { entity.setId(IdWorker.getIdStr()); return R.ok(serviceTypeDao.save(entity)); } + @Operation(summary = "更新服务资源类型") @PostMapping("/type/update") public R updateType(@Validated(Update.class) @RequestBody BzServiceResourceType entity) { return R.ok(serviceTypeDao.updateById(entity)); } + @Operation(summary = "删除服务资源类型") @GetMapping("/type/delete/{id}") public R deleteType(@PathVariable("id") String id) { return R.ok(serviceTypeDao.removeById(id)); } + @Operation(summary = "分页查询服务资源类型") @PostMapping("/type/page") public R> pageType( @Validated({QueryPage.class}) @RequestBody BzServiceResourceTypeSo so