Bladeren bron

feat(优化): 优化代码目录

huey 2 jaren geleden
bovenliggende
commit
e7a0c857ec

+ 16 - 11
src/main/java/com/dragon/tj/portal/common/enums/DelFlagEnum.java

@@ -1,19 +1,24 @@
 package com.dragon.tj.portal.common.enums;
 
+/**
+ * @author huey China.
+ * @Description : 逻辑删除状态
+ * @Date Created in 2023/6/15 15:40
+ */
 public enum DelFlagEnum {
 
-	NO(0, "未删除"),
-	YES(1, "已删除");
+    NO(0, "有效"),
+    YES(1, "无效");
 
-	private final Integer value;
-	private final String name;
+    private final Integer value;
+    private final String name;
 
-	DelFlagEnum(Integer value, String name) {
-		this.value = value;
-		this.name = name;
-	}
+    DelFlagEnum(Integer value, String name) {
+        this.value = value;
+        this.name = name;
+    }
 
-	public Integer value() {
-		return this.value;
-	}
+    public Integer value() {
+        return this.value;
+    }
 }

+ 4 - 5
src/main/java/com/dragon/tj/portal/component/log/dto/SysLogDTO.java

@@ -6,11 +6,10 @@ import javax.validation.constraints.NotBlank;
 import java.time.LocalDateTime;
 
 /**
- * @author frame
- * @date 2020/10/9
- * <p>
- * 日志查询传输对象
- */
+* @author huey China.
+* @Description : 日志查询传输对象
+* @Date Created in 2023/6/15 15:41
+*/
 @Data
 public class SysLogDTO {
 

+ 5 - 0
src/main/java/com/dragon/tj/portal/component/message/Consumer.java

@@ -12,6 +12,11 @@ import org.springframework.stereotype.Component;
 import java.io.IOException;
 import java.util.Map;
 
+/**
+ * @author huey China.
+ * @Description : 消费端
+ * @Date Created in 2023/6/15 15:42
+ */
 @Component
 @Slf4j
 public class Consumer {

+ 5 - 0
src/main/java/com/dragon/tj/portal/component/message/KafkaInitialConfiguration.java

@@ -4,6 +4,11 @@ import org.apache.kafka.clients.admin.NewTopic;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
+/**
+ * @author huey China.
+ * @Description : kafka自定义配置
+ * @Date Created in 2023/6/15 15:42
+ */
 @Configuration
 public class KafkaInitialConfiguration {
 

+ 5 - 0
src/main/java/com/dragon/tj/portal/component/message/OpenApiSseEmitter.java

@@ -2,6 +2,11 @@ package com.dragon.tj.portal.component.message;
 
 import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
 
+/**
+* @author huey China.
+* @Description : 自定义扩展
+* @Date Created in 2023/6/15 15:42
+*/
 public class OpenApiSseEmitter extends SseEmitter {
 
     public OpenApiSseEmitter() {

+ 5 - 0
src/main/java/com/dragon/tj/portal/component/message/Producer.java

@@ -9,6 +9,11 @@ import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
 
+/**
+* @author huey China.
+* @Description : 生产
+* @Date Created in 2023/6/15 15:42
+*/
 @Component
 @Slf4j
 public class Producer {

+ 6 - 1
src/main/java/com/dragon/tj/portal/component/message/SseController.java

@@ -10,6 +10,11 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Map;
 
+/**
+ * @author huey China.
+ * @Description : 控制
+ * @Date Created in 2023/6/15 15:43
+ */
 @Slf4j
 @RestController
 public class SseController {
@@ -25,7 +30,7 @@ public class SseController {
 
         response.addHeader("Cache-Control", "no-cache");
         response.addHeader("X-Accel-Buffering", "no");
-        response.setHeader("Access-Control-Allow-Origin","*");
+        response.setHeader("Access-Control-Allow-Origin", "*");
 
         log.info("got a subscription, clientId={} will be bound to serverId={}", clientId, "appId");
         // 创建一个新的SseEmitter对象并设置超时时间,并将其存储在Map中

+ 5 - 0
src/main/java/com/dragon/tj/portal/component/message/SseEmitterBean.java

@@ -6,6 +6,11 @@ import org.springframework.stereotype.Component;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+/**
+ * @author huey China.
+ * @Description : 初始化
+ * @Date Created in 2023/6/15 15:43
+ */
 @Component
 public class SseEmitterBean {
 

+ 6 - 0
src/main/java/com/dragon/tj/portal/component/message/SsePublishReqDto.java

@@ -2,6 +2,12 @@ package com.dragon.tj.portal.component.message;
 
 import lombok.*;
 
+
+/**
+ * @author huey China.
+ * @Description : 消息体
+ * @Date Created in 2023/6/15 15:43
+ */
 @Getter
 @Setter
 @Builder