From 3ef9463644e5054b67485eec2d94f60aff8a5b35 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Sat, 21 Sep 2024 10:54:36 +0800 Subject: [PATCH] =?UTF-8?q?swagger=E8=AE=BE=E5=A4=87=E7=A6=BB=E7=BA=BF?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DcDeviceOfflineRecordController.java | 10 ++++++++++ .../business/domain/DcDeviceOfflineRecord.java | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcDeviceOfflineRecordController.java b/zc-business/src/main/java/com/zc/business/controller/DcDeviceOfflineRecordController.java index 53afadcc..4aa1645d 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcDeviceOfflineRecordController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcDeviceOfflineRecordController.java @@ -2,6 +2,9 @@ package com.zc.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -27,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @author ruoyi * @date 2024-09-18 */ +@Api(tags = "设备离线记录") @RestController @RequestMapping("/deviceOfflineRecord") public class DcDeviceOfflineRecordController extends BaseController @@ -37,6 +41,7 @@ public class DcDeviceOfflineRecordController extends BaseController /** * 查询设备离线记录列表 */ + @ApiOperation("查询设备离线记录列表") @GetMapping("/list") public TableDataInfo list(DcDeviceOfflineRecord dcDeviceOfflineRecord) { @@ -48,6 +53,7 @@ public class DcDeviceOfflineRecordController extends BaseController /** * 导出设备离线记录列表 */ + @ApiOperation("导出设备离线记录列表") @Log(title = "设备离线记录", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DcDeviceOfflineRecord dcDeviceOfflineRecord) @@ -60,6 +66,7 @@ public class DcDeviceOfflineRecordController extends BaseController /** * 获取设备离线记录详细信息 */ + @ApiOperation("获取设备离线记录详细信息") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { @@ -69,6 +76,7 @@ public class DcDeviceOfflineRecordController extends BaseController /** * 新增设备离线记录 */ + @ApiOperation("新增设备离线记录") @Log(title = "设备离线记录", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DcDeviceOfflineRecord dcDeviceOfflineRecord) @@ -79,6 +87,7 @@ public class DcDeviceOfflineRecordController extends BaseController /** * 修改设备离线记录 */ + @ApiOperation("修改设备离线记录") @Log(title = "设备离线记录", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody DcDeviceOfflineRecord dcDeviceOfflineRecord) @@ -89,6 +98,7 @@ public class DcDeviceOfflineRecordController extends BaseController /** * 删除设备离线记录 */ + @ApiOperation("删除设备离线记录") @Log(title = "设备离线记录", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) diff --git a/zc-business/src/main/java/com/zc/business/domain/DcDeviceOfflineRecord.java b/zc-business/src/main/java/com/zc/business/domain/DcDeviceOfflineRecord.java index e19b9b22..f694eb32 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcDeviceOfflineRecord.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcDeviceOfflineRecord.java @@ -1,5 +1,7 @@ package com.zc.business.domain; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -11,6 +13,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * @author ruoyi * @date 2024-09-18 */ +@ApiModel("设备离线记录对象") public class DcDeviceOfflineRecord extends BaseEntity { private static final long serialVersionUID = 1L; @@ -19,14 +22,17 @@ public class DcDeviceOfflineRecord extends BaseEntity private Long id; /** 设备表id */ + @ApiModelProperty(value="设备表id") @Excel(name = "设备表id") private Long deviceId; /** 物联id */ + @ApiModelProperty(value="物联id") @Excel(name = "物联id") private String iotDeviceId; /** 设备名称 */ + @ApiModelProperty(value="设备名称") @Excel(name = "设备名称") private String deviceName; @@ -49,25 +55,31 @@ public class DcDeviceOfflineRecord extends BaseEntity 16 远端机 */ @Excel(name = "设备类型") + @ApiModelProperty(value="设备类型") private String deviceType; /** 所在桩号 */ @Excel(name = "所在桩号") + @ApiModelProperty(value="所在桩号") private String stakeMark; /** 方向1-上行,2-中,3-下行 */ + @ApiModelProperty(value="方向") @Excel(name = "方向1-上行,2-中,3-下行") private String direction; /** 安装位置 */ @Excel(name = "安装位置") + @ApiModelProperty(value="安装位置") private String installationSite; /** 设备ip */ @Excel(name = "设备ip") + @ApiModelProperty(value="设备ip") private String deviceIp; /** 设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等 */ + @ApiModelProperty(value="设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等") @Excel(name = "设施归属类型", readConverterExp = "设施归属类型(0:默认1: 道路沿线2:桥梁3: 隧道4:收费广场5: 收费站6: 服务区等") private String facilitiesType; @@ -89,17 +101,21 @@ public class DcDeviceOfflineRecord extends BaseEntity 2-4 站前悬臂式可变信息标志192*160 */ @Excel(name = "子设备类型") + @ApiModelProperty(value="子设备类型") private String childType; /** 经度 */ @Excel(name = "经度") + @ApiModelProperty(value="经度") private String longitude; /** 纬度 */ @Excel(name = "纬度") + @ApiModelProperty(value="纬度") private String latitude; /** 状态(0未处理 1已处理 2自动处理) */ + @ApiModelProperty(value="状态(0未处理 1已处理 2自动处理)") @Excel(name = "状态(0未处理 1已处理 2自动处理)") private String status;