xieshengjie 3 年 前
コミット
f80a75809f
100 ファイル変更2151 行追加0 行削除
  1. 96 0
      cache/pom.xml
  2. 20 0
      cache/src/main/java/com/gyee/cache/CacheMain.java
  3. 145 0
      cache/src/main/java/com/gyee/cache/config/GeneratorCodeConfig.java
  4. 24 0
      cache/src/main/java/com/gyee/cache/config/MybatisPlusConfig.java
  5. 44 0
      cache/src/main/java/com/gyee/cache/config/RedisAutoConfiguration.java
  6. 46 0
      cache/src/main/java/com/gyee/cache/config/RedisConfig.java
  7. 20 0
      cache/src/main/java/com/gyee/cache/controller/DatacenterController.java
  8. 20 0
      cache/src/main/java/com/gyee/cache/controller/DatacenterpointController.java
  9. 20 0
      cache/src/main/java/com/gyee/cache/controller/LineController.java
  10. 20 0
      cache/src/main/java/com/gyee/cache/controller/ModelpowerrdController.java
  11. 20 0
      cache/src/main/java/com/gyee/cache/controller/ProjectController.java
  12. 20 0
      cache/src/main/java/com/gyee/cache/controller/WindpowerstationController.java
  13. 20 0
      cache/src/main/java/com/gyee/cache/controller/WindpowerstationtestingpointController.java
  14. 20 0
      cache/src/main/java/com/gyee/cache/controller/WindturbineController.java
  15. 20 0
      cache/src/main/java/com/gyee/cache/controller/WindturbinetestingpointaiController.java
  16. 188 0
      cache/src/main/java/com/gyee/cache/init/CacheContext.java
  17. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/DatacenterMapper.java
  18. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/DatacenterpointMapper.java
  19. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/LineMapper.java
  20. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/ModelpowerrdMapper.java
  21. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/ProjectMapper.java
  22. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/WindpowerstationMapper.java
  23. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/WindpowerstationtestingpointMapper.java
  24. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/WindturbineMapper.java
  25. 16 0
      cache/src/main/java/com/gyee/cache/mapper/auto/WindturbinetestingpointaiMapper.java
  26. 51 0
      cache/src/main/java/com/gyee/cache/model/auto/Datacenter.java
  27. 51 0
      cache/src/main/java/com/gyee/cache/model/auto/Datacenterpoint.java
  28. 54 0
      cache/src/main/java/com/gyee/cache/model/auto/Line.java
  29. 42 0
      cache/src/main/java/com/gyee/cache/model/auto/Modelpowerrd.java
  30. 72 0
      cache/src/main/java/com/gyee/cache/model/auto/Project.java
  31. 87 0
      cache/src/main/java/com/gyee/cache/model/auto/Windpowerstation.java
  32. 75 0
      cache/src/main/java/com/gyee/cache/model/auto/Windpowerstationtestingpoint.java
  33. 69 0
      cache/src/main/java/com/gyee/cache/model/auto/Windturbine.java
  34. 81 0
      cache/src/main/java/com/gyee/cache/model/auto/Windturbinetestingpointai.java
  35. 49 0
      cache/src/main/java/com/gyee/cache/service/RedisService.java
  36. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IDatacenterService.java
  37. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IDatacenterpointService.java
  38. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/ILineService.java
  39. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IModelpowerrdService.java
  40. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IProjectService.java
  41. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IWindpowerstationService.java
  42. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IWindpowerstationtestingpointService.java
  43. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IWindturbineService.java
  44. 16 0
      cache/src/main/java/com/gyee/cache/service/auto/IWindturbinetestingpointaiService.java
  45. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/DatacenterServiceImpl.java
  46. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/DatacenterpointServiceImpl.java
  47. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/LineServiceImpl.java
  48. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/ModelpowerrdServiceImpl.java
  49. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/ProjectServiceImpl.java
  50. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/WindpowerstationServiceImpl.java
  51. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/WindpowerstationtestingpointServiceImpl.java
  52. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/WindturbineServiceImpl.java
  53. 20 0
      cache/src/main/java/com/gyee/cache/service/auto/impl/WindturbinetestingpointaiServiceImpl.java
  54. 125 0
      cache/src/main/java/com/gyee/cache/service/impl/RedisServiceImpl.java
  55. 92 0
      cache/src/main/resources/application.yml
  56. 92 0
      cache/target/classes/application.yml
  57. BIN
      cache/target/classes/com/gyee/cache/CacheMain.class
  58. BIN
      cache/target/classes/com/gyee/cache/config/GeneratorCodeConfig.class
  59. BIN
      cache/target/classes/com/gyee/cache/config/MybatisPlusConfig.class
  60. BIN
      cache/target/classes/com/gyee/cache/config/RedisAutoConfiguration.class
  61. BIN
      cache/target/classes/com/gyee/cache/config/RedisConfig.class
  62. BIN
      cache/target/classes/com/gyee/cache/controller/DatacenterController.class
  63. BIN
      cache/target/classes/com/gyee/cache/controller/DatacenterpointController.class
  64. BIN
      cache/target/classes/com/gyee/cache/controller/LineController.class
  65. BIN
      cache/target/classes/com/gyee/cache/controller/ModelpowerrdController.class
  66. BIN
      cache/target/classes/com/gyee/cache/controller/ProjectController.class
  67. BIN
      cache/target/classes/com/gyee/cache/controller/WindpowerstationController.class
  68. BIN
      cache/target/classes/com/gyee/cache/controller/WindpowerstationtestingpointController.class
  69. BIN
      cache/target/classes/com/gyee/cache/controller/WindturbineController.class
  70. BIN
      cache/target/classes/com/gyee/cache/controller/WindturbinetestingpointaiController.class
  71. BIN
      cache/target/classes/com/gyee/cache/init/CacheContext.class
  72. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/DatacenterMapper.class
  73. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/DatacenterpointMapper.class
  74. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/LineMapper.class
  75. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/ModelpowerrdMapper.class
  76. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/ProjectMapper.class
  77. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/WindpowerstationMapper.class
  78. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/WindpowerstationtestingpointMapper.class
  79. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/WindturbineMapper.class
  80. BIN
      cache/target/classes/com/gyee/cache/mapper/auto/WindturbinetestingpointaiMapper.class
  81. BIN
      cache/target/classes/com/gyee/cache/model/auto/Datacenter.class
  82. BIN
      cache/target/classes/com/gyee/cache/model/auto/Datacenterpoint.class
  83. BIN
      cache/target/classes/com/gyee/cache/model/auto/Line.class
  84. BIN
      cache/target/classes/com/gyee/cache/model/auto/Modelpowerrd.class
  85. BIN
      cache/target/classes/com/gyee/cache/model/auto/Project.class
  86. BIN
      cache/target/classes/com/gyee/cache/model/auto/Windpowerstation.class
  87. BIN
      cache/target/classes/com/gyee/cache/model/auto/Windpowerstationtestingpoint.class
  88. BIN
      cache/target/classes/com/gyee/cache/model/auto/Windturbine.class
  89. BIN
      cache/target/classes/com/gyee/cache/model/auto/Windturbinetestingpointai.class
  90. BIN
      cache/target/classes/com/gyee/cache/service/RedisService.class
  91. BIN
      cache/target/classes/com/gyee/cache/service/auto/IDatacenterService.class
  92. BIN
      cache/target/classes/com/gyee/cache/service/auto/IDatacenterpointService.class
  93. BIN
      cache/target/classes/com/gyee/cache/service/auto/ILineService.class
  94. BIN
      cache/target/classes/com/gyee/cache/service/auto/IModelpowerrdService.class
  95. BIN
      cache/target/classes/com/gyee/cache/service/auto/IProjectService.class
  96. BIN
      cache/target/classes/com/gyee/cache/service/auto/IWindpowerstationService.class
  97. BIN
      cache/target/classes/com/gyee/cache/service/auto/IWindpowerstationtestingpointService.class
  98. BIN
      cache/target/classes/com/gyee/cache/service/auto/IWindturbineService.class
  99. BIN
      cache/target/classes/com/gyee/cache/service/auto/IWindturbinetestingpointaiService.class
  100. 0 0
      cache/target/classes/com/gyee/cache/service/auto/impl/DatacenterServiceImpl.class

