feat: 接口字段补 @Schema 中文说明 + 精简冗余字段 + 接入 Prometheus 监控
- 全部 VO 字段补 @Schema(description) 中文说明,在线文档字段可读 - AppEpisodeVO 精简 duration/isFree 冗余字段(保留 durationSec/locked) - framework 引入 actuator + micrometer-registry-prometheus - SecurityConfig 放行 /actuator/prometheus,双服务配置 management 暴露指标 - 新增 deploy/docker-compose.yml + prometheus.yml 监控部署配置
This commit is contained in:
1 parent
efe8af6c9b
commit
5f9483a86c
140 files changed
+1357
-19
No files matched your search
+5
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -10,9 +11,13 @@ import lombok.Data;
|
||||
public class CommentAuditReqVO {
|
||||
|
||||
/** PASS/REJECT */
|
||||
@Schema(description = "审核结果(PASS/REJECT)")
|
||||
@NotBlank(message = "请选择审核结果")
|
||||
private String result;
|
||||
|
||||
@Schema(description = "原因编码")
|
||||
private String reasonCode;
|
||||
|
||||
@Schema(description = "原因说明")
|
||||
private String reasonText;
|
||||
}
|
||||
+5
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
@@ -10,14 +11,18 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CommentPublishReqVO {
|
||||
|
||||
@Schema(description = "短剧ID")
|
||||
@NotNull(message = "缺少 dramaId")
|
||||
private Long dramaId;
|
||||
|
||||
@Schema(description = "剧集ID")
|
||||
private Long episodeId;
|
||||
|
||||
@Schema(description = "评论内容")
|
||||
@NotBlank(message = "评论内容不能为空")
|
||||
private String content;
|
||||
|
||||
/** 回复某条评论时传它的 id;顶层评论不传 */
|
||||
@Schema(description = "回复某条评论时传它的 ID;顶层评论不传")
|
||||
private Long parentId;
|
||||
}
|
||||
+19
@@ -2,24 +2,43 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/** 评论列表查询(客户端用游标,后台用分页)。 */
|
||||
@Data
|
||||
public class CommentQueryReqVO {
|
||||
|
||||
@Schema(description = "短剧ID")
|
||||
private Long dramaId;
|
||||
|
||||
@Schema(description = "剧集ID")
|
||||
private Long episodeId;
|
||||
|
||||
/** 只看某个楼层的回复 */
|
||||
@Schema(description = "只看某个楼层的回复")
|
||||
private Long rootId;
|
||||
|
||||
/** 客户端游标:上一页最后一条的 id */
|
||||
@Schema(description = "客户端游标:上一页最后一条的 ID")
|
||||
private Long cursor;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer size;
|
||||
|
||||
/** 后台检索条件 */
|
||||
@Schema(description = "状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "关键词")
|
||||
private String keyword;
|
||||
|
||||
@Schema(description = "页码")
|
||||
private Integer pageIndex = 1;
|
||||
|
||||
@Schema(description = "每页数量")
|
||||
private Integer pageSize = 10;
|
||||
}
|
||||
+36
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -10,26 +11,61 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class CommentRespVO {
|
||||
|
||||
@Schema(description = "ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "短剧ID")
|
||||
private Long dramaId;
|
||||
|
||||
@Schema(description = "剧集ID")
|
||||
private Long episodeId;
|
||||
|
||||
@Schema(description = "父评论ID")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "根评论ID")
|
||||
private Long rootId;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 对外用户标识与昵称头像,客户端直接渲染 */
|
||||
@Schema(description = "对外用户标识")
|
||||
private String uid;
|
||||
|
||||
@Schema(description = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "头像地址")
|
||||
private String avatarUrl;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
/** pending/published/rejected/deleted */
|
||||
@Schema(description = "状态(pending/published/rejected/deleted)")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "审核原因")
|
||||
private String auditReason;
|
||||
|
||||
@Schema(description = "点赞数")
|
||||
private Integer likeCount;
|
||||
|
||||
@Schema(description = "回复数")
|
||||
private Integer replyCount;
|
||||
|
||||
@Schema(description = "举报数")
|
||||
private Integer reportCount;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
/** 是否本人发表(可删除) */
|
||||
@Schema(description = "是否本人发表")
|
||||
private Boolean mine;
|
||||
|
||||
/** 当前用户是否已点赞 */
|
||||
@Schema(description = "当前用户是否已点赞")
|
||||
private Boolean liked;
|
||||
}
|
||||
+3
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
@@ -11,9 +12,11 @@ import lombok.Data;
|
||||
public class LikeToggleReqVO {
|
||||
|
||||
/** DRAMA/COMMENT */
|
||||
@Schema(description = "目标类型(DRAMA/COMMENT)")
|
||||
@NotBlank(message = "缺少 targetType")
|
||||
private String targetType;
|
||||
|
||||
@Schema(description = "目标ID")
|
||||
@NotNull(message = "缺少 targetId")
|
||||
private Long targetId;
|
||||
}
|
||||
+4
@@ -2,12 +2,16 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/** 点赞结果:切换后的状态与最新计数。 */
|
||||
@Data
|
||||
public class LikeToggleRespVO {
|
||||
|
||||
@Schema(description = "是否已点赞")
|
||||
private Boolean liked;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Long count;
|
||||
}
|
||||
+5
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
@@ -11,14 +12,18 @@ import lombok.Data;
|
||||
public class ReportCreateReqVO {
|
||||
|
||||
/** COMMENT/USER/DRAMA */
|
||||
@Schema(description = "目标类型(COMMENT/USER/DRAMA)")
|
||||
@NotBlank(message = "缺少 targetType")
|
||||
private String targetType;
|
||||
|
||||
@Schema(description = "目标ID")
|
||||
@NotNull(message = "缺少 targetId")
|
||||
private Long targetId;
|
||||
|
||||
@Schema(description = "举报原因编码")
|
||||
@NotBlank(message = "请选择举报原因")
|
||||
private String reasonCode;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
}
|
||||
+8
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/** 后台处理举报工单。 */
|
||||
@@ -9,10 +10,17 @@ import lombok.Data;
|
||||
public class ReportHandleReqVO {
|
||||
|
||||
/** handled/rejected */
|
||||
@Schema(description = "处理状态(handled/rejected)")
|
||||
private String status = "handled";
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String note;
|
||||
|
||||
/** 是否同时封禁被举报用户(仅 COMMENT/USER 类型有意义) */
|
||||
@Schema(description = "是否同时封禁被举报用户(仅 COMMENT/USER 类型有意义)")
|
||||
private Boolean banTarget;
|
||||
|
||||
/** 封禁原因,留档用 */
|
||||
@Schema(description = "封禁原因")
|
||||
private String banReason;
|
||||
}
|
||||
+12
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/** 后台举报工单检索条件。 */
|
||||
@@ -9,11 +10,22 @@ import lombok.Data;
|
||||
public class ReportQueryReqVO {
|
||||
|
||||
/** pending/handled/rejected */
|
||||
@Schema(description = "状态(pending/handled/rejected)")
|
||||
private String status;
|
||||
|
||||
/** COMMENT/USER/DRAMA */
|
||||
@Schema(description = "目标类型(COMMENT/USER/DRAMA)")
|
||||
private String targetType;
|
||||
|
||||
@Schema(description = "举报原因编码")
|
||||
private String reasonCode;
|
||||
|
||||
@Schema(description = "举报人ID")
|
||||
private Long reporterId;
|
||||
|
||||
@Schema(description = "页码")
|
||||
private Integer pageIndex = 1;
|
||||
|
||||
@Schema(description = "每页数量")
|
||||
private Integer pageSize = 10;
|
||||
}
|
||||
+11
@@ -2,6 +2,7 @@
|
||||
|
||||
package com.fruitshorts.interaction.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -9,14 +10,24 @@ import lombok.Data;
|
||||
@Data
|
||||
public class SensitiveWordReqVO {
|
||||
|
||||
@Schema(description = "敏感词")
|
||||
@NotBlank(message = "请输入敏感词")
|
||||
private String word;
|
||||
|
||||
/** POLITICS/PORN/ABUSE/AD/RELIGION */
|
||||
@Schema(description = "分类(POLITICS/PORN/ABUSE/AD/RELIGION)")
|
||||
private String category;
|
||||
|
||||
/** BLOCK/REVIEW/REPLACE */
|
||||
@Schema(description = "处理级别(BLOCK/REVIEW/REPLACE)")
|
||||
private String level = "REVIEW";
|
||||
|
||||
@Schema(description = "替换文本")
|
||||
private String replaceText = "*";
|
||||
|
||||
@Schema(description = "语言")
|
||||
private String language = "id-ID";
|
||||
|
||||
@Schema(description = "状态")
|
||||
private Integer status = 1;
|
||||
}
|
||||
Reference in new issue
Block a user