diff --git a/wu-lazy-cloud-heartbeat-sample/wu-lazy-cloud-heartbeat-server-sample/src/main/resources/application-dev.yml b/wu-lazy-cloud-heartbeat-sample/wu-lazy-cloud-heartbeat-server-sample/src/main/resources/application-dev.yml index 58c71e1..3b5149b 100644 --- a/wu-lazy-cloud-heartbeat-sample/wu-lazy-cloud-heartbeat-server-sample/src/main/resources/application-dev.yml +++ b/wu-lazy-cloud-heartbeat-sample/wu-lazy-cloud-heartbeat-server-sample/src/main/resources/application-dev.yml @@ -6,7 +6,7 @@ spring: password: laihui database: 2 datasource: - url: jdbc:mysql://127.0.0.1:3306/wu_lazy_cloud_netty_server?allowMultiQueries=true&useUnicode=true&autoReconnect=true&useAffectedRows=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&databaseTerm=SCHEMA + url: jdbc:mysql://124.222.48.62:30512/wu_lazy_cloud_netty_server?allowMultiQueries=true&useUnicode=true&autoReconnect=true&useAffectedRows=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&databaseTerm=SCHEMA username: root password: wujiawei driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/wu-lazy-cloud-heartbeat-server/src/main/java/wu/framework/lazy/cloud/heartbeat/server/application/dto/VisitorPortFlowDTO.java b/wu-lazy-cloud-heartbeat-server/src/main/java/wu/framework/lazy/cloud/heartbeat/server/application/dto/VisitorPortFlowDTO.java index 7fa3228..66ee004 100644 --- a/wu-lazy-cloud-heartbeat-server/src/main/java/wu/framework/lazy/cloud/heartbeat/server/application/dto/VisitorPortFlowDTO.java +++ b/wu-lazy-cloud-heartbeat-server/src/main/java/wu/framework/lazy/cloud/heartbeat/server/application/dto/VisitorPortFlowDTO.java @@ -4,92 +4,91 @@ import com.wu.framework.inner.layer.util.ByteSizeUtil; import lombok.Data; import lombok.experimental.Accessors; import io.swagger.v3.oas.annotations.media.Schema; + import java.lang.String; import java.time.LocalDateTime; import java.lang.Long; import java.lang.Integer; import java.lang.Boolean; + /** - * describe 访客端流量 + * describe 访客端流量 * * @author Jia wei Wu * @date 2024/01/24 05:19 下午 - * @see com.wu.framework.inner.lazy.persistence.reverse.lazy.ddd.DefaultDDDLazyDTO + * @see com.wu.framework.inner.lazy.persistence.reverse.lazy.ddd.DefaultDDDLazyDTO **/ @Data @Accessors(chain = true) -@Schema(title = "visitor_port_flow_command_dto",description = "访客端流量") +@Schema(title = "visitor_port_flow_command_dto", description = "访客端流量") public class VisitorPortFlowDTO { /** - * * 客户端ID */ - @Schema(description ="客户端ID",name ="clientId",example = "") + @Schema(description = "客户端ID", name = "clientId", example = "") private String clientId; /** - * * 创建时间 */ - @Schema(description ="创建时间",name ="createTime",example = "") + @Schema(description = "创建时间", name = "createTime", example = "") private LocalDateTime createTime; /** - * * 主键 */ - @Schema(description ="主键",name ="id",example = "") + @Schema(description = "主键", name = "id", example = "") private Long id; /** - * * 当前访客当前进口流量 */ - @Schema(description ="当前访客当前进口流量",name ="inFlow",example = "") + @Schema(description = "当前访客当前进口流量", name = "inFlow", example = "") private Integer inFlow; /** - * * 是否删除 */ - @Schema(description ="是否删除",name ="isDeleted",example = "") + @Schema(description = "是否删除", name = "isDeleted", example = "") private Boolean isDeleted; /** - * * 当前访客出口流量 */ - @Schema(description ="当前访客出口流量",name ="outFlow",example = "") + @Schema(description = "当前访客出口流量", name = "outFlow", example = "") private Integer outFlow; /** - * * 修改时间 */ - @Schema(description ="修改时间",name ="updateTime",example = "") + @Schema(description = "修改时间", name = "updateTime", example = "") private LocalDateTime updateTime; /** - * * 访客端口 */ - @Schema(description ="访客端口",name ="visitorPort",example = "") + @Schema(description = "访客端口", name = "visitorPort", example = "") private Integer visitorPort; public Integer getInFlowSize() { + if (inFlow == null) return 0; return inFlow; } public Integer getOutFlowSize() { + if (outFlow == null) return 0; return outFlow; } + public String getInFlow() { + if (inFlow == null) return "0b"; return ByteSizeUtil.convertSize(inFlow); } public String getOutFlow() { + if (outFlow == null) return "0b"; return ByteSizeUtil.convertSize(outFlow); } diff --git a/wu-lazy-cloud-network-ui/vue.config.js b/wu-lazy-cloud-network-ui/vue.config.js index 822e7eb..62886a7 100644 --- a/wu-lazy-cloud-network-ui/vue.config.js +++ b/wu-lazy-cloud-network-ui/vue.config.js @@ -25,8 +25,8 @@ module.exports = { }, "/": { // 'demo'是请求地址中,以demo开头都适用这个 - // target: "http://127.0.0.1:6001", // 真实的服务器地址 - target: "http://124.222.48.62:30576", // 真实的服务器地址 + target: "http://127.0.0.1:6001", // 真实的服务器地址 + // target: "http://124.222.48.62:30576", // 真实的服务器地址 changeOrigin: true, // secure: false, // 默认情况下,不接受运行在 HTTPS 上,且使用了无效证书的后端服务器。如果你想要接受设为false ws: false, // 是否启用websockets