+ 96 - 0
cache/pom.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>sis</artifactId>
+        <groupId>com.gyee</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cache</artifactId>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.data</groupId>
+            <artifactId>spring-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc6</artifactId>
+            <version>11.2.0.3</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.gyee</groupId>
+            <artifactId>common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.7</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.gyee</groupId>
+            <artifactId>common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 20 - 0
cache/src/main/java/com/gyee/cache/CacheMain.java

@@ -0,0 +1,20 @@
+package com.gyee.cache;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @ClassName : CacheMain
+ * @Author : xieshengjie
+ * @Date: 2022/1/18 10:00
+ * @Description : 缓存8044
+ */
+@SpringBootApplication
+@MapperScan("com.gyee.cache.mapper")
+public class CacheMain {
+
+    public static void main(String[] args) {
+        SpringApplication.run(CacheMain.class,args);
+    }
+}

+ 145 - 0
cache/src/main/java/com/gyee/cache/config/GeneratorCodeConfig.java

@@ -0,0 +1,145 @@
+package com.gyee.cache.config;
+
+
+
+
+import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.config.*;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import java.util.Scanner;
+
+/**
+ *@ClassName GeneratorCodeConfig
+ *@Description 自动生成mybatisplus的相关代码
+ *@Author 谢生杰
+ *@Date 2020/9/25 18:26
+ *@Version 1.0
+ **/
+public class GeneratorCodeConfig {
+    public static String scanner(String tip) {
+        Scanner scanner = new Scanner(System.in);
+        StringBuilder help = new StringBuilder();
+        help.append("请输入" + tip + ":");
+        System.out.println(help.toString());
+        if (scanner.hasNext()) {
+            String ipt = scanner.next();
+            if (StringUtils.isNotEmpty(ipt)) {
+                return ipt;
+            }
+        }
+        throw new MybatisPlusException("请输入正确的" + tip + "!");
+    }
+
+    public static void main(String[] args) {
+        // 代码生成器
+        AutoGenerator mpg = new AutoGenerator();
+
+        // 全局配置
+        GlobalConfig gc = new GlobalConfig();
+        String projectPath = System.getProperty("user.dir");
+        gc.setOutputDir(projectPath + "/src/main/java");
+        gc.setAuthor("谢生杰");
+        gc.setOpen(false);
+        //实体属性 Swagger2 注解
+        gc.setSwagger2(false);
+        mpg.setGlobalConfig(gc);
+
+        // 数据源配置
+        DataSourceConfig dsc = new DataSourceConfig();
+        /*dsc.setUrl("jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("root");
+        dsc.setPassword("root");
+        mpg.setDataSource(dsc);*/
+        dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
+        dsc.setUsername("gdprod");
+        dsc.setPassword("gd123");
+        dsc.setUrl("jdbc:oracle:thin:@10.83.68.165:1521:gdsj");
+
+        mpg.setDataSource(dsc);
+
+
+
+        // 包配置
+        PackageConfig pc = new PackageConfig();
+//        pc.setModuleName(scanner("模块名"));
+        pc.setParent("com.gyee.cache");
+        pc.setEntity("model.auto");
+        pc.setMapper("mapper.auto");
+        pc.setService("service.auto");
+        pc.setServiceImpl("service.auto.impl");
+        mpg.setPackageInfo(pc);
+
+        // 自定义配置
+//        InjectionConfig cfg = new InjectionConfig() {
+//            @Override
+//            public void initMap() {
+//                // to do nothing
+//            }
+//        };
+
+        // 如果模板引擎是 freemarker
+//        String templatePath = "/templates/mapper.xml.ftl";
+        // 如果模板引擎是 velocity
+        // String templatePath = "/templates/mapper.xml.vm";
+
+        // 自定义输出配置
+//        List<FileOutConfig> focList = new ArrayList<>();
+        // 自定义配置会被优先输出
+//        focList.add(new FileOutConfig(templatePath) {
+//            @Override
+//            public String outputFile(TableInfo tableInfo) {
+//                // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
+//                return projectPath + "/src/main/resources/mapper/" + pc.getModuleName()
+//                        + "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
+//            }
+//        });
+        /*
+        cfg.setFileCreate(new IFileCreate() {
+            @Override
+            public boolean isCreate(ConfigBuilder configBuilder, FileType fileType, String filePath) {
+                // 判断自定义文件夹是否需要创建
+                checkDir("调用默认方法创建的目录");
+                return false;
+            }
+        });
+        */
+//        cfg.setFileOutConfigList(focList);
+//        mpg.setCfg(cfg);
+
+        // 配置模板
+        TemplateConfig templateConfig = new TemplateConfig();
+
+        // 配置自定义输出模板
+        //指定自定义模板路径,注意不要带上.ftl/.vm, 会根据使用的模板引擎自动识别
+        // templateConfig.setEntity("templates/entity2.java");
+        // templateConfig.setService();
+        // templateConfig.setController();
+
+        templateConfig.setXml(null);
+        mpg.setTemplate(templateConfig);
+
+        // 策略配置
+        StrategyConfig strategy = new StrategyConfig();
+        strategy.setNaming(NamingStrategy.underline_to_camel);
+        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
+        strategy.setSuperEntityClass("com.baomidou.mybatisplus.extension.activerecord.Model");
+        strategy.setEntityLombokModel(true);
+        strategy.setRestControllerStyle(true);
+
+        strategy.setEntityLombokModel(true);
+        // 公共父类
+//        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
+        // 写于父类中的公共字段
+//        strategy.setSuperEntityColumns("id");
+        strategy.setInclude(scanner("表名,多个英文逗号分割").split(","));
+        strategy.setControllerMappingHyphenStyle(true);
+        strategy.setTablePrefix(pc.getModuleName() + "_");
+        mpg.setStrategy(strategy);
+        mpg.setTemplateEngine(new FreemarkerTemplateEngine());
+        mpg.execute();
+    }
+}

