【修改】 名称替换
This commit is contained in:
@@ -3,7 +3,7 @@ package pc.exam.pp.module.infra.api.config;
|
||||
/**
|
||||
* 参数配置 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface ConfigApi {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package pc.exam.pp.module.infra.api.file;
|
||||
/**
|
||||
* 文件 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface FileApi {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.scheduling.annotation.Async;
|
||||
/**
|
||||
* API 访问日志的 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface ApiAccessLogApi {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.scheduling.annotation.Async;
|
||||
/**
|
||||
* API 错误日志的 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface ApiErrorLogApi {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* API 访问日志
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class ApiAccessLogCreateReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* API 错误日志
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class ApiErrorLogCreateReqDTO {
|
||||
|
||||
@@ -7,7 +7,7 @@ import pc.exam.pp.framework.common.util.json.JsonUtils;
|
||||
*
|
||||
* 对 WebSocketMessageSender 进行封装,提供给其它模块使用
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface WebSocketSenderApi {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package pc.exam.pp.module.infra.enums;
|
||||
/**
|
||||
* Infra 字典类型的枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface DictTypeConstants {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
/**
|
||||
* 参数配置 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -9,7 +9,7 @@ import jakarta.annotation.Resource;
|
||||
/**
|
||||
* 文件 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.annotation.Resource;
|
||||
/**
|
||||
* API 访问日志的 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.annotation.Resource;
|
||||
/**
|
||||
* API 访问日志的 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -8,7 +8,7 @@ import jakarta.annotation.Resource;
|
||||
/**
|
||||
* WebSocket 发送器的 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Component
|
||||
public class WebSocketSenderApiImpl implements WebSocketSenderApi {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class CodegenTableRespVO {
|
||||
@Schema(description = "类描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "代码生成器的表定义")
|
||||
private String classComment;
|
||||
|
||||
@Schema(description = "作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@Schema(description = "作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "朋辰")
|
||||
private String author;
|
||||
|
||||
@Schema(description = "模板类型,参见 CodegenTemplateTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CodegenTableSaveReqVO {
|
||||
@NotNull(message = "类描述不能为空")
|
||||
private String classComment;
|
||||
|
||||
@Schema(description = "作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@Schema(description = "作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "朋辰")
|
||||
@NotNull(message = "作者不能为空")
|
||||
private String author;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public class DatabaseTableRespVO {
|
||||
@Schema(description = "表名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "yuanma")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "表描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@Schema(description = "表描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "朋辰")
|
||||
private String comment;
|
||||
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ApiAccessLogRespVO {
|
||||
@ExcelProperty("结果码")
|
||||
private Integer resultCode;
|
||||
|
||||
@Schema(description = "结果提示", example = "芋道源码,牛逼!")
|
||||
@Schema(description = "结果提示", example = "朋辰,牛逼!")
|
||||
@ExcelProperty("结果提示")
|
||||
private String resultMsg;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.mapstruct.factory.Mappers;
|
||||
/**
|
||||
* 文件配置 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface FileConfigConvert {
|
||||
|
||||
@@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
|
||||
/**
|
||||
* 代码生成 column 字段定义
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName(value = "infra_codegen_column", autoResultMap = true)
|
||||
@KeySequence("infra_codegen_column_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
|
||||
/**
|
||||
* 代码生成 table 表定义
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName(value = "infra_codegen_table", autoResultMap = true)
|
||||
@KeySequence("infra_codegen_table_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -12,7 +12,7 @@ import lombok.ToString;
|
||||
/**
|
||||
* 参数配置表
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("infra_config")
|
||||
@KeySequence("infra_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
/**
|
||||
* 数据源配置
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName(value = "infra_data_source_config", autoResultMap = true)
|
||||
@KeySequence("infra_data_source_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 示例联系人 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("exam_demo01_contact")
|
||||
@KeySequence("exam_demo01_contact_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
/**
|
||||
* 示例分类 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("exam_demo02_category")
|
||||
@KeySequence("exam_demo02_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
/**
|
||||
* 学生课程 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("exam_demo03_course")
|
||||
@KeySequence("exam_demo03_course_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
/**
|
||||
* 学生班级 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("exam_demo03_grade")
|
||||
@KeySequence("exam_demo03_grade_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 学生 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("exam_demo03_student")
|
||||
@KeySequence("exam_demo03_student_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.lang.reflect.Field;
|
||||
/**
|
||||
* 文件配置表
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName(value = "infra_file_config", autoResultMap = true)
|
||||
@KeySequence("infra_file_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -13,7 +13,7 @@ import lombok.*;
|
||||
*
|
||||
* 专门用于存储 {@link DBFileClient} 的文件内容
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("infra_file_content")
|
||||
@KeySequence("infra_file_content_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
* 文件表
|
||||
* 每次文件上传,都会记录一条记录到该表中
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("infra_file")
|
||||
@KeySequence("infra_file_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.*;
|
||||
/**
|
||||
* 定时任务 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("infra_job")
|
||||
@KeySequence("infra_job_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 定时任务的执行日志
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("infra_job_log")
|
||||
@KeySequence("infra_job_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* API 访问日志
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("infra_api_access_log")
|
||||
@KeySequence(value = "infra_api_access_log_seq")
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* API 异常数据
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@TableName("infra_api_error_log")
|
||||
@Data
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 数据源配置 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface DataSourceConfigMapper extends BaseMapperX<DataSourceConfigDO> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 示例联系人 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface Demo01ContactMapper extends BaseMapperX<Demo01ContactDO> {
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 示例分类 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface Demo02CategoryMapper extends BaseMapperX<Demo02CategoryDO> {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* 学生课程 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface Demo03CourseMapper extends BaseMapperX<Demo03CourseDO> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 学生班级 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface Demo03GradeMapper extends BaseMapperX<Demo03GradeDO> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import pc.exam.pp.module.infra.controller.admin.demo.demo03.vo.*;
|
||||
/**
|
||||
* 学生 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface Demo03StudentMapper extends BaseMapperX<Demo03StudentDO> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 文件操作 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface FileMapper extends BaseMapperX<FileDO> {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 任务日志 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface JobLogMapper extends BaseMapperX<JobLogDO> {
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 定时任务 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface JobMapper extends BaseMapperX<JobDO> {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* API 访问日志 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface ApiAccessLogMapper extends BaseMapperX<ApiAccessLogDO> {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* API 错误日志 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Mapper
|
||||
public interface ApiErrorLogMapper extends BaseMapperX<ApiErrorLogDO> {
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 代码生成的前端类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -8,7 +8,7 @@ import static cn.hutool.core.util.ArrayUtil.*;
|
||||
/**
|
||||
* 代码生成的场景枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* 代码生成模板类型
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 任务日志的状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Set;
|
||||
/**
|
||||
* 任务状态的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* API 异常数据的处理状态
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* 文件配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class ExamFileAutoConfiguration {
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* 文件客户端的抽象类,提供模板方法,减少子类的冗余代码
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class AbstractFileClient<Config extends FileClientConfig> implements FileClient {
|
||||
|
||||
@@ -5,7 +5,7 @@ import pc.exam.pp.module.infra.framework.file.core.client.s3.FilePresignedUrlRes
|
||||
/**
|
||||
* 文件客户端
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface FileClient {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
* 文件客户端的配置
|
||||
* 不同实现的客户端,需要不同的配置,通过子类来定义
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
|
||||
// @JsonTypeInfo 注解的作用,Jackson 多态
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
/**
|
||||
* 文件客户端的工厂实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Slf4j
|
||||
public class FileClientFactoryImpl implements FileClientFactory {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* 基于 DB 存储的文件客户端的配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class DBFileClient extends AbstractFileClient<DBFileClientConfig> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
/**
|
||||
* 基于 DB 存储的文件客户端的配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class DBFileClientConfig implements FileClientConfig {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.io.ByteArrayOutputStream;
|
||||
/**
|
||||
* Ftp 文件客户端
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class FtpFileClient extends AbstractFileClient<FtpFileClientConfig> {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
/**
|
||||
* Ftp 文件客户端的配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class FtpFileClientConfig implements FileClientConfig {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.io.File;
|
||||
/**
|
||||
* 本地文件客户端
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class LocalFileClient extends AbstractFileClient<LocalFileClientConfig> {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
/**
|
||||
* 本地文件客户端的配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class LocalFileClientConfig implements FileClientConfig {
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* <p>
|
||||
* S3 协议的客户端,采用亚马逊提供的 software.amazon.awssdk.s3 库
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
/**
|
||||
* S3 文件客户端的配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class S3FileClientConfig implements FileClientConfig {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.io.File;
|
||||
/**
|
||||
* Sftp 文件客户端
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class SftpFileClient extends AbstractFileClient<SftpFileClientConfig> {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
/**
|
||||
* Sftp 文件客户端的配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class SftpFileClientConfig implements FileClientConfig {
|
||||
|
||||
@@ -19,7 +19,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 文件存储器枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* 文件类型 Utils
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public class FileTypeUtils {
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
* 4. db:数据库
|
||||
* 5. s3:支持 S3 协议的云存储服务,例如说 MinIO、阿里云、华为云、腾讯云、七牛云等等
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
package pc.exam.pp.module.infra.framework.file;
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 属于 infra 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
package pc.exam.pp.module.infra.framework;
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* infra 模块的 web 组件的 Configuration
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class InfraWebConfiguration {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 代码生成 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface CodegenService {
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 代码生成 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
public class CodegenServiceImpl implements CodegenService {
|
||||
|
||||
@@ -52,7 +52,7 @@ import static cn.hutool.core.text.CharSequenceUtil.*;
|
||||
*
|
||||
* 考虑到 Java 模板引擎的框架非常多,Freemarker、Velocity、Thymeleaf 等等,所以我们采用 hutool 封装的 {@link cn.hutool.extra.template.Template} 抽象
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Component
|
||||
public class CodegenEngine {
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.validation.Valid;
|
||||
/**
|
||||
* 参数配置 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface ConfigService {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
/**
|
||||
* 数据源配置 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface DataSourceConfigService {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DATA_SOURCE_CONFI
|
||||
/**
|
||||
* 数据源配置 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
/**
|
||||
* 数据库表 Service
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface DatabaseTableService {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 数据库表 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
public class DatabaseTableServiceImpl implements DatabaseTableService {
|
||||
|
||||
@@ -10,7 +10,7 @@ import pc.exam.pp.framework.common.pojo.PageResult;
|
||||
/**
|
||||
* 示例联系人 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface Demo01ContactService {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 示例联系人 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -10,7 +10,7 @@ import pc.exam.pp.module.infra.dal.dataobject.demo.demo02.Demo02CategoryDO;
|
||||
/**
|
||||
* 示例分类 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface Demo02CategoryService {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 示例分类 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* 学生 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface Demo03StudentService {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 学生 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -11,7 +11,7 @@ import jakarta.validation.Valid;
|
||||
/**
|
||||
* 文件配置 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface FileConfigService {
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.FILE_CONFIG_NOT_E
|
||||
/**
|
||||
* 文件配置 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -9,7 +9,7 @@ import pc.exam.pp.module.infra.dal.dataobject.file.FileDO;
|
||||
/**
|
||||
* 文件 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface FileService {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS;
|
||||
/**
|
||||
* 文件 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
public class FileServiceImpl implements FileService {
|
||||
|
||||
@@ -8,7 +8,7 @@ import pc.exam.pp.module.infra.dal.dataobject.job.JobLogDO;
|
||||
/**
|
||||
* Job 日志 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface JobLogService extends JobLogFrameworkService {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* Job 日志 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -11,7 +11,7 @@ import jakarta.validation.Valid;
|
||||
/**
|
||||
* 定时任务 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface JobService {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 定时任务 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -8,7 +8,7 @@ import pc.exam.pp.module.infra.dal.dataobject.logger.ApiAccessLogDO;
|
||||
/**
|
||||
* API 访问日志 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface ApiAccessLogService {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import static pc.exam.pp.module.infra.dal.dataobject.logger.ApiAccessLogDO.RESUL
|
||||
/**
|
||||
* API 访问日志 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
|
||||
@@ -8,7 +8,7 @@ import pc.exam.pp.module.infra.dal.dataobject.logger.ApiErrorLogDO;
|
||||
/**
|
||||
* API 错误日志 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
public interface ApiErrorLogService {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.API_ERROR_LOG_PRO
|
||||
/**
|
||||
* API 错误日志 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -14,7 +14,7 @@ import jakarta.annotation.Resource;
|
||||
/**
|
||||
* WebSocket 示例:单发消息
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Component
|
||||
public class DemoWebSocketMessageListener implements WebSocketMessageListener<DemoSendMessage> {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* 示例:server -> client 同步消息
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class DemoReceiveMessage {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* 示例:client -> server 发送消息
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 朋辰
|
||||
*/
|
||||
@Data
|
||||
public class DemoSendMessage {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user