web:设备分组 接口文档
This commit is contained in:
@ -3,6 +3,8 @@ package com.fuyuanshen.web.controller.device;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
@ -27,6 +29,7 @@ import com.fuyuanshen.equipment.service.IDeviceGroupService;
|
|||||||
* @author Lion Li
|
* @author Lion Li
|
||||||
* @date 2025-08-08
|
* @date 2025-08-08
|
||||||
*/
|
*/
|
||||||
|
@Tag(name = "web:设备分组", description = "web:设备分组")
|
||||||
@Validated
|
@Validated
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@ -39,6 +42,7 @@ public class DeviceGroupController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询设备分组列表
|
* 查询设备分组列表
|
||||||
*/
|
*/
|
||||||
|
@Operation(summary = "查询设备分组列表")
|
||||||
@SaCheckPermission("fys-equipment:group:list")
|
@SaCheckPermission("fys-equipment:group:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<List<DeviceGroupVo>> list(DeviceGroupBo bo) {
|
public R<List<DeviceGroupVo>> list(DeviceGroupBo bo) {
|
||||||
@ -64,6 +68,7 @@ public class DeviceGroupController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param id 主键
|
* @param id 主键
|
||||||
*/
|
*/
|
||||||
|
@Operation(summary = "获取设备分组详细信息")
|
||||||
@SaCheckPermission("fys-equipment:group:query")
|
@SaCheckPermission("fys-equipment:group:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<DeviceGroupVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
public R<DeviceGroupVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||||
@ -74,6 +79,7 @@ public class DeviceGroupController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 新增设备分组
|
* 新增设备分组
|
||||||
*/
|
*/
|
||||||
|
@Operation(summary = "新增设备分组")
|
||||||
@SaCheckPermission("fys-equipment:group:add")
|
@SaCheckPermission("fys-equipment:group:add")
|
||||||
@Log(title = "设备分组", businessType = BusinessType.INSERT)
|
@Log(title = "设备分组", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@ -86,6 +92,7 @@ public class DeviceGroupController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改设备分组
|
* 修改设备分组
|
||||||
*/
|
*/
|
||||||
|
@Operation(summary = "修改设备分组")
|
||||||
@SaCheckPermission("fys-equipment:group:edit")
|
@SaCheckPermission("fys-equipment:group:edit")
|
||||||
@Log(title = "设备分组", businessType = BusinessType.UPDATE)
|
@Log(title = "设备分组", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@ -99,6 +106,7 @@ public class DeviceGroupController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @param ids 主键串
|
* @param ids 主键串
|
||||||
*/
|
*/
|
||||||
|
@Operation(summary = "删除设备分组")
|
||||||
@SaCheckPermission("fys-equipment:group:remove")
|
@SaCheckPermission("fys-equipment:group:remove")
|
||||||
@Log(title = "设备分组", businessType = BusinessType.DELETE)
|
@Log(title = "设备分组", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
|
@ -219,6 +219,8 @@ springdoc:
|
|||||||
packages-to-scan: com.fuyuanshen.customer
|
packages-to-scan: com.fuyuanshen.customer
|
||||||
- group: APP模块
|
- group: APP模块
|
||||||
packages-to-scan: com.fuyuanshen.app
|
packages-to-scan: com.fuyuanshen.app
|
||||||
|
- group: 设备分组
|
||||||
|
packages-to-scan: com.fuyuanshen.web.controller.device
|
||||||
|
|
||||||
# 防止XSS攻击
|
# 防止XSS攻击
|
||||||
xss:
|
xss:
|
||||||
|
@ -30,18 +30,21 @@ public class DeviceGroupBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 分组名称
|
* 分组名称
|
||||||
*/
|
*/
|
||||||
|
@Schema(name = "分组名称")
|
||||||
@NotBlank(message = "分组名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotBlank(message = "分组名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String groupName;
|
private String groupName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态:0-禁用,1-正常
|
* 状态:0-禁用,1-正常
|
||||||
*/
|
*/
|
||||||
|
@Schema(name = "状态:0-禁用,1-正常")
|
||||||
// @NotNull(message = "状态:0-禁用,1-正常不能为空", groups = { AddGroup.class, EditGroup.class })
|
// @NotNull(message = "状态:0-禁用,1-正常不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private Long status;
|
private Long status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父分组ID
|
* 父分组ID
|
||||||
*/
|
*/
|
||||||
|
@Schema(name = "父分组ID")
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user