+ 24 - 0
cache/src/main/java/com/gyee/cache/config/MybatisPlusConfig.java

@@ -0,0 +1,24 @@
+package com.gyee.cache.config;
+
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ *@ClassName MybatisPlusConfig
+ *@Description 配置分页插件
+ *@Author 谢生杰
+ *@Date 2020/9/25 18:24
+ *@Version 1.0
+ **/
+@Configuration
+public class MybatisPlusConfig {
+    /**
+     * 分页插件
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        return new PaginationInterceptor();
+    }
+}

+ 44 - 0
cache/src/main/java/com/gyee/cache/config/RedisAutoConfiguration.java

@@ -0,0 +1,44 @@
+package com.gyee.cache.config;
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.StringRedisTemplate;
+
+import java.net.UnknownHostException;
+
+@Configuration
+@ConditionalOnClass(RedisOperations.class)
+@EnableConfigurationProperties(RedisProperties.class)
+public class RedisAutoConfiguration {
+
+
+    @Bean
+    @ConditionalOnMissingBean(name = "redisTemplate")
+    public RedisTemplate<Object, Object> redisTemplate(
+            RedisConnectionFactory redisConnectionFactory) throws UnknownHostException {
+        RedisTemplate<Object, Object> template = new RedisTemplate<>();
+        template.setConnectionFactory(redisConnectionFactory);
+        return template;
+
+    }
+
+
+    @Bean
+    @ConditionalOnMissingBean
+    public StringRedisTemplate stringRedisTemplate(
+            RedisConnectionFactory redisConnectionFactory) throws UnknownHostException {
+        StringRedisTemplate template = new StringRedisTemplate();
+        template.setConnectionFactory(redisConnectionFactory);
+        return template;
+
+    }
+
+
+}

+ 46 - 0
cache/src/main/java/com/gyee/cache/config/RedisConfig.java

@@ -0,0 +1,46 @@
+package com.gyee.cache.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+/**
+
+/**
+ *@ClassName RedisConfig
+ *@Description TODO
+ *@Author 谢生杰
+ *@Date 2020/9/14 10:42
+ *@Version 1.0
+ **/
+@Configuration
+public class RedisConfig {
+    @Bean
+    @SuppressWarnings("all")
+    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
+        RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
+        template.setConnectionFactory(factory);
+        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
+        ObjectMapper om = new ObjectMapper();
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+        jackson2JsonRedisSerializer.setObjectMapper(om);
+        StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
+        // key采用String的序列化方式
+        template.setKeySerializer(stringRedisSerializer);
+        // hash的key也采用String的序列化方式
+        template.setHashKeySerializer(stringRedisSerializer);
+        // value序列化方式采用jackson
+        template.setValueSerializer(jackson2JsonRedisSerializer);
+        // hash的value序列化方式采用jackson
+        template.setHashValueSerializer(jackson2JsonRedisSerializer);
+        template.afterPropertiesSet();
+        return template;
+    }
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/DatacenterController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//datacenter")
+public class DatacenterController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/DatacenterpointController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//datacenterpoint")
+public class DatacenterpointController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/LineController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//line")
+public class LineController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/ModelpowerrdController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//modelpowerrd")
+public class ModelpowerrdController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/ProjectController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//project")
+public class ProjectController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/WindpowerstationController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//windpowerstation")
+public class WindpowerstationController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/WindpowerstationtestingpointController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//windpowerstationtestingpoint")
+public class WindpowerstationtestingpointController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/WindturbineController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//windturbine")
+public class WindturbineController {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/controller/WindturbinetestingpointaiController.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@RestController
+@RequestMapping("//windturbinetestingpointai")
+public class WindturbinetestingpointaiController {
+
+}

+ 188 - 0
cache/src/main/java/com/gyee/cache/init/CacheContext.java

@@ -0,0 +1,188 @@
+package com.gyee.cache.init;
+
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.cache.model.auto.*;
+import com.gyee.cache.service.RedisService;
+import com.gyee.cache.service.auto.*;
+
+
+import com.gyee.common.util.JSONUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+
+/**
+ * @ClassName : CacheContext
+ * @Author : xieshengjie
+ * @Date: 2021/5/18 9:35
+ * @Description : 缓存
+ */
+@Component
+public class CacheContext implements CommandLineRunner {
+    @Autowired
+    private RedisService redisService;
+    @Autowired
+    private IDatacenterService datacenterService;
+    @Autowired
+    private IDatacenterpointService datacenterpointService;
+    @Autowired
+    private IWindturbinetestingpointaiService windturbinetestingpointai2Service;
+    @Autowired
+    private IWindturbineService windturbineService;
+    @Autowired
+    private ILineService lineService;
+    @Autowired
+    private IWindpowerstationtestingpointService windpowerstationtestingpoint2Service;
+    @Autowired
+    private IProjectService projectService;
+    @Autowired
+    private IWindpowerstationService windpowerstationService;
+    @Autowired
+    private IModelpowerrdService modelpowerrdService;
+
+    public static Map<String, Map<String, Windturbinetestingpointai>> wtpointMap = new HashMap<>();
+    public static List<Windturbine> wtls = new ArrayList<>();
+    @Override
+    public void run(String... args) throws Exception {
+
+        Logger logger= LoggerFactory.getLogger(CacheContext.class);
+//        logger.info("----------------------缓存开始");
+//        wtls = windturbineService.list();
+//        List<Windturbinetestingpointai> wtplist = windturbinetestingpointai2Service.list();
+//        for (Windturbinetestingpointai pointai : wtplist) {
+//            if (wtpointMap.containsKey(pointai.getWindturbineid())){
+//                wtpointMap.get(pointai.getWindturbineid()).put(pointai.getUniformcode(),pointai);
+//            }else{
+//                Map<String, Windturbinetestingpointai> map = new HashMap<>();
+//                map.put(pointai.getUniformcode(),pointai);
+//                wtpointMap.put(pointai.getWindturbineid(),map);
+//            }
+//        }
+//
+//        logger.info("----------------------缓存结束");
+
+
+//        logger.info("----------------------数据中心点开始");
+//        //缓存golden 所有点
+//        List<Datacenter> datacenterList = datacenterService.list();
+//
+//        datacenterList.stream().forEach(i->{
+//            if (!redisService.hasKey(i.getTableid())){
+//                QueryWrapper<Datacenterpoint> queryWrapper = new QueryWrapper<>();
+//                queryWrapper.eq("tid",i.getTableid());
+//                List<Datacenterpoint> realtimedataList = datacenterpointService.list(queryWrapper);
+//                String s = null;
+//                try {
+//                    s = JSONUtil.objectToJson(realtimedataList);
+//                } catch (IOException e) {
+//                    e.printStackTrace();
+//                }
+//                redisService.set(i.getTableid(),s);
+//            }
+//        });
+//        logger.info("----------------------数据中心点结束");
+        logger.info("----------------------设备点开始");
+        //缓存设备点
+        if (!redisService.hasKey("WT")){
+            Map<String,Map<String,Windturbinetestingpointai>> wtaimap = new HashMap<>();
+            List<Windturbine> windturbineList = windturbineService.list();
+            windturbineList.stream().forEach(i->{
+                Map<String,Windturbinetestingpointai> codeaimap = new HashMap<>();
+                QueryWrapper<Windturbinetestingpointai> qw = new QueryWrapper<>();
+                qw.eq("windturbineid",i.getId());
+                List<Windturbinetestingpointai> windturbinetestingpointai2List = windturbinetestingpointai2Service.list(qw);
+                windturbinetestingpointai2List.stream().forEach(x->{
+                    codeaimap.put(x.getUniformcode(),x);
+                });
+                wtaimap.put(i.getId(),codeaimap);
+            });
+            String s = JSONObject.toJSONString(wtaimap);
+            redisService.set("WT",s);
+        };
+        logger.info("----------------------设备点结束");
+        logger.info("----------------------线路点开始");
+        //缓存线路点
+        if (!redisService.hasKey("LN")){
+            Map<String,Map<String, Windpowerstationtestingpoint>> lnaimap = new HashMap<>();
+            List<Line> lineList = lineService.list();
+            lineList.stream().forEach(i->{
+                Map<String,Windpowerstationtestingpoint> codeaimap = new HashMap<>();
+                QueryWrapper<Windpowerstationtestingpoint> qw = new QueryWrapper<>();
+                qw.eq("windpowerstationid",i.getId());
+                List<Windpowerstationtestingpoint> windpowerstationtestingpoint2List = windpowerstationtestingpoint2Service.list(qw);
+                windpowerstationtestingpoint2List.stream().forEach(x->{
+                    codeaimap.put(x.getUniformcode(),x);
+                });
+                lnaimap.put(i.getId(),codeaimap);
+            });
+            String s = JSONObject.toJSONString(lnaimap);
+            redisService.set("LN",s);
+        };
+        logger.info("----------------------线路点结束");
+        logger.info("----------------------工程点开始");
+        //缓存工程点
+        if (!redisService.hasKey("PJ")){
+            Map<String,Map<String, Windpowerstationtestingpoint>> pjaimap = new HashMap<>();
+            List<Project> projectList = projectService.list();
+            projectList.stream().forEach(i->{
+                Map<String,Windpowerstationtestingpoint> codeaimap = new HashMap<>();
+                QueryWrapper<Windpowerstationtestingpoint> qw = new QueryWrapper<>();
+                qw.eq("windpowerstationid",i.getId());
+                List<Windpowerstationtestingpoint> windpowerstationtestingpoint2List = windpowerstationtestingpoint2Service.list(qw);
+                windpowerstationtestingpoint2List.stream().forEach(x->{
+                    codeaimap.put(x.getUniformcode(),x);
+                });
+                pjaimap.put(i.getId(),codeaimap);
+            });
+            String s = JSONObject.toJSONString(pjaimap);
+            redisService.set("PJ",s);
+        };
+        logger.info("----------------------工程点结束");
+        logger.info("----------------------场站点开始");
+        //缓存场站点
+        if (!redisService.hasKey("WP")){
+            Map<String,Map<String, Windpowerstationtestingpoint>> wpaimap = new HashMap<>();
+            List<Windpowerstation> wpList = windpowerstationService.list();
+            List<String> wpids = wpList.stream().map(i -> i.getId()).collect(Collectors.toList());
+            wpids.add("0");
+            wpids.add("-1");
+            wpids.add("-2");
+            wpids.stream().forEach(i->{
+                Map<String,Windpowerstationtestingpoint> codeaimap = new HashMap<>();
+                QueryWrapper<Windpowerstationtestingpoint> qw = new QueryWrapper<>();
+                qw.eq("windpowerstationid",i);
+                List<Windpowerstationtestingpoint> windpowerstationtestingpoint2List = windpowerstationtestingpoint2Service.list(qw);
+                windpowerstationtestingpoint2List.stream().forEach(x->{
+                    codeaimap.put(x.getUniformcode(),x);
+                });
+                wpaimap.put(i,codeaimap);
+            });
+            String s = JSONObject.toJSONString(wpaimap);
+
+            redisService.set("WP",s);
+        };
+        logger.info("----------------------场站点结束");
+        logger.info("----------------------MODELPOWERRD表开始");
+        if (!redisService.hasKey("MPRD")){
+            List<Modelpowerrd> mordlist = modelpowerrdService.list();
+            String s = JSONObject.toJSONString(mordlist);
+            redisService.set("MPRD",s);
+        }
+        logger.info("----------------------MODELPOWERRD表结束");
+
+
+    }
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/DatacenterMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Datacenter;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface DatacenterMapper extends BaseMapper<Datacenter> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/DatacenterpointMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Datacenterpoint;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface DatacenterpointMapper extends BaseMapper<Datacenterpoint> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/LineMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Line;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface LineMapper extends BaseMapper<Line> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/ModelpowerrdMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Modelpowerrd;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface ModelpowerrdMapper extends BaseMapper<Modelpowerrd> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/ProjectMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Project;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface ProjectMapper extends BaseMapper<Project> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/WindpowerstationMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Windpowerstation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface WindpowerstationMapper extends BaseMapper<Windpowerstation> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/WindpowerstationtestingpointMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Windpowerstationtestingpoint;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface WindpowerstationtestingpointMapper extends BaseMapper<Windpowerstationtestingpoint> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/WindturbineMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Windturbine;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface WindturbineMapper extends BaseMapper<Windturbine> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/mapper/auto/WindturbinetestingpointaiMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.mapper.auto;
+
+import com.gyee.cache.model.auto.Windturbinetestingpointai;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface WindturbinetestingpointaiMapper extends BaseMapper<Windturbinetestingpointai> {
+
+}

+ 51 - 0
cache/src/main/java/com/gyee/cache/model/auto/Datacenter.java

@@ -0,0 +1,51 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("DATACENTER")
+public class Datacenter extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private Long id;
+
+    @TableField("TABLEID")
+    private String tableid;
+
+    @TableField("TABLENAME")
+    private String tablename;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("ORDERNO")
+    private BigDecimal orderno;
+
+    @TableField("SPARE1")
+    private String spare1;
+
+    @TableField("SPARE2")
+    private String spare2;
+
+    @TableField("SPARE3")
+    private String spare3;
+
+
+}

+ 51 - 0
cache/src/main/java/com/gyee/cache/model/auto/Datacenterpoint.java

@@ -0,0 +1,51 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("DATACENTERPOINT")
+public class Datacenterpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("TID")
+    private String tid;
+
+    @TableField("AIORDI")
+    private String aiordi;
+
+    @TableField("ORDERNO")
+    private BigDecimal orderno;
+
+    @TableField("SPARE1")
+    private String spare1;
+
+    @TableField("SPARE2")
+    private String spare2;
+
+    @TableField("SPARE3")
+    private String spare3;
+
+
+}

+ 54 - 0
cache/src/main/java/com/gyee/cache/model/auto/Line.java

@@ -0,0 +1,54 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("LINE")
+public class Line extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("ANAME")
+    private String aname;
+
+    @TableField("PROJECTID")
+    private String projectid;
+
+    @TableField("ORDERNUM")
+    private BigDecimal ordernum;
+
+    @TableField("CAPACITY")
+    private BigDecimal capacity;
+
+    @TableField("CAPACITYUNIT")
+    private String capacityunit;
+
+    @TableField("QUANTITY")
+    private BigDecimal quantity;
+
+
+}

