diff --git a/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipInfoDto.java b/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipInfoDto.java index 06e1e2d..99dcac6 100644 --- a/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipInfoDto.java +++ b/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipInfoDto.java @@ -1,12 +1,14 @@ package club.joylink.xiannccda.dto.alertTip; import club.joylink.xiannccda.alert.AlertTipTimeType; +import club.joylink.xiannccda.constants.common.LineTypeEnum; import club.joylink.xiannccda.dto.protos.AlertConstProto; import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType; import club.joylink.xiannccda.entity.AlertTip; import club.joylink.xiannccda.entity.AlertTipTimeConfig; import com.alibaba.fastjson2.annotation.JSONField; import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.v3.oas.annotations.media.Schema; import java.util.List; import lombok.Data; import lombok.Getter; @@ -19,12 +21,17 @@ import org.apache.commons.lang3.StringUtils; @Data public class AlertTipInfoDto { + @Schema(description = "id") private Integer id; - + @Schema(description = "线路id") + private Integer lineId; + @Schema(description = "线路类型") + private LineTypeEnum lineType; + @Schema(description = "报警设备类型") private String alertType; - + @Schema(description = "告警关联区域") private Long areaConfigId; - + @Schema(description = "区域名称") private String areaConfigName; /** diff --git a/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipQueryDTO.java b/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipQueryDTO.java index 49d2dba..717c91a 100644 --- a/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipQueryDTO.java +++ b/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipQueryDTO.java @@ -5,6 +5,7 @@ import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertLocation; import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType; import club.joylink.xiannccda.entity.AlertTip; import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -14,7 +15,9 @@ import lombok.Setter; @NoArgsConstructor public class AlertTipQueryDTO extends PageDTO { + @Schema(description = "告警类型") private String alertType; + @Schema(description = "时间类型") private String timeType; private String locationType; private Long areaConfigId; diff --git a/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipSaveDTO.java b/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipSaveDTO.java index c8eca86..faaa919 100644 --- a/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipSaveDTO.java +++ b/src/main/java/club/joylink/xiannccda/dto/alertTip/AlertTipSaveDTO.java @@ -1,8 +1,11 @@ package club.joylink.xiannccda.dto.alertTip; import club.joylink.xiannccda.alert.AlertTipTimeType; +import club.joylink.xiannccda.constants.common.LineTypeEnum; import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertLocation; import club.joylink.xiannccda.dto.protos.AlertConstProto.AlertType; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; import jakarta.validation.constraints.NotNull; import java.util.List; import lombok.Data; @@ -12,20 +15,33 @@ public class AlertTipSaveDTO { private Integer id; @NotNull(message = "报警类型不能为空") + @Schema(description = "故障类型") private AlertType alertType; + @Schema(description = "线路id", requiredMode = RequiredMode.REQUIRED) + private Integer lineId; + @Schema(description = "线路类型", requiredMode = RequiredMode.REQUIRED) + private LineTypeEnum lineType; +/* + @Deprecated + @Schema(description = "故障类型") private AlertTipTimeType timeType; +*/ // private AlertLocation locationType; + @Schema(description = "地点位置关联") private Long areaConfigId; /** * 行车方面提示信息 */ + @Schema(description = "行车方面信息") private String drivingInfo; /** * 信息报送方面提示信息 */ + @Schema(description = "信息报送") private String submissionInfo; + @Schema(description = "高低峰关联") private List tipTimeIds; } diff --git a/src/main/java/club/joylink/xiannccda/dto/event/EventLogPageDTO.java b/src/main/java/club/joylink/xiannccda/dto/event/EventLogPageDTO.java index 0c547ea..da1bd4b 100644 --- a/src/main/java/club/joylink/xiannccda/dto/event/EventLogPageDTO.java +++ b/src/main/java/club/joylink/xiannccda/dto/event/EventLogPageDTO.java @@ -10,26 +10,26 @@ import lombok.Data; public class EventLogPageDTO { private Long id; - @Schema(name = "接口名称") + @Schema(description = "接口名称") private String faceName; - @Schema(name = "接口请求大类") + @Schema(description = "接口请求大类") private CommonLogTypeEnum eventType; - @Schema(name = "接口请求类别") + @Schema(description = "接口请求类别") private CommonLogTypeEnum.SubEventType subEventType; - @Schema(name = "接口uri") + @Schema(description = "接口uri") private String uri; - @Schema(name = "接口uri method") + @Schema(description = "接口uri method") private String method; - @Schema(name = "接口请求参数") + @Schema(description = "接口请求参数") private String parameters; - @Schema(name = "接口执行结果0=失败,1=成功") + @Schema(description = "接口执行结果0=失败,1=成功") private Integer requestSuccess; - @Schema(name = "操作人姓名") + @Schema(description = "操作人姓名") private String userName; - @Schema(name = "操作人id") + @Schema(description = "操作人id") private Long fromUserId; - @Schema(name = "操作人电话") + @Schema(description = "操作人电话") private String mobile; - @Schema(name = "操作时间") + @Schema(description = "操作时间") private LocalDateTime createDateTime; } diff --git a/src/main/java/club/joylink/xiannccda/dto/user/UserInfoAuthDTO.java b/src/main/java/club/joylink/xiannccda/dto/user/UserInfoAuthDTO.java index 9f7ab48..2732b17 100644 --- a/src/main/java/club/joylink/xiannccda/dto/user/UserInfoAuthDTO.java +++ b/src/main/java/club/joylink/xiannccda/dto/user/UserInfoAuthDTO.java @@ -9,11 +9,11 @@ import lombok.Data; @Data public class UserInfoAuthDTO { - @Schema(name = "token剩余时间 (秒)") + @Schema(description = "token剩余时间 (秒)") private Long remainingSecond; - @Schema(name = "用户角色") + @Schema(description = "用户角色") private List roles; - @Schema(name = "用户默认角色") + @Schema(description = "用户默认角色") private DefaultUserRuleEnum defaultRole; public UserInfoAuthDTO(Long remainingSecond, List roles, DefaultUserRuleEnum defaultRole) { diff --git a/src/main/java/club/joylink/xiannccda/dto/user/UserTokenDTO.java b/src/main/java/club/joylink/xiannccda/dto/user/UserTokenDTO.java index 51346b4..88849e2 100644 --- a/src/main/java/club/joylink/xiannccda/dto/user/UserTokenDTO.java +++ b/src/main/java/club/joylink/xiannccda/dto/user/UserTokenDTO.java @@ -1,5 +1,6 @@ package club.joylink.xiannccda.dto.user; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; @@ -7,6 +8,8 @@ import lombok.Data; @AllArgsConstructor public class UserTokenDTO { + @Schema(description = "新的token") private String token; + @Schema(description = "剩余时间(秒)") private long remainingSecond; } diff --git a/src/main/java/club/joylink/xiannccda/entity/AlertTip.java b/src/main/java/club/joylink/xiannccda/entity/AlertTip.java index d42bd6c..e4a371e 100644 --- a/src/main/java/club/joylink/xiannccda/entity/AlertTip.java +++ b/src/main/java/club/joylink/xiannccda/entity/AlertTip.java @@ -1,5 +1,6 @@ package club.joylink.xiannccda.entity; +import club.joylink.xiannccda.constants.common.LineTypeEnum; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -29,6 +30,10 @@ public class AlertTip { @Schema(description = "故障类型") private String alertType; + @Schema(description = "线路id") + private Integer lineId; + @Schema(description = "线路类型") + private LineTypeEnum lineType; /* @Schema(description = "时间定义类型") private String timeType;*/ diff --git a/src/main/java/club/joylink/xiannccda/entity/AuthRole.java b/src/main/java/club/joylink/xiannccda/entity/AuthRole.java index 32a168d..9b99f9b 100644 --- a/src/main/java/club/joylink/xiannccda/entity/AuthRole.java +++ b/src/main/java/club/joylink/xiannccda/entity/AuthRole.java @@ -53,7 +53,9 @@ public class AuthRole { @Data public static class RoleConfig { + @Schema(description = "线路id") private Integer lineId; + @Schema(description = "线路类型") private LineTypeEnum lineType; }