diff --git a/src/main/java/com/insigma/entry/Cp.java b/src/main/java/com/insigma/entry/Cp.java new file mode 100644 index 0000000..5a8c805 --- /dev/null +++ b/src/main/java/com/insigma/entry/Cp.java @@ -0,0 +1,33 @@ +package com.insigma.entry; + +import lombok.AllArgsConstructor; + +/** + * (Cp 枚举) 计算机 枚举 + * + * @author zhangxianwei + * @since 21:32 2022/4/17 + */ +@AllArgsConstructor +public enum Cp { + + /** + * PC计算机 + */ + WINDOWS("windows", "PC计算机"), + /** + * 国产PC + */ + LINUX("linux", "国产PC"); + + private final String name; + private final String info; + + public String getName() { + return name; + } + + public String getInfo() { + return info; + } +} diff --git a/src/main/java/com/insigma/entry/Db.java b/src/main/java/com/insigma/entry/Db.java new file mode 100644 index 0000000..0479800 --- /dev/null +++ b/src/main/java/com/insigma/entry/Db.java @@ -0,0 +1,41 @@ +package com.insigma.entry; + +import lombok.AllArgsConstructor; + +/** + * (Db 枚举) 数据库 枚举 + * + * @author zhangxianwei + * @since 21:35 2022/4/17 + */ +@AllArgsConstructor +public enum Db { + + /** + * mysql数据库 + */ + MYSQL("mysql", "MySQL数据库"), + /** + * Dm数据库 + */ + DM("dm", "Dm数据库"), + /** + * KingBase数据库 + */ + KingBase("kingbase", "KingBase数据库"), + /** + * Oracle数据库 + */ + ORACLE("oracle", "Oracle数据库"); + + private final String name; + private final String info; + + public String getName() { + return name; + } + + public String getInfo() { + return info; + } +} diff --git a/src/main/java/com/insigma/entry/IndexObj.java b/src/main/java/com/insigma/entry/IndexObj.java new file mode 100644 index 0000000..efbffb8 --- /dev/null +++ b/src/main/java/com/insigma/entry/IndexObj.java @@ -0,0 +1,16 @@ +package com.insigma.entry; + +import lombok.Data; + +/** + * (IndexObj 类) + * + * @author zhangxianwei + * @since 21:29 2022/4/17 + */ +@Data +public class IndexObj { + + private String tab; + private String idx; +} diff --git a/src/main/java/com/insigma/entry/Mw.java b/src/main/java/com/insigma/entry/Mw.java new file mode 100644 index 0000000..2f79425 --- /dev/null +++ b/src/main/java/com/insigma/entry/Mw.java @@ -0,0 +1,37 @@ +package com.insigma.entry; + +import lombok.AllArgsConstructor; + +/** + * (Mw 枚举) 中间件 枚举 + * + * @author zhangxianwei + * @since 21:38 2022/4/17 + */ +@AllArgsConstructor +public enum Mw { + + /** + * tomcat中间件 + */ + TOMCAT("tomcat", "Tomcat中间件"), + /** + * TongWeb中间件 + */ + TONGWEB("tongweb", "TongWeb中间件"), + /** + * Apusic中间件 + */ + APUSIC("apusic", "Apusic中间件"); + + private final String name; + private final String info; + + public String getName() { + return name; + } + + public String getInfo() { + return info; + } +} diff --git a/src/main/java/com/insigma/service/Computer.java b/src/main/java/com/insigma/service/Computer.java new file mode 100644 index 0000000..eab9b35 --- /dev/null +++ b/src/main/java/com/insigma/service/Computer.java @@ -0,0 +1,23 @@ +package com.insigma.service; + +import org.springframework.util.Assert; + +/** + * (Computer 计算机 接口) + * + * @author zhangxianwei + * @since 2022/4/17 21:07 + */ +public interface Computer extends Middleware, Database { + + /*** + * 执行 脚本程序 + * @param shell 执行脚本 + * @return + */ + default boolean runShell(String shell) { + Assert.notNull(shell, "未检测到要执行脚本!"); + System.out.printf("执行脚本:%s,但是未检测到实现应用调用此方法!%n", shell); + return false; + } +} diff --git a/src/main/java/com/insigma/service/Database.java b/src/main/java/com/insigma/service/Database.java new file mode 100644 index 0000000..505f801 --- /dev/null +++ b/src/main/java/com/insigma/service/Database.java @@ -0,0 +1,43 @@ +package com.insigma.service; + +import com.insigma.entry.IndexObj; +import org.springframework.util.Assert; + +import java.util.List; + +/** + * (Db 接口) + * + * @author zhangxianwei + * @since 2022/4/17 21:09 + */ +public interface Database { + + /*** + * 清除 应用 缓存 + * @param index 索引对象列表 + * @return + */ + default boolean rebuildIndex(List index) { + Assert.isNull(index, "未检测到索引对象列表!"); + System.out.println(String.format("设置出参数:%s,但是未检测到实现应用调用此方法!", index.stream().getClass())); + return false; + } + /*** + * 设置 数据库 大小 + * @param size 设置大小值 + * @return + */ + default boolean setDbSize(int size) { + System.out.printf("设置出参数:%d,但是未检测到实现应用调用此方法!", size); + return false; + } + /*** + * 清除 应用 缓存 + * @return + */ + default boolean cleanDbCache() { + System.out.println("进行缓存清除,但是未检测到实现应用调用此方法!"); + return false; + } +} diff --git a/src/main/java/com/insigma/service/Middleware.java b/src/main/java/com/insigma/service/Middleware.java new file mode 100644 index 0000000..65ba402 --- /dev/null +++ b/src/main/java/com/insigma/service/Middleware.java @@ -0,0 +1,32 @@ +package com.insigma.service; + +import com.insigma.entry.IndexObj; + +import java.util.List; + +/** + * (Middleware 接口) + * + * @author zhangxianwei + * @since 2022/4/17 21:10 + */ +public interface Middleware { + + /*** + * 清除 应用 缓存 + * @return + */ + default boolean cleanMwCache() { + System.out.printf("清除缓存,但是未检测到实现应用调用此方法!"); + return false; + } + /*** + * 设置 应用 大小 + * @param size 设置大小值 + * @return + */ + default boolean setMwSize(int size) { + System.out.printf("设置应用参数:%d,但是未检测到实现应用调用此方法!", size); + return false; + } +} diff --git a/src/main/java/com/insigma/service/impl/.keepgit b/src/main/java/com/insigma/service/impl/.keepgit new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/com/insigma/service/impl/CuWindows.java b/src/main/java/com/insigma/service/impl/CuWindows.java new file mode 100644 index 0000000..a874d33 --- /dev/null +++ b/src/main/java/com/insigma/service/impl/CuWindows.java @@ -0,0 +1,32 @@ +package com.insigma.service.impl; + +import com.insigma.entry.IndexObj; +import com.insigma.service.Computer; + +import java.util.List; + +/** + * (CuWindows 类) + * + * @author zhangxianwei + * @since 23:30 2022/4/17 + */ +public class CuWindows implements Computer { + + @Override + public boolean rebuildIndex(List index) { + return false; + } + + @Override + public boolean setDbSize(int size) { + System.out.printf("设置出参数:%d,但是未检测到实现应用调用此方法!", size); + return false; + } + + @Override + public boolean cleanDbCache() { + System.out.println("进行缓存清除,但是未检测到实现应用调用此方法!"); + return false; + } +}