+ 42 - 0
cache/src/main/java/com/gyee/cache/model/auto/Modelpowerrd.java

@@ -0,0 +1,42 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("MODELPOWERRD")
+public class Modelpowerrd extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("SPEED")
+    private BigDecimal speed;
+
+    @TableField("THEORYPOWER")
+    private BigDecimal theorypower;
+
+    @TableField("ENSUREPOWER")
+    private BigDecimal ensurepower;
+
+
+}

+ 72 - 0
cache/src/main/java/com/gyee/cache/model/auto/Project.java

@@ -0,0 +1,72 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("PROJECT")
+public class Project extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("ANAME")
+    private String aname;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("CAPACITY")
+    private BigDecimal capacity;
+
+    @TableField("CAPACITYUNIT")
+    private String capacityunit;
+
+    @TableField("QUANTITY")
+    private BigDecimal quantity;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("COMMISSIONDATE")
+    private Date commissiondate;
+
+    @TableField("MASTERPHONE")
+    private String masterphone;
+
+    @TableField("SHIFTFOREMAN")
+    private String shiftforeman;
+
+    @TableField("SHIFTFOREMANPHONE")
+    private String shiftforemanphone;
+
+    @TableField("ORDERNUM")
+    private BigDecimal ordernum;
+
+
+}

+ 87 - 0
cache/src/main/java/com/gyee/cache/model/auto/Windpowerstation.java

@@ -0,0 +1,87 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDPOWERSTATION")
+public class Windpowerstation extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("ADDRESS")
+    private String address;
+
+    @TableField("TELEPHONE")
+    private String telephone;
+
+    @TableField("CAPACITY")
+    private BigDecimal capacity;
+
+    @TableField("CAPACITYUNIT")
+    private String capacityunit;
+
+    @TableField("QUANTITY")
+    private BigDecimal quantity;
+
+    @TableField("ANAME")
+    private String aname;
+
+    @TableField("LONGITUDE")
+    private BigDecimal longitude;
+
+    @TableField("LATITUDE")
+    private BigDecimal latitude;
+
+    @TableField("PHOTO")
+    private String photo;
+
+    @TableField("COMPANYID")
+    private String companyid;
+
+    @TableField("SYSTEMMANUFACT")
+    private String systemmanufact;
+
+    @TableField("HEADFARM")
+    private String headfarm;
+
+    @TableField("HEADFARMPHONE")
+    private String headfarmphone;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("ORDERNUM")
+    private BigDecimal ordernum;
+
+    @TableField("ALTITUDE")
+    private BigDecimal altitude;
+
+    @TableField("HEIGHT")
+    private BigDecimal height;
+
+
+}

+ 75 - 0
cache/src/main/java/com/gyee/cache/model/auto/Windpowerstationtestingpoint.java

@@ -0,0 +1,75 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDPOWERSTATIONTESTINGPOINT")
+public class Windpowerstationtestingpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private BigDecimal maxval;
+
+    @TableField("MINVAL")
+    private BigDecimal minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private BigDecimal reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private BigDecimal reasonableminval;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 69 - 0
cache/src/main/java/com/gyee/cache/model/auto/Windturbine.java

@@ -0,0 +1,69 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDTURBINE")
+public class Windturbine extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("LONGITUDE")
+    private BigDecimal longitude;
+
+    @TableField("LATITUDE")
+    private BigDecimal latitude;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("STATUS")
+    private String status;
+
+    @TableField("PROJECTID")
+    private String projectid;
+
+    @TableField("LINEID")
+    private String lineid;
+
+    @TableField("FIRSTINTEGRATEDTIME")
+    private Date firstintegratedtime;
+
+    @TableField("PHOTO")
+    private String photo;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("STANDARDID")
+    private String standardid;
+
+
+}

+ 81 - 0
cache/src/main/java/com/gyee/cache/model/auto/Windturbinetestingpointai.java

@@ -0,0 +1,81 @@
+package com.gyee.cache.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("WINDTURBINETESTINGPOINTAI")
+public class Windturbinetestingpointai extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("VALUEUNIT")
+    private String valueunit;
+
+    @TableField("ENGLISHNAME")
+    private String englishname;
+
+    @TableField("TYPEID")
+    private String typeid;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("MAXVAL")
+    private BigDecimal maxval;
+
+    @TableField("MINVAL")
+    private BigDecimal minval;
+
+    @TableField("REASONABLEMAXVAL")
+    private BigDecimal reasonablemaxval;
+
+    @TableField("REASONABLEMINVAL")
+    private BigDecimal reasonableminval;
+
+    @TableField("WINDTURBINEID")
+    private String windturbineid;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("SHORTID")
+    private String shortid;
+
+    @TableField("LONGID")
+    private String longid;
+
+    @TableField("WINDPOWERSTATIONID")
+    private String windpowerstationid;
+
+    @TableField("REALTIMEID")
+    private String realtimeid;
+
+
+}

+ 49 - 0
cache/src/main/java/com/gyee/cache/service/RedisService.java

@@ -0,0 +1,49 @@
+package com.gyee.cache.service;
+
+public interface RedisService {
+
+    /**
+     * set存数据
+     * @param key
+     * @param value
+     * @return
+     */
+    boolean set(String key, String value);
+
+    /**
+     * get获取数据
+     * @param key
+     * @return
+     */
+    String get(String key);
+
+//    void getList(String key,int start,int end);
+
+    /**
+     * 设置有效天数
+     * @param key
+     * @param expire
+     * @return
+     */
+    boolean expire(String key, long expire);
+
+    /**
+     * 移除数据
+     * @param key
+     * @return
+     */
+    boolean remove(String key);
+
+
+    /**
+     * 插入对象
+     */
+    void setObject(Object o);
+
+
+    boolean hasKey(String key);
+
+
+    void select(Integer dbIndex);
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IDatacenterService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Datacenter;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IDatacenterService extends IService<Datacenter> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IDatacenterpointService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Datacenterpoint;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IDatacenterpointService extends IService<Datacenterpoint> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/ILineService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Line;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface ILineService extends IService<Line> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IModelpowerrdService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Modelpowerrd;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IModelpowerrdService extends IService<Modelpowerrd> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IProjectService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Project;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IProjectService extends IService<Project> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IWindpowerstationService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Windpowerstation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IWindpowerstationService extends IService<Windpowerstation> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IWindpowerstationtestingpointService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Windpowerstationtestingpoint;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IWindpowerstationtestingpointService extends IService<Windpowerstationtestingpoint> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IWindturbineService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Windturbine;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IWindturbineService extends IService<Windturbine> {
+
+}

+ 16 - 0
cache/src/main/java/com/gyee/cache/service/auto/IWindturbinetestingpointaiService.java

@@ -0,0 +1,16 @@
+package com.gyee.cache.service.auto;
+
+import com.gyee.cache.model.auto.Windturbinetestingpointai;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+public interface IWindturbinetestingpointaiService extends IService<Windturbinetestingpointai> {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/DatacenterServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Datacenter;
+import com.gyee.cache.mapper.auto.DatacenterMapper;
+import com.gyee.cache.service.auto.IDatacenterService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class DatacenterServiceImpl extends ServiceImpl<DatacenterMapper, Datacenter> implements IDatacenterService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/DatacenterpointServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Datacenterpoint;
+import com.gyee.cache.mapper.auto.DatacenterpointMapper;
+import com.gyee.cache.service.auto.IDatacenterpointService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class DatacenterpointServiceImpl extends ServiceImpl<DatacenterpointMapper, Datacenterpoint> implements IDatacenterpointService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/LineServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Line;
+import com.gyee.cache.mapper.auto.LineMapper;
+import com.gyee.cache.service.auto.ILineService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements ILineService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/ModelpowerrdServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Modelpowerrd;
+import com.gyee.cache.mapper.auto.ModelpowerrdMapper;
+import com.gyee.cache.service.auto.IModelpowerrdService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class ModelpowerrdServiceImpl extends ServiceImpl<ModelpowerrdMapper, Modelpowerrd> implements IModelpowerrdService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/ProjectServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Project;
+import com.gyee.cache.mapper.auto.ProjectMapper;
+import com.gyee.cache.service.auto.IProjectService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/WindpowerstationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Windpowerstation;
+import com.gyee.cache.mapper.auto.WindpowerstationMapper;
+import com.gyee.cache.service.auto.IWindpowerstationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class WindpowerstationServiceImpl extends ServiceImpl<WindpowerstationMapper, Windpowerstation> implements IWindpowerstationService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/WindpowerstationtestingpointServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Windpowerstationtestingpoint;
+import com.gyee.cache.mapper.auto.WindpowerstationtestingpointMapper;
+import com.gyee.cache.service.auto.IWindpowerstationtestingpointService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class WindpowerstationtestingpointServiceImpl extends ServiceImpl<WindpowerstationtestingpointMapper, Windpowerstationtestingpoint> implements IWindpowerstationtestingpointService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/WindturbineServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Windturbine;
+import com.gyee.cache.mapper.auto.WindturbineMapper;
+import com.gyee.cache.service.auto.IWindturbineService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class WindturbineServiceImpl extends ServiceImpl<WindturbineMapper, Windturbine> implements IWindturbineService {
+
+}

+ 20 - 0
cache/src/main/java/com/gyee/cache/service/auto/impl/WindturbinetestingpointaiServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.cache.service.auto.impl;
+
+import com.gyee.cache.model.auto.Windturbinetestingpointai;
+import com.gyee.cache.mapper.auto.WindturbinetestingpointaiMapper;
+import com.gyee.cache.service.auto.IWindturbinetestingpointaiService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-01-20
+ */
+@Service
+public class WindturbinetestingpointaiServiceImpl extends ServiceImpl<WindturbinetestingpointaiMapper, Windturbinetestingpointai> implements IWindturbinetestingpointaiService {
+
+}

+ 125 - 0
cache/src/main/java/com/gyee/cache/service/impl/RedisServiceImpl.java

@@ -0,0 +1,125 @@
+package com.gyee.cache.service.impl;
+
+import com.gyee.cache.service.RedisService;
+import org.springframework.dao.DataAccessException;
+import org.springframework.data.redis.connection.RedisConnection;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Field;
+import java.util.concurrent.TimeUnit;
+
+@Service("redisService")
+public class RedisServiceImpl implements RedisService {
+
+    @Resource
+    private RedisTemplate<String, ?> redisTemplate;
+
+    @Override
+    public boolean set(final String key, final String value) {
+        boolean result = redisTemplate.execute(new RedisCallback<Boolean>() {
+            @Override
+            public Boolean doInRedis(RedisConnection connection) throws DataAccessException {
+                RedisSerializer<String> serializer = redisTemplate.getStringSerializer();
+                connection.set(serializer.serialize(key), serializer.serialize(value));
+                return true;
+            }
+        });
+        return result;
+    }
+
+    @Override
+    public String get(final String key) {
+        String result = redisTemplate.execute(new RedisCallback<String>() {
+            @Override
+            public String doInRedis(RedisConnection connection) throws DataAccessException {
+                RedisSerializer<String> serializer = redisTemplate.getStringSerializer();
+                byte[] value = connection.get(serializer.serialize(key));
+                return serializer.deserialize(value);
+            }
+        });
+        return result;
+    }
+
+
+
+    @Override
+    public boolean expire(final String key, long expire) {
+        return redisTemplate.expire(key, expire, TimeUnit.SECONDS);
+    }
+
+    @Override
+    public boolean remove(final String key) {
+        boolean result = redisTemplate.execute(new RedisCallback<Boolean>() {
+            @Override
+            public Boolean doInRedis(RedisConnection connection) throws DataAccessException {
+                RedisSerializer<String> serializer = redisTemplate.getStringSerializer();
+                connection.del(key.getBytes());
+                return true;
+            }
+        });
+        return result;
+    }
+
+    @Override
+    public boolean hasKey(final String key) {
+        try {
+            return redisTemplate.hasKey(key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public void setObject(Object obj) {
+        Field[] fields = obj.getClass().getDeclaredFields();
+        for(int i = 0 , len = fields.length; i < len; i++) {
+            // 对于每个属性,获取属性名
+            String varName = fields[i].getName();
+            try {
+                // 获取原来的访问控制权限
+                boolean accessFlag = fields[i].isAccessible();
+                // 修改访问控制权限
+                fields[i].setAccessible(true);
+                // 获取在对象f中属性fields[i]对应的对象中的变量
+                Object o;
+                try {
+                    o = fields[i].get(obj);
+                    if (o!=null){
+                        set(varName, String.valueOf(o));
+                    }else {
+                        set(varName,"");
+                    }
+
+                    //System.err.println("传入的对象中包含一个如下的变量:" + varName + " = " + o);
+                } catch (IllegalAccessException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+                // 恢复访问控制权限
+                fields[i].setAccessible(accessFlag);
+            } catch (IllegalArgumentException ex) {
+                ex.printStackTrace();
+            }
+        }
+
+    }
+
+    public void select(Integer dbIndex) {
+        if (dbIndex == null || dbIndex > 15 || dbIndex < 0) {
+            dbIndex = 0;
+        }
+        LettuceConnectionFactory jedisConnectionFactory = (LettuceConnectionFactory) redisTemplate
+                .getConnectionFactory();
+        jedisConnectionFactory.setDatabase(dbIndex);
+        redisTemplate.setConnectionFactory(jedisConnectionFactory);
+        jedisConnectionFactory.afterPropertiesSet();
+//        jedisConnectionFactory.resetConnection();
+
+    }
+}

+ 92 - 0
cache/src/main/resources/application.yml

@@ -0,0 +1,92 @@
+server:
+  port: 8044
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+#    host: 49.4.50.80
+    host: 10.83.68.94
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 19
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+#    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
+    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+
+golden:
+  baseURL: http://10.155.32.4:8011/ts
+

+ 92 - 0
cache/target/classes/application.yml

@@ -0,0 +1,92 @@
+server:
+  port: 8044
+  servlet:
+    context-path: /
+
+
+spring:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #redis集群
+  redis:
+#    host: 49.4.50.80
+    host: 10.83.68.94
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 19
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
+#    url: jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd
+    #    url: jdbc:oracle:thin:@172.168.1.14:1521:gdnxfd
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+    #    type: com.alibaba.druid.pool.DruidDataSource
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+
+
+golden:
+  baseURL: http://10.155.32.4:8011/ts
+

BIN
cache/target/classes/com/gyee/cache/CacheMain.class


BIN
cache/target/classes/com/gyee/cache/config/GeneratorCodeConfig.class


BIN
cache/target/classes/com/gyee/cache/config/MybatisPlusConfig.class


BIN
cache/target/classes/com/gyee/cache/config/RedisAutoConfiguration.class


BIN
cache/target/classes/com/gyee/cache/config/RedisConfig.class


BIN
cache/target/classes/com/gyee/cache/controller/DatacenterController.class


BIN
cache/target/classes/com/gyee/cache/controller/DatacenterpointController.class


BIN
cache/target/classes/com/gyee/cache/controller/LineController.class


BIN
cache/target/classes/com/gyee/cache/controller/ModelpowerrdController.class


BIN
cache/target/classes/com/gyee/cache/controller/ProjectController.class


BIN
cache/target/classes/com/gyee/cache/controller/WindpowerstationController.class


BIN
cache/target/classes/com/gyee/cache/controller/WindpowerstationtestingpointController.class


BIN
cache/target/classes/com/gyee/cache/controller/WindturbineController.class


BIN
cache/target/classes/com/gyee/cache/controller/WindturbinetestingpointaiController.class


BIN
cache/target/classes/com/gyee/cache/init/CacheContext.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/DatacenterMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/DatacenterpointMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/LineMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/ModelpowerrdMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/ProjectMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/WindpowerstationMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/WindpowerstationtestingpointMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/WindturbineMapper.class


BIN
cache/target/classes/com/gyee/cache/mapper/auto/WindturbinetestingpointaiMapper.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Datacenter.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Datacenterpoint.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Line.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Modelpowerrd.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Project.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Windpowerstation.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Windpowerstationtestingpoint.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Windturbine.class


BIN
cache/target/classes/com/gyee/cache/model/auto/Windturbinetestingpointai.class


BIN
cache/target/classes/com/gyee/cache/service/RedisService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IDatacenterService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IDatacenterpointService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/ILineService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IModelpowerrdService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IProjectService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IWindpowerstationService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IWindpowerstationtestingpointService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IWindturbineService.class


BIN
cache/target/classes/com/gyee/cache/service/auto/IWindturbinetestingpointaiService.class


+ 0 - 0
cache/target/classes/com/gyee/cache/service/auto/impl/DatacenterServiceImpl.class


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません