kobe6258 пре 4 месеци
родитељ
комит
39fd66bbe6
66 измењених фајлова са 1225 додато и 130 уклоњено
  1. 1 1
      .idea/misc.xml
  2. 1 0
      .idea/modules.xml
  3. 8 0
      qhtx-eta-integrator/pom.xml
  4. 33 0
      qhtx-eta-integrator/qhtx-integrator-application/pom.xml
  5. 14 0
      qhtx-eta-integrator/qhtx-integrator-application/src/main/java/com/qhtx/eta/controller/ETAController.java
  6. 13 0
      qhtx-eta-integrator/qhtx-integrator-application/src/main/java/com/qhtx/eta/controller/request/ETAIndexPushRequest.java
  7. 2 1
      qhtx-eta-integrator/qhtx-integrator-common/pom.xml
  8. 11 0
      qhtx-eta-integrator/qhtx-integrator-common/src/main/java/com/qhtx/eta/common/constant/ETAConstants.java
  9. 4 0
      qhtx-eta-integrator/qhtx-integrator-common/src/main/java/com/qhtx/eta/common/eunms/ErrorEnum.java
  10. 19 0
      qhtx-eta-integrator/qhtx-integrator-common/src/main/java/com/qhtx/eta/common/utils/SpringApplicationUtils.java
  11. 20 0
      qhtx-eta-integrator/qhtx-integrator-domain/pom.xml
  12. 14 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/api/http/response/eta/ClassifyDataResponse.java
  13. 18 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/api/http/response/eta/ETAClassifyData.java
  14. 40 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/RedisConfig.java
  15. 1 1
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/ScheduleConfig.java
  16. 3 2
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/ScheduleTaskConfig.java
  17. 11 3
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/ThreadPoolConfig.java
  18. 13 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/ClassifyDTOConverter.java
  19. 27 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/ClassifyMappingDTOConverter.java
  20. 18 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/DWIndexFrameDTOConverter.java
  21. 18 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/ETAClassifyIndexFrameMappingConverter.java
  22. 2 2
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/EtaApiQuotaDataConverter.java
  23. 1 1
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/EtaApiQuotaInfoConverter.java
  24. 14 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/entity/ClassifyMappingDTO.java
  25. 19 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/entity/DWIndexFrameDTO.java
  26. 2 1
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/enums/ETAInterfaceEnum.java
  27. 29 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/enums/ETATaskEnum.java
  28. 69 16
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/job/ETASyncJob.java
  29. 13 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/DWIndexFrameService.java
  30. 10 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/ETAClassifyService.java
  31. 190 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/impl/DWIndexFrameServiceImpl.java
  32. 33 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/impl/ETAClassifyServiceImpl.java
  33. 2 3
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/impl/ETAQuotaServiceImpl.java
  34. 47 48
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/task/TaskConfigChangeListener.java
  35. 103 0
      qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/utils/RedisUtils.java
  36. 24 11
      qhtx-eta-integrator/qhtx-integrator-infra/pom.xml
  37. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/annotation/UseDataSource.java
  38. 2 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/aspect/DataSourceSwitchAspect.java
  39. 0 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/datasource/DynamicDataSource.java
  40. 30 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/dw/DWIndexFrame.java
  41. 18 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/dw/ETAClassifyIndexFrameMapping.java
  42. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/ods/EtaApiQuotaData.java
  43. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/ods/EtaApiQuotaInfo.java
  44. 5 3
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/enums/Frequency.java
  45. 17 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/DWIndexFrameDao.java
  46. 18 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/ETAClassifyIndexFrameMappingDao.java
  47. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/EtaApiQuotaDataDao.java
  48. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/EtaApiQuotaInfoDao.java
  49. 16 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/EtaApiClassifyService.java
  50. 1 3
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/EtaApiQuotaDataService.java
  51. 1 3
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/EtaApiQuotaInfoService.java
  52. 15 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/IndexFrameService.java
  53. 0 2
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/OdsDimService.java
  54. 43 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/EtaApiClassifyServiceImpl.java
  55. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/EtaApiQuotaDataServiceImpl.java
  56. 3 2
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/EtaApiQuotaInfoServiceImpl.java
  57. 43 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/IndexFrameServiceImpl.java
  58. 10 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/utils/DruidEncryptUtil.java
  59. 69 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/DWIndexFrameDao.xml
  60. 64 0
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/ETAClassifyIndexFrameMappingDao.xml
  61. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/EtaApiQuotaDataDao.xml
  62. 1 1
      qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/EtaApiQuotaInfoDao.xml
  63. 1 1
      qhtx-eta-integrator/qhtx-integrator-starter/pom.xml
  64. 5 3
      qhtx-eta-integrator/qhtx-integrator-starter/src/main/resources/bootstrap-prod.yml
  65. 0 13
      qhtx-eta-task/src/main/java/com/qhtx/eta/App.java
  66. 9 0
      qhtx-integrator-web.iml

+ 1 - 1
.idea/misc.xml

@@ -9,7 +9,7 @@
       </list>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
 </project>

+ 1 - 0
.idea/modules.xml

@@ -2,6 +2,7 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
+      <module fileurl="file://$PROJECT_DIR$/qhtx-eta-api.iml" filepath="$PROJECT_DIR$/qhtx-eta-api.iml" />
       <module fileurl="file://$PROJECT_DIR$/.idea/qhtx-parent.iml" filepath="$PROJECT_DIR$/.idea/qhtx-parent.iml" />
     </modules>
   </component>

+ 8 - 0
qhtx-eta-integrator/pom.xml

@@ -29,6 +29,7 @@
         <module>qhtx-integrator-domain</module>
         <module>qhtx-integrator-common</module>
         <module>qhtx-integrator-infra</module>
+        <module>qhtx-integrator-application</module>
     </modules>
 
     <dependencyManagement>
@@ -63,6 +64,11 @@
                 <version>${okhttp.version}</version>
             </dependency>
 
+
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-data-redis</artifactId>
+            </dependency>
             <dependency>
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
@@ -76,6 +82,8 @@
                 <scope>test</scope>
             </dependency>
         </dependencies>
+
+
     </dependencyManagement>
 
 

+ 33 - 0
qhtx-eta-integrator/qhtx-integrator-application/pom.xml

@@ -0,0 +1,33 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.qhtx.eta</groupId>
+        <artifactId>qhtx-eta-integrator</artifactId>
+        <version>1.0.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>qhtx-integrator-application</artifactId>
+    <packaging>jar</packaging>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.qhtx.eta</groupId>
+            <artifactId>qhtx-integrator-domain</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-webflux</artifactId>
+            <version>2.4.2</version>
+        </dependency>
+    </dependencies>
+</project>

+ 14 - 0
qhtx-eta-integrator/qhtx-integrator-application/src/main/java/com/qhtx/eta/controller/ETAController.java

@@ -0,0 +1,14 @@
+package com.qhtx.eta.controller;
+
+import com.qhtx.eta.controller.request.ETAIndexPushRequest;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/htapi/v1/index")
+public class ETAController {
+    @PostMapping("/push")
+    public String getIndex(@RequestBody ETAIndexPushRequest etaIndexPushRequest) {
+        System.out.println(etaIndexPushRequest.getIndexCode());
+        return "获取指标成功";
+    }
+}

+ 13 - 0
qhtx-eta-integrator/qhtx-integrator-application/src/main/java/com/qhtx/eta/controller/request/ETAIndexPushRequest.java

@@ -0,0 +1,13 @@
+package com.qhtx.eta.controller.request;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ETAIndexPushRequest implements Serializable {
+
+    private static final long serialVersionUID = 3224850869872082122L;
+    
+    private String indexCode;
+}

+ 2 - 1
qhtx-eta-integrator/qhtx-integrator-common/pom.xml

@@ -91,10 +91,11 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-aop</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
         </dependency>
+
     </dependencies>
 </project>

+ 11 - 0
qhtx-eta-integrator/qhtx-integrator-common/src/main/java/com/qhtx/eta/common/constant/ETAConstants.java

@@ -19,6 +19,8 @@ public class ETAConstants {
      */
     public static final String THREAD_POOL_ETA_INFO = "eta_info";
     public static final String THREAD_POOL_ETA_DATA = "eta_data";
+    public static final String THREAD_POOL_ETA_CLASSIFY = "eta_classify";
+    public static final String THREAD_POOL_INDEX_FRAME = "index_frame";
 
     /**
      * date
@@ -34,4 +36,13 @@ public class ETAConstants {
     public static final String MAPPER_LOCATION = "classpath*:mapper/*.xml";
 
     public static final String ODS_DATA_TABLE_NAME = "T_ETA_API_QUOTA_DATA";
+
+    public static final String DW_INDEX_FRAME_PARENT_NAME = "弘则研究";
+
+    //海通DW
+    public static final String REDIS_INDEX_FRAME_TABLE_CODE_KEY="t_damp_dm_index_frame_table_code_incr";
+    public static final String INDEX_FRAME_TABLE_CODE_PREFIX = "DWZBKJ";
+    public static final String INDEX_FRAME_CREATE_UPDATE_USER_NAME = "SYSINI";
+
+    public static final int INDEX_FRAME_CREATE_UPDATE_USER_ID = 0;
 }

+ 4 - 0
qhtx-eta-integrator/qhtx-integrator-common/src/main/java/com/qhtx/eta/common/eunms/ErrorEnum.java

@@ -33,6 +33,10 @@ public enum ErrorEnum {
     PARSE_RESPONSE_ERROR("20007", "解析返回结果失败%s"),
     RESPONSE_EMPTY_ERROR("20008", "接口请求应答为空"),
     PARAM_TYPE_ERROR("20009", "参数类型错误"),
+
+
+    DW_INDEX_TABLE_CODE_GET_ERROR("20010", "获取指标框架table_code失败"),
+    DW_HZ_ROOT_PATH_NOT_EXIST("20011", "弘则研究指标根目录不存在"),
     ;
     private String code;
     private String msg;

+ 19 - 0
qhtx-eta-integrator/qhtx-integrator-common/src/main/java/com/qhtx/eta/common/utils/SpringApplicationUtils.java

@@ -0,0 +1,19 @@
+package com.qhtx.eta.common.utils;
+
+import lombok.Getter;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+@Getter
+@Component
+public class SpringApplicationUtils implements ApplicationContextAware {
+    private ApplicationContext applicationContext;
+
+    @Override
+    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+        this.applicationContext = applicationContext;
+    }
+
+}

+ 20 - 0
qhtx-eta-integrator/qhtx-integrator-domain/pom.xml

@@ -18,6 +18,12 @@
             <version>2.12.7</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+            <version>2.4.2</version>
+        </dependency>
+
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
@@ -35,5 +41,19 @@
             <artifactId>qhtx-integrator-infra</artifactId>
             <version>${project.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <version>2.4.2</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

+ 14 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/api/http/response/eta/ClassifyDataResponse.java

@@ -0,0 +1,14 @@
+package com.qhtx.eta.domain.api.http.response.eta;
+
+import com.qhtx.eta.domain.convert.ClassifyDTOConverter;
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class ClassifyDataResponse extends ETAHttpResponse<ETAClassifyData, ClassifyMappingDTO> {
+    @Override
+    public List<ClassifyMappingDTO> convertDataToDTO() {
+        return this.getData().stream().map(ClassifyDTOConverter.INSTANCE::convertDataToDTO).collect(Collectors.toList());
+    }
+}

+ 18 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/api/http/response/eta/ETAClassifyData.java

@@ -0,0 +1,18 @@
+package com.qhtx.eta.domain.api.http.response.eta;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ETAClassifyData implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Integer classifyId;
+    private String classifyName;
+    private String uniqueCode;
+    private Integer parentId;
+    private Integer level;
+    private Integer sort;
+    private String createTime;
+    private String updateTime;
+}

+ 40 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/RedisConfig.java

@@ -0,0 +1,40 @@
+package com.qhtx.eta.domain.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+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.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+@Configuration
+public class RedisConfig {
+
+    @Bean
+    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
+        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+        RedisSerializer<String> redisSerializer = new StringRedisSerializer();
+        redisTemplate.setConnectionFactory(redisConnectionFactory);
+        redisTemplate.setKeySerializer(redisSerializer);
+        redisTemplate.setHashKeySerializer(redisSerializer);
+        redisTemplate.setValueSerializer(jackson2JsonRedisSerializer());
+        redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer());
+        return redisTemplate;
+    }
+
+    private Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer() {
+        Jackson2JsonRedisSerializer<Object> jsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
+        jsonRedisSerializer.setObjectMapper(objectMapper);
+        return jsonRedisSerializer;
+    }
+}

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/ScheduleConfig.java

@@ -7,8 +7,8 @@ import java.io.Serializable;
 @Data
 public class ScheduleConfig implements Serializable {
 
-
     private static final long serialVersionUID = 857963555565694343L;
+    private String name;
     private Integer interval;
     private Integer initialDelay;
     private Boolean enabled;

+ 3 - 2
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/ScheduleTaskConfig.java

@@ -6,12 +6,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
+
 @Component
 @ConfigurationProperties(prefix = "eta.scheduled")
 @Data
 @RefreshScope
 public class ScheduleTaskConfig {
 
-    private ScheduleConfig info;
-    private ScheduleConfig data;
+    private List<ScheduleConfig> list;
 }

+ 11 - 3
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/config/ThreadPoolConfig.java

@@ -4,9 +4,8 @@ import com.qhtx.eta.common.constant.ETAConstants;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
+import java.util.List;
+import java.util.concurrent.*;
 
 /**
  * 线程池的config管理
@@ -27,4 +26,13 @@ public class ThreadPoolConfig {
         return new ThreadPoolExecutor(10, 20, 5, TimeUnit.SECONDS, new LinkedBlockingDeque<>(40), new ETAThreadFactory(ETAConstants.THREAD_POOL_ETA_DATA), new ThreadPoolExecutor.CallerRunsPolicy());
     }
 
+    @Bean(name = "ETAClassifyThreadPool")
+    public ThreadPoolExecutor etaClassifyThreadPool() {
+        return new ThreadPoolExecutor(10, 20, 5, TimeUnit.SECONDS, new LinkedBlockingDeque<>(40), new ETAThreadFactory(ETAConstants.THREAD_POOL_ETA_CLASSIFY), new ThreadPoolExecutor.CallerRunsPolicy());
+    }
+
+    @Bean(name = "IndexFrameThreadPool")
+    public ThreadPoolExecutor etaIndexFrameThreadPool() {
+        return new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS, new LinkedBlockingDeque<>(1), new ETAThreadFactory(ETAConstants.THREAD_POOL_INDEX_FRAME), new ThreadPoolExecutor.CallerRunsPolicy());
+    }
 }

+ 13 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/ClassifyDTOConverter.java

@@ -0,0 +1,13 @@
+package com.qhtx.eta.domain.convert;
+
+import com.qhtx.eta.domain.api.http.response.eta.ETAClassifyData;
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+
+@Mapper
+public interface ClassifyDTOConverter {
+    ClassifyDTOConverter INSTANCE = Mappers.getMapper(ClassifyDTOConverter.class);
+
+    ClassifyMappingDTO convertDataToDTO(ETAClassifyData etaClassifyData);
+}

+ 27 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/ClassifyMappingDTOConverter.java

@@ -0,0 +1,27 @@
+package com.qhtx.eta.domain.convert;
+
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
+import com.qhtx.eta.domain.entity.DWIndexFrameDTO;
+import com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+@Mapper
+public interface ClassifyMappingDTOConverter {
+    ClassifyMappingDTOConverter INSTANCE = Mappers.getMapper(ClassifyMappingDTOConverter.class);
+
+    ClassifyMappingDTO convertEntityToDTO(ETAClassifyIndexFrameMapping etaClassifyIndexFrameMapping);
+
+    List<ClassifyMappingDTO> convertEntityToDTOList(List<ETAClassifyIndexFrameMapping> etaClassifyIndexFrameMappingList);
+
+
+    @Mapping(source = "classifyName", target = "cnName")
+    @Mapping(source = "sort", target = "sort")
+    @Mapping(source = "indexFrameId", target = "id")
+    DWIndexFrameDTO convertDTOToDWIndexFrame(ClassifyMappingDTO classifyDTO);
+
+    List<DWIndexFrameDTO> convertDTOToDWIndexFrameList(List<ClassifyMappingDTO> classifyDTO);
+}

+ 18 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/DWIndexFrameDTOConverter.java

@@ -0,0 +1,18 @@
+package com.qhtx.eta.domain.convert;
+
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
+import com.qhtx.eta.domain.entity.DWIndexFrameDTO;
+import com.qhtx.eta.infra.entity.dw.DWIndexFrame;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+@Mapper
+public interface DWIndexFrameDTOConverter {
+    DWIndexFrameDTOConverter INSTANCE = Mappers.getMapper(DWIndexFrameDTOConverter.class);
+    DWIndexFrame convertDTOToEntity(DWIndexFrameDTO dto);
+    List<DWIndexFrame> convertDTOToEntityList(List<DWIndexFrameDTO> dtoList);
+
+}

+ 18 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/ETAClassifyIndexFrameMappingConverter.java

@@ -0,0 +1,18 @@
+package com.qhtx.eta.domain.convert;
+
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
+import com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.factory.Mappers;
+
+import java.util.List;
+
+@Mapper
+public interface ETAClassifyIndexFrameMappingConverter {
+    ETAClassifyIndexFrameMappingConverter INSTANCE = Mappers.getMapper(ETAClassifyIndexFrameMappingConverter.class);
+
+    ETAClassifyIndexFrameMapping convertDataToDTO(ClassifyMappingDTO classifyMappingDTO);
+    List<ETAClassifyIndexFrameMapping> convertDataToDTOList(List<ClassifyMappingDTO> classifyMappingDTO);
+
+}

+ 2 - 2
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/EtaApiQuotaDataConverter.java

@@ -1,7 +1,7 @@
 package com.qhtx.eta.domain.convert;
 
-import com.qhtx.eta.infra.entity.EtaApiQuotaData;
-import com.qhtx.eta.infra.entity.EtaApiQuotaInfo;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaData;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaInfo;
 import com.qhtx.eta.domain.entity.QuotaDataDTO;
 import org.mapstruct.AfterMapping;
 import org.mapstruct.Mapper;

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/convert/EtaApiQuotaInfoConverter.java

@@ -1,7 +1,7 @@
 package com.qhtx.eta.domain.convert;
 
 import com.qhtx.eta.domain.entity.QuotaInfoDTO;
-import com.qhtx.eta.infra.entity.EtaApiQuotaInfo;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaInfo;
 import org.mapstruct.AfterMapping;
 import org.mapstruct.Mapper;
 import org.mapstruct.MappingTarget;

+ 14 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/entity/ClassifyMappingDTO.java

@@ -0,0 +1,14 @@
+package com.qhtx.eta.domain.entity;
+
+import lombok.Data;
+
+@Data
+public class ClassifyMappingDTO {
+    private Integer classifyId;
+    private String indexFrameId;
+    private String classifyName;
+    private String uniqueCode;
+    private Integer parentId;
+    private Integer frameLevel;
+    private Integer sort;
+}

+ 19 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/entity/DWIndexFrameDTO.java

@@ -0,0 +1,19 @@
+package com.qhtx.eta.domain.entity;
+
+import lombok.Data;
+
+@Data
+public class DWIndexFrameDTO {
+    private String id;
+    private String cnName;//中文名
+    private String enName; //英文名
+    private Integer sort;//排序
+    private String pId;//父框架id,默认为0
+    private Integer classifyId;
+    private Integer parentId;
+    private Integer hasChild;//是否有子级,0:没有,1:有
+    private Integer frameLevel;//层级
+    private String framePath;
+    private String frameIdPath;
+    private String tableCode;
+}

+ 2 - 1
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/enums/ETAInterfaceEnum.java

@@ -1,5 +1,6 @@
 package com.qhtx.eta.domain.enums;
 
+import com.qhtx.eta.domain.api.http.response.eta.ClassifyDataResponse;
 import com.qhtx.eta.domain.api.http.response.eta.ETAHttpResponse;
 import com.qhtx.eta.domain.api.http.response.eta.QuotaDataResponse;
 import com.qhtx.eta.domain.api.http.response.eta.QuotaInfoResponse;
@@ -19,7 +20,7 @@ public enum ETAInterfaceEnum {
     GET_EDB_LIST("getEdbList", "/v1/edb/list", HttpMethod.GET, "指标列表", null, true, QuotaInfoResponse.class), // 获取用户信息
     // GET_EDB_DETAIL("getEdbDetail", "/v1/edb/detail", HttpMethod.GET, "指标详情", EdbDetailProxy.class, false),
     GET_EDB_DATA("getEdbData", "/v1/edb/data", HttpMethod.GET, "指标数据", ETADataParameterProxy.class, true, QuotaDataResponse.class),
-    //GET_DATA_MANAGE_EDB_INFO_TRACE("getDataManageEdbInfoTrace", "/v1/datamanage/edb_info/trace", HttpMethod.GET, "指标详情", null, false),
+    GET_CLASSIFY_LIST("get", "/v1/edb/classify/list", HttpMethod.GET, "指标分类列表", null, true, ClassifyDataResponse.class),
     ;
 
     /**

+ 29 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/enums/ETATaskEnum.java

@@ -0,0 +1,29 @@
+package com.qhtx.eta.domain.enums;
+
+import lombok.Getter;
+
+@Getter
+public enum ETATaskEnum {
+    SYNC_ETA_INDEX_DATA("data", "syncETAData"),
+    SYNC_ETA_INDEX_INFO("info", "syncETAInfo"),
+    SYNC_INDEX_CLASSIFY_LIST("classify", "syncETAClassifyList"),
+    ;
+
+
+    private String name;
+    private String method;
+
+    ETATaskEnum(String name, String method) {
+        this.name = name;
+        this.method = method;
+    }
+
+    public static ETATaskEnum ofName(String name) {
+        for (ETATaskEnum taskEnum : ETATaskEnum.values()) {
+            if (taskEnum.getName().equals(name)) {
+                return taskEnum;
+            }
+        }
+        return null;
+    }
+}

+ 69 - 16
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/job/ETADataSyncJob.java → qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/job/ETASyncJob.java

@@ -1,13 +1,18 @@
 package com.qhtx.eta.domain.job;
 
-import com.qhtx.eta.common.utils.AssertUtils;
+import com.qhtx.eta.common.eunms.DataSourceType;
 import com.qhtx.eta.domain.config.ScheduleConfig;
 import com.qhtx.eta.domain.config.ScheduleTaskConfig;
+import com.qhtx.eta.domain.convert.ClassifyMappingDTOConverter;
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
 import com.qhtx.eta.domain.entity.QuotaDataUpdateBO;
 import com.qhtx.eta.domain.entity.QuotaInfoDTO;
 import com.qhtx.eta.domain.enums.ETADataStatus;
 import com.qhtx.eta.domain.enums.ETAInterfaceEnum;
+import com.qhtx.eta.domain.enums.ETATaskEnum;
 import com.qhtx.eta.domain.enums.ExcludedQuotaSource;
+import com.qhtx.eta.domain.service.DWIndexFrameService;
+import com.qhtx.eta.domain.service.ETAClassifyService;
 import com.qhtx.eta.domain.service.ETAQuotaService;
 import com.qhtx.eta.domain.api.ApiServiceHolder;
 import com.qhtx.eta.domain.api.http.request.ETADataHttpRequest;
@@ -15,26 +20,26 @@ import com.qhtx.eta.common.constant.ETAConstants;
 import com.qhtx.eta.domain.entity.QuotaDataDTO;
 import com.qhtx.eta.domain.task.FixedDelayTaskRegistrar;
 import com.qhtx.eta.domain.task.SchedulingRunnable;
-import com.qhtx.eta.infra.entity.EtaApiQuotaData;
+import com.qhtx.eta.infra.annotation.UseDataSource;
 import com.qhtx.eta.infra.enums.Frequency;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
-import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.stream.Collectors;
 
+
 @Component
 @Slf4j
-public class ETADataSyncJob implements CommandLineRunner {
+public class ETASyncJob implements CommandLineRunner {
 
     @Value("${eta.http.interval}")
     private int interval;
@@ -46,16 +51,33 @@ public class ETADataSyncJob implements CommandLineRunner {
 
     @Resource
     private ETAQuotaService etaQuotaService;
+    @Resource
+    private ETAClassifyService etaClassifyService;
 
     @Resource(name = "ETADataThreadPool")
     private ThreadPoolExecutor etaDataThreadPool;
-
+    @Resource(name = "IndexFrameThreadPool")
+    private ThreadPoolExecutor indexFrameThreadPool;
     @Resource
     private FixedDelayTaskRegistrar fixedDelayTaskRegistrar;
 
     @Resource
     private ScheduleTaskConfig scheduleTaskConfig;
 
+
+    @Resource
+    private DWIndexFrameService dwIndexFrameService;
+
+
+//    @Resource(name = "ETAIndexFrameThreadPool")
+//    private ThreadPoolExecutor etaIndexFrameThreadPool;
+
+    private static final Map<Integer, ETATaskEnum> taskMappingMap = new ConcurrentHashMap<>(16);
+
+    public ETATaskEnum getTaskType(int configId) {
+        return taskMappingMap.get(configId);
+    }
+
     /**
      * 同步指标信息
      */
@@ -72,6 +94,33 @@ public class ETADataSyncJob implements CommandLineRunner {
         }
     }
 
+    public void syncETAClassifyList() {
+        List<?> respList = apiServiceHolder.runApi(ETAInterfaceEnum.GET_CLASSIFY_LIST);
+        if (respList != null) {
+            List<ClassifyMappingDTO> classifyList = respList.stream().filter(item -> item instanceof ClassifyMappingDTO).map(item -> (ClassifyMappingDTO) item).collect(Collectors.toList());
+            log.info("================================ 开始同步接口指标分类列表 ================================ ");
+            log.info("================================ 接口指标分类列表数量:{}条================================ ", classifyList.size());
+            try {
+                etaClassifyService.syncClassify(classifyList);
+                // 获取信号量
+                List<ClassifyMappingDTO> processingList = etaClassifyService.getProcessingList();
+                if (!CollectionUtils.isEmpty(processingList)) {
+                    log.info("processingList size:{}", processingList.size());
+                    dwIndexFrameService.processing(ClassifyMappingDTOConverter.INSTANCE.convertDTOToDWIndexFrameList(processingList));
+                }
+                //开始获取新增和需要更新的框架数据
+
+            } catch (Exception e) {
+                e.printStackTrace();
+                log.warn("同步eta指标分类失败:{}", e.getMessage());
+            }
+            log.info("================================ 同步接口指标分类列表完成 ================================ ");
+        } else {
+            log.warn("调用接口结束,无数据同步");
+        }
+    }
+
+
     /**
      * 同步指标数据
      */
@@ -181,18 +230,22 @@ public class ETADataSyncJob implements CommandLineRunner {
         }
     }
 
-    //加载系统中的定时任务,目前只有2个就冗余写一下,后续有新任务再抽代码改造
     @Override
     public void run(String... args) {
-        ScheduleConfig dataConfig = scheduleTaskConfig.getData();
-        ScheduleConfig infoConfig = scheduleTaskConfig.getInfo();
-        if (dataConfig.getEnabled()) {
-            //同步指标数据任务
-            fixedDelayTaskRegistrar.addFixedDelayTask(new SchedulingRunnable(this.getClass().getName(), "syncETAData", this), dataConfig.getInterval(), dataConfig.getInitialDelay());
-        }
-        if (infoConfig.getEnabled()) {
-            //同步主表基本信息任务
-            fixedDelayTaskRegistrar.addFixedDelayTask(new SchedulingRunnable(this.getClass().getName(), "syncETAInfo", this), infoConfig.getInterval(), infoConfig.getInitialDelay());
+        List<ScheduleConfig> list = scheduleTaskConfig.getList();
+        if (!CollectionUtils.isEmpty(list)) {
+            for (int index = 0; index < list.size(); index++) {
+                ScheduleConfig config = list.get(index);
+                ETATaskEnum etaTaskEnum = ETATaskEnum.ofName(config.getName());
+                if (etaTaskEnum != null) {
+                    taskMappingMap.put(index, etaTaskEnum);
+                    if (config.getEnabled()) {
+                        //同步指标数据任务
+                        fixedDelayTaskRegistrar.addFixedDelayTask(new SchedulingRunnable(this.getClass().getName(), etaTaskEnum.getMethod(), this), config.getInterval(), config.getInitialDelay());
+                    }
+                }
+            }
         }
     }
+
 }

+ 13 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/DWIndexFrameService.java

@@ -0,0 +1,13 @@
+package com.qhtx.eta.domain.service;
+
+import com.qhtx.eta.domain.entity.DWIndexFrameDTO;
+
+import java.util.List;
+
+public interface DWIndexFrameService {
+    void syncIndexFrame();
+
+    String generateTableCode();
+
+    void processing(List<DWIndexFrameDTO> processList);
+}

+ 10 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/ETAClassifyService.java

@@ -0,0 +1,10 @@
+package com.qhtx.eta.domain.service;
+
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
+
+import java.util.List;
+
+public interface ETAClassifyService {
+    void syncClassify(List<ClassifyMappingDTO> classifyList);
+    List<ClassifyMappingDTO> getProcessingList();
+}

+ 190 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/impl/DWIndexFrameServiceImpl.java

@@ -0,0 +1,190 @@
+package com.qhtx.eta.domain.service.impl;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import com.alibaba.druid.util.StringUtils;
+import com.qhtx.eta.common.constant.ETAConstants;
+import com.qhtx.eta.common.eunms.ErrorEnum;
+import com.qhtx.eta.common.exception.ETAException;
+import com.qhtx.eta.domain.convert.DWIndexFrameDTOConverter;
+import com.qhtx.eta.domain.entity.DWIndexFrameDTO;
+import com.qhtx.eta.domain.service.DWIndexFrameService;
+import com.qhtx.eta.domain.utils.RedisUtils;
+import com.qhtx.eta.infra.annotation.UseDataSource;
+import com.qhtx.eta.infra.datasource.DataSourceContextHolder;
+import com.qhtx.eta.infra.entity.dw.DWIndexFrame;
+import com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping;
+import com.qhtx.eta.infra.service.EtaApiClassifyService;
+import com.qhtx.eta.infra.service.IndexFrameService;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.jetbrains.annotations.NotNull;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.support.TransactionCallbackWithoutResult;
+import org.springframework.transaction.support.TransactionTemplate;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.UUID;
+
+import com.qhtx.eta.common.eunms.DataSourceType;
+
+@Service
+@Slf4j
+@UseDataSource(dataSourceType = DataSourceType.DW)
+public class DWIndexFrameServiceImpl implements DWIndexFrameService {
+
+    @Resource
+    private RedisUtils redisUtils;
+
+    @Resource
+    private IndexFrameService indexFrameService;
+
+    @Resource
+    private TransactionTemplate transactionTemplate;
+
+    @Resource
+    private EtaApiClassifyService etaApiClassifyService;
+
+
+    @Override
+    public void syncIndexFrame() {
+
+    }
+
+    @Override
+    public String generateTableCode() throws ETAException {
+        if (!redisUtils.exist(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY)) {
+            throw new ETAException(ErrorEnum.DW_INDEX_TABLE_CODE_GET_ERROR);
+//            synchronized (this) {
+//                if (!redisUtils.exist(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY)) {
+//                    long currentTableCode = 100;
+//                    redisUtils.setNx(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY, currentTableCode, -1L, TimeUnit.SECONDS);
+//                }
+//            }
+        }
+        return ETAConstants.INDEX_FRAME_TABLE_CODE_PREFIX + String.format("%07d", redisUtils.add(ETAConstants.REDIS_INDEX_FRAME_TABLE_CODE_KEY, 1L));
+    }
+
+    @Override
+    public void processing(List<DWIndexFrameDTO> processList) {
+        DWIndexFrame hzIndexFrame = indexFrameService.getByCnName(ETAConstants.DW_INDEX_FRAME_PARENT_NAME);
+        if (hzIndexFrame == null) {
+            log.info("未找到根节点,不同步eta指标目录");
+            return;
+        }
+        hzIndexFrame.setHasChild(1);
+        FrameNode root = new FrameNode();
+        root.setId(hzIndexFrame.getId());
+        root.setName(hzIndexFrame.getCnName());
+        root.setIdPath(hzIndexFrame.getFrameIdPath());
+        root.setPath(hzIndexFrame.getFramePath());
+        root.setPId(hzIndexFrame.getPId());
+        root.setFrameLevel(hzIndexFrame.getFrameLevel());
+        root.setClassifyId(0);
+        root.setParentClassifyId(0);
+        root.setChildren(new ArrayList<>());
+        buildTree(processList, root, 1, 10);
+        //建完树开始插入数据库 ,树转List
+        List<DWIndexFrameDTO> dtoList = parseList(root);
+        log.info("开始插入数据库{}", dtoList.size());
+        for (DWIndexFrameDTO dto : dtoList) {
+            ETAClassifyIndexFrameMapping mapping = etaApiClassifyService.getByClassifyId(dto.getClassifyId());
+            if (mapping == null) {
+                log.info("未找到对应eta分类,{}:{}", dto.getCnName(), dto.getClassifyId());
+                continue;
+            }
+
+            //无法代理方法直接使用手动方法设置数据源
+            DataSourceContextHolder.setDataSourceType(DataSourceType.DW);
+            transactionTemplate.execute(new TransactionCallbackWithoutResult() {
+                @Override
+                protected void doInTransactionWithoutResult(@NotNull TransactionStatus transactionStatus) {
+                    try {
+                        //更新mapping已处理
+                        mapping.setIndexFrameId(dto.getId());
+                        etaApiClassifyService.update(mapping);
+                        indexFrameService.insertOrUpdate(DWIndexFrameDTOConverter.INSTANCE.convertDTOToEntity(dto));
+                    } catch (Exception e) {
+                        log.warn(String.format(ErrorEnum.DATASOURCE_EXECUTE_ERROR.getMsg(), e.getMessage()));
+                        throw e;
+                    }
+                }
+            });
+        }
+    }
+
+
+    private List<DWIndexFrameDTO> parseList(FrameNode node) {
+        if (node == null) {
+            return null;
+        }
+        List<DWIndexFrameDTO> result = new ArrayList<>();
+        DWIndexFrameDTO dto = new DWIndexFrameDTO();
+        dto.setTableCode(generateTableCode());
+        dto.setId(node.getId());
+        dto.setCnName(node.getName());
+        dto.setFrameLevel(node.getFrameLevel());
+        dto.setPId(node.getPId());
+        dto.setSort(node.getSort());
+        dto.setFramePath(node.getPath());
+        dto.setFrameIdPath(node.getIdPath());
+        dto.setClassifyId(node.getClassifyId());
+        dto.setParentId(node.getParentClassifyId());
+        result.add(dto);
+        if (!CollectionUtils.isEmpty(node.children)) {
+            dto.setHasChild(1);
+            for (FrameNode subNode : node.children) {
+                result.addAll(parseList(subNode));
+            }
+        } else {
+            dto.setHasChild(0);
+        }
+        return result;
+    }
+
+    private void buildTree(List<DWIndexFrameDTO> list, FrameNode node, int current, int depth) {
+        if (current > depth) {
+            return;
+        }
+        for (DWIndexFrameDTO dto : list) {
+            if (Objects.equals(dto.getParentId(), node.getClassifyId())) {
+                String path = StringUtils.isEmpty(node.getPath().trim()) ? dto.getCnName() : node.getPath() + "|" + dto.getCnName();
+                String id = (dto.getId() == null || dto.getId().trim().isEmpty()) ? UUID.randomUUID().toString().replaceAll("-", "") : dto.getId();
+                String idPath = StringUtils.isEmpty(node.getPath().trim()) ? id : node.getIdPath() + "|" + id;
+                FrameNode temp = new FrameNode();
+                temp.setId(id);
+                temp.setClassifyId(dto.getClassifyId());
+                temp.setParentClassifyId(dto.getParentId());
+                temp.setIdPath(idPath);
+                temp.setClassifyId(dto.getClassifyId());
+                temp.setFrameLevel(node.getFrameLevel() + 1);
+                temp.setParentClassifyId(dto.getParentId());
+                temp.setName(dto.getCnName());
+                temp.setPId(node.getId());
+                temp.setPath(path);
+                temp.setSort(dto.getSort());
+                temp.setChildren(new ArrayList<>());
+                node.getChildren().add(temp);
+                buildTree(list, temp, current + 1, depth);
+            }
+        }
+    }
+
+    @Data
+    private static class FrameNode {
+        private int frameLevel;
+        private String pId;
+        private String id;
+        private String path;
+        private String idPath;
+        private String name;
+        private Integer classifyId;
+        private Integer parentClassifyId;
+        private Integer sort;
+        private List<FrameNode> children;
+    }
+}

+ 33 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/impl/ETAClassifyServiceImpl.java

@@ -0,0 +1,33 @@
+package com.qhtx.eta.domain.service.impl;
+
+import com.qhtx.eta.domain.convert.ClassifyMappingDTOConverter;
+import com.qhtx.eta.domain.convert.ETAClassifyIndexFrameMappingConverter;
+import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
+import com.qhtx.eta.domain.service.ETAClassifyService;
+import com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping;
+import com.qhtx.eta.infra.service.EtaApiClassifyService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Slf4j
+@Service
+public class ETAClassifyServiceImpl implements ETAClassifyService {
+    @Resource
+    private EtaApiClassifyService etaApiClassifyService;
+
+    @Override
+    public void syncClassify(List<ClassifyMappingDTO> classifyList) {
+        etaApiClassifyService.batchInsertOrUpdate(ETAClassifyIndexFrameMappingConverter.INSTANCE.convertDataToDTOList(classifyList));
+    }
+
+    @Override
+    public List<ClassifyMappingDTO> getProcessingList() {
+        List<ETAClassifyIndexFrameMapping> mappingList = etaApiClassifyService.getProcessingList();
+        return ClassifyMappingDTOConverter.INSTANCE.convertEntityToDTOList(mappingList);
+    }
+}
+
+

+ 2 - 3
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/service/impl/ETAQuotaServiceImpl.java

@@ -11,8 +11,8 @@ import com.qhtx.eta.domain.service.ETAQuotaService;
 import com.qhtx.eta.common.config.DataSourceProperties;
 import com.qhtx.eta.common.constant.ETAConstants;
 import com.qhtx.eta.common.exception.ETAException;
-import com.qhtx.eta.infra.entity.EtaApiQuotaData;
-import com.qhtx.eta.infra.entity.EtaApiQuotaInfo;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaData;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaInfo;
 import com.qhtx.eta.infra.service.EtaApiQuotaDataService;
 import com.qhtx.eta.infra.service.EtaApiQuotaInfoService;
 import com.qhtx.eta.infra.service.OdsDimService;
@@ -57,7 +57,6 @@ public class ETAQuotaServiceImpl implements ETAQuotaService {
         CompletableFuture.allOf(futures.toArray(new CompletableFuture[size])).join();
     }
 
-
     @Override
     public void syncData(List<QuotaDataDTO> quotaDataList) {
         List<EtaApiQuotaData> dataList = EtaApiQuotaDataConverter.INSTANCE.convertEntityToBoList(quotaDataList);

+ 47 - 48
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/task/TaskConfigChangeListener.java

@@ -6,9 +6,11 @@ import com.alibaba.nacos.api.config.ConfigChangeEvent;
 import com.alibaba.nacos.api.config.ConfigChangeItem;
 import com.alibaba.nacos.api.exception.NacosException;
 import com.alibaba.nacos.client.config.listener.impl.AbstractConfigChangeListener;
+import com.qhtx.eta.common.utils.SpringApplicationUtils;
 import com.qhtx.eta.domain.config.ScheduleConfig;
 import com.qhtx.eta.domain.config.ScheduleTaskConfig;
-import com.qhtx.eta.domain.job.ETADataSyncJob;
+import com.qhtx.eta.domain.enums.ETATaskEnum;
+import com.qhtx.eta.domain.job.ETASyncJob;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
@@ -31,7 +33,9 @@ public class TaskConfigChangeListener extends AbstractConfigChangeListener {
     private NacosConfigProperties nacosConfigProperties;
 
     @Resource
-    private ETADataSyncJob etadataSyncJob;
+    SpringApplicationUtils SpringApplicationUtils;
+    @Resource
+    private ETASyncJob etadataSyncJob;
 
     @Resource
     private FixedDelayTaskRegistrar fixedDelayTaskRegistrar;
@@ -46,56 +50,51 @@ public class TaskConfigChangeListener extends AbstractConfigChangeListener {
         nacosConfigManager.getConfigService().addListener(dataId, "DATABASE_GROUP", this);
     }
 
-    @Override
-    public void receiveConfigChange(ConfigChangeEvent configChangeEvent) {
-        Map<String, List<ConfigChangeItem>> taskMap = configChangeEvent.getChangeItems().stream().filter(changeItem -> changeItem.getKey().contains("eta.scheduled")).collect(Collectors.groupingBy(changeItem -> {
-            if (changeItem.getKey().startsWith("eta.scheduled.info")) return "info";
-            else if (changeItem.getKey().startsWith("eta.scheduled.data")) return "data";
-            return "other";
-        }));
-        List<ConfigChangeItem> infoTaskList = taskMap.get("info");
-        List<ConfigChangeItem> dataTaskList = taskMap.get("data");
-        if (!CollectionUtils.isEmpty(infoTaskList)) {
-            ScheduleConfig scheduleConfig = scheduleTaskConfig.getInfo();
-            infoTaskList.forEach(changeItem -> {
-                if (changeItem.getKey().endsWith("interval")) {
-                    scheduleConfig.setInterval(Integer.valueOf(changeItem.getNewValue()));
-                }
-                if (changeItem.getKey().endsWith("initialDelay")) {
-                    scheduleConfig.setInitialDelay(Integer.valueOf(changeItem.getNewValue()));
-                }
-                if (changeItem.getKey().endsWith("enabled")) {
-                    scheduleConfig.setEnabled(Boolean.valueOf(changeItem.getNewValue()));
-                }
-            });
-            if (scheduleConfig.getEnabled()) {
-                fixedDelayTaskRegistrar.removeFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), "syncETAInfo", etadataSyncJob));
-                fixedDelayTaskRegistrar.addFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), "syncETAInfo", etadataSyncJob), scheduleConfig.getInterval(), scheduleConfig.getInitialDelay());
-            } else {
-                fixedDelayTaskRegistrar.removeFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), "syncETAInfo", etadataSyncJob));
+    private void resetScheduleTask(ConfigChangeEvent configChangeEvent) {
+        Map<Integer, List<ConfigChangeItem>> taskMap = configChangeEvent.getChangeItems().stream().filter(changeItem -> changeItem.getKey().contains("eta.scheduled.list")).collect(Collectors.groupingBy(changeItem -> {
+            String indexStr = changeItem.getKey().substring(changeItem.getKey().indexOf("[") + 1, changeItem.getKey().indexOf("]"));
+            try {
+                return Integer.parseInt(indexStr);
+            } catch (NumberFormatException e) {
+                log.warn("获取任务编号失败,{}", e.getMessage());
+                return -1;
             }
-        }
-        if (!CollectionUtils.isEmpty(dataTaskList)) {
-            ScheduleConfig scheduleConfig = scheduleTaskConfig.getData();
-            dataTaskList.forEach(changeItem -> {
-                if (changeItem.getKey().endsWith("interval")) {
-                    scheduleConfig.setInterval(Integer.valueOf(changeItem.getNewValue()));
-                }
-                if (changeItem.getKey().endsWith("initialDelay")) {
-                    scheduleConfig.setInitialDelay(Integer.valueOf(changeItem.getNewValue()));
-                }
-                if (changeItem.getKey().endsWith("enabled")) {
-                    scheduleConfig.setEnabled(Boolean.valueOf(changeItem.getNewValue()));
+        }));
+        //重置无效的编号
+        taskMap.keySet().removeIf(key -> key < 0 || key >= scheduleTaskConfig.getList().size());
+        taskMap.forEach((key, taskConfList) -> {
+            if (!CollectionUtils.isEmpty(taskConfList)) {
+                ScheduleConfig scheduleConfig = scheduleTaskConfig.getList().get(key);
+                ETATaskEnum etaTaskEnum = etadataSyncJob.getTaskType(key);
+                taskConfList.forEach(changeItem -> {
+                    if (changeItem.getKey().endsWith("interval")) {
+                        scheduleConfig.setInterval(Integer.valueOf(changeItem.getNewValue()));
+                    }
+                    if (changeItem.getKey().endsWith("initialDelay")) {
+                        scheduleConfig.setInitialDelay(Integer.valueOf(changeItem.getNewValue()));
+                    }
+                    if (changeItem.getKey().endsWith("enabled")) {
+                        scheduleConfig.setEnabled(Boolean.valueOf(changeItem.getNewValue()));
+                    }
+                });
+                if (scheduleConfig.getEnabled()) {
+                    fixedDelayTaskRegistrar.removeFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), etaTaskEnum.getMethod(), etadataSyncJob));
+                    fixedDelayTaskRegistrar.addFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), etaTaskEnum.getMethod(), etadataSyncJob), scheduleConfig.getInterval(), scheduleConfig.getInitialDelay());
+                } else {
+                    fixedDelayTaskRegistrar.removeFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), etaTaskEnum.getMethod(), etadataSyncJob));
                 }
-            });
-            if (scheduleConfig.getEnabled()) {
-                fixedDelayTaskRegistrar.removeFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), "syncETAData", etadataSyncJob));
-                fixedDelayTaskRegistrar.addFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), "syncETAData", etadataSyncJob), scheduleConfig.getInterval(), scheduleConfig.getInitialDelay());
-            } else {
-                fixedDelayTaskRegistrar.removeFixedDelayTask(new SchedulingRunnable(etadataSyncJob.getClass().getName(), "syncETAData", etadataSyncJob));
             }
-        }
+        });
+    }
 
+    @Override
+    public void receiveConfigChange(ConfigChangeEvent configChangeEvent) {
+        //            System.out.println(changeItem.getKey());
+        //            if (changeItem.getKey().startsWith("eta.scheduled.info")) return "info";
+        //            else if (changeItem.getKey().startsWith("eta.scheduled.list")) return "data";
+        //任务相关的操作需要重置任务
+        resetScheduleTask(configChangeEvent);
     }
+
 }
 

+ 103 - 0
qhtx-eta-integrator/qhtx-integrator-domain/src/main/java/com/qhtx/eta/domain/utils/RedisUtils.java

@@ -0,0 +1,103 @@
+package com.qhtx.eta.domain.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+@Component
+@Slf4j
+public class RedisUtils {
+    @Resource
+    private RedisTemplate redisTemplate;
+
+    private static final String CACHE_KEY_SEPARATOR = ".";
+
+    /**
+     * 构建缓存key
+     */
+    public String buildKey(String... strObjs) {
+        return Stream.of(strObjs).collect(Collectors.joining(CACHE_KEY_SEPARATOR));
+    }
+
+    /**
+     * 是否存在key
+     */
+    public boolean exist(String key) {
+        return redisTemplate.hasKey(key);
+    }
+
+    /**
+     * 删除key
+     */
+    public boolean del(String key) {
+        return redisTemplate.delete(key);
+    }
+
+    /**
+     * set(不带过期)
+     */
+    public void set(String key, String value) {
+        redisTemplate.opsForValue().set(key, value);
+    }
+
+    /**
+     * set(带过期)
+     */
+    public boolean setNx(String key, Object value, Long time, TimeUnit timeUnit) {
+        return redisTemplate.opsForValue().setIfAbsent(key, value, time, timeUnit);
+    }
+
+    /**
+     * 获取string类型缓存
+     */
+    public String get(String key) {
+        return (String) redisTemplate.opsForValue().get(key);
+    }
+
+    public Boolean zAdd(String key, String value, Long score) {
+        return redisTemplate.opsForZSet().add(key, value, Double.valueOf(String.valueOf(score)));
+    }
+
+    public Long countZset(String key) {
+        return redisTemplate.opsForZSet().size(key);
+    }
+
+    public Set<String> rangeZset(String key, long start, long end) {
+        return redisTemplate.opsForZSet().range(key, start, end);
+    }
+
+    public Long removeZset(String key, Object value) {
+        return redisTemplate.opsForZSet().remove(key, value);
+    }
+
+    public void removeZsetList(String key, Set<String> value) {
+        value.stream().forEach((val) -> redisTemplate.opsForZSet().remove(key, val));
+    }
+
+    public Double score(String key, Object value) {
+        return redisTemplate.opsForZSet().score(key, value);
+    }
+
+    public Set<String> rangeByScore(String key, long start, long end) {
+        return redisTemplate.opsForZSet().rangeByScore(key, Double.valueOf(String.valueOf(start)), Double.valueOf(String.valueOf(end)));
+    }
+
+    public Object addScore(String key, Object obj, double score) {
+        return redisTemplate.opsForZSet().incrementScore(key, obj, score);
+    }
+
+    public long add(String key, Long num) {
+        return redisTemplate.opsForValue().increment(key, num);
+    }
+
+    public Object rank(String key, Object obj) {
+        return redisTemplate.opsForZSet().rank(key, obj);
+    }
+
+}

+ 24 - 11
qhtx-eta-integrator/qhtx-integrator-infra/pom.xml

@@ -45,26 +45,39 @@
             <version>${project.version}</version>
         </dependency>
 
-        <!-- Spring Boot Starter for Apache Kafka -->
-        <dependency>
-            <groupId>org.springframework.kafka</groupId>
-            <artifactId>spring-kafka</artifactId>
-            <version>${kafka.version}</version>
-        </dependency>
+<!--        &lt;!&ndash; Spring Boot Starter for Apache Kafka &ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.kafka</groupId>-->
+<!--            <artifactId>spring-kafka</artifactId>-->
+<!--            <version>${kafka.version}</version>-->
+<!--        </dependency>-->
         <dependency>
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-bootstrap</artifactId>
         </dependency>
 
-        <!--kafka-->
+<!--        &lt;!&ndash;kafka&ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.kafka</groupId>-->
+<!--            <artifactId>spring-kafka</artifactId>-->
+<!--        </dependency>-->
         <dependency>
-            <groupId>org.springframework.kafka</groupId>
-            <artifactId>spring-kafka</artifactId>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>com.alibaba.cloud</groupId>
-            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.13.2</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <version>2.4.2</version>
+            <scope>test</scope>
         </dependency>
 
     </dependencies>

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/annotation/UseDataSource.java

@@ -6,7 +6,7 @@ import java.lang.annotation.*;
 
 @Documented
 @Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
+@Target({ElementType.TYPE, ElementType.METHOD})
 public @interface UseDataSource {
     DataSourceType dataSourceType() default DataSourceType.ODS;
 }

+ 2 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/aspect/DataSourceSwitchAspect.java

@@ -29,7 +29,8 @@ public class DataSourceSwitchAspect {
 
         try {
             // 执行目标方法
-            return joinPoint.proceed();
+            Object obj = joinPoint.proceed();
+            return obj;
         } finally {
             // 清理ThreadLocal中的数据源信息
             DataSourceContextHolder.clearDataSourceType();

+ 0 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/datasource/DynamicDataSource.java

@@ -5,7 +5,6 @@ import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
 public class DynamicDataSource extends AbstractRoutingDataSource {
     @Override
     protected Object determineCurrentLookupKey() {
-
         return DataSourceContextHolder.getDataSourceType();
     }
 }

+ 30 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/dw/DWIndexFrame.java

@@ -0,0 +1,30 @@
+package com.qhtx.eta.infra.entity.dw;
+
+import com.qhtx.eta.common.constant.ETAConstants;
+import lombok.Data;
+
+@Data
+public class DWIndexFrame {
+    String id;
+    String cnName;//中文名
+    String enName; //英文名
+    String cnDescription; //中文描述
+    String enDescription;//英文描述
+    Integer sort;//排序
+    String pId;//父框架id,默认为0
+    Integer hasChild;//是否有子级,0:没有,1:有
+    Integer frameLevel;//层级
+    String framePath;//上层框架路径
+    String frameIdPath;//上层框架id路径
+    Integer isDelete = 0;//是否删除,0:否,1:是
+    Integer isEnable = 1;//是否启用:0:否,1:是
+    Integer createUserId = ETAConstants.INDEX_FRAME_CREATE_UPDATE_USER_ID;//创建人id
+    String createUserName = ETAConstants.INDEX_FRAME_CREATE_UPDATE_USER_NAME;//创建人姓名
+    Integer updateUserId = ETAConstants.INDEX_FRAME_CREATE_UPDATE_USER_ID;//更新人id
+    String updateUserName = ETAConstants.INDEX_FRAME_CREATE_UPDATE_USER_NAME;//更新人名称
+    String tableCode;//维表框架唯一code
+    Long createTime = System.currentTimeMillis();
+    Long updateTime = System.currentTimeMillis();
+    Integer indexNum = 0;
+    Integer enableIndexNum = 0;
+}

+ 18 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/dw/ETAClassifyIndexFrameMapping.java

@@ -0,0 +1,18 @@
+package com.qhtx.eta.infra.entity.dw;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class ETAClassifyIndexFrameMapping {
+    private Integer id;
+    private Integer classifyId;
+    private String indexFrameId;
+    private String classifyName;
+    private String uniqueCode;
+    private Integer sort;
+    private Integer frameLevel;
+    private Integer parentId;
+    private Date createTime = new Date();
+}

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/EtaApiQuotaData.java → qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/ods/EtaApiQuotaData.java

@@ -1,4 +1,4 @@
-package com.qhtx.eta.infra.entity;
+package com.qhtx.eta.infra.entity.ods;
 
 import lombok.Data;
 import org.apache.commons.collections4.splitmap.AbstractIterableGetMapDecorator;

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/EtaApiQuotaInfo.java → qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/entity/ods/EtaApiQuotaInfo.java

@@ -1,4 +1,4 @@
-package com.qhtx.eta.infra.entity;
+package com.qhtx.eta.infra.entity.ods;
 
 import lombok.Data;
 import lombok.Getter;

+ 5 - 3
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/enums/Frequency.java

@@ -4,10 +4,12 @@ import lombok.Getter;
 
 @Getter
 public enum Frequency {
-    DAILY(1, "日度"), WEEKLY(2, "周度"), MONTHLY(3, "月度"), QUARTERLY(6, "季度"), DECADELY(7, "旬度"),
-
+    DAILY(1, "日度"),
+    WEEKLY(2, "周度"),
+    MONTHLY(3, "月度"),
+    QUARTERLY(6, "季度"),
+    DECADELY(7, "旬度"),
     YEARLY(4, "年度"),
-
     SEMI_ANNUAL(5, "半年度"),
     ;
 

+ 17 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/DWIndexFrameDao.java

@@ -0,0 +1,17 @@
+package com.qhtx.eta.infra.mapper;
+
+import com.qhtx.eta.infra.entity.dw.DWIndexFrame;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface DWIndexFrameDao {
+
+    //批量更新或者插入
+    void insertOrUpdate(@Param("item") DWIndexFrame dwIndexFrame);
+
+
+    long getMaxTableCode();
+
+    DWIndexFrame getByCnName(String cnName);
+}

+ 18 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/ETAClassifyIndexFrameMappingDao.java

@@ -0,0 +1,18 @@
+package com.qhtx.eta.infra.mapper;
+
+import com.qhtx.eta.infra.annotation.UseDataSource;
+import com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ETAClassifyIndexFrameMappingDao {
+    void insertOrUpdateBatch(@Param("entities") List<ETAClassifyIndexFrameMapping> list);
+
+    List<ETAClassifyIndexFrameMapping> getClassifyMappingList();
+
+    ETAClassifyIndexFrameMapping getByClassifyId(int id);
+
+
+    void update(@Param("entity") ETAClassifyIndexFrameMapping etaClassifyIndexFrameMapping);
+}

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/EtaApiQuotaDataDao.java

@@ -1,6 +1,6 @@
 package com.qhtx.eta.infra.mapper;
 
-import com.qhtx.eta.infra.entity.EtaApiQuotaData;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaData;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/mapper/EtaApiQuotaInfoDao.java

@@ -1,6 +1,6 @@
 package com.qhtx.eta.infra.mapper;
 
-import com.qhtx.eta.infra.entity.EtaApiQuotaInfo;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaInfo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;

+ 16 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/EtaApiClassifyService.java

@@ -0,0 +1,16 @@
+package com.qhtx.eta.infra.service;
+
+import com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping;
+
+import java.util.List;
+
+public interface EtaApiClassifyService {
+    void batchInsertOrUpdate(List<ETAClassifyIndexFrameMapping> etaClassifyIndexFrameMapping);
+
+    List<ETAClassifyIndexFrameMapping> getProcessingList();
+
+    ETAClassifyIndexFrameMapping getByClassifyId(int id);
+
+    void update(ETAClassifyIndexFrameMapping etaClassifyIndexFrameMapping);
+
+}

+ 1 - 3
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/EtaApiQuotaDataService.java

@@ -1,8 +1,6 @@
 package com.qhtx.eta.infra.service;
 
-import com.qhtx.eta.common.eunms.DataSourceType;
-import com.qhtx.eta.infra.annotation.UseDataSource;
-import com.qhtx.eta.infra.entity.EtaApiQuotaData;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaData;
 
 import java.util.List;
 

+ 1 - 3
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/EtaApiQuotaInfoService.java

@@ -1,8 +1,6 @@
 package com.qhtx.eta.infra.service;
 
-import com.qhtx.eta.common.eunms.DataSourceType;
-import com.qhtx.eta.infra.annotation.UseDataSource;
-import com.qhtx.eta.infra.entity.EtaApiQuotaInfo;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaInfo;
 
 import java.util.List;
 

+ 15 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/IndexFrameService.java

@@ -0,0 +1,15 @@
+package com.qhtx.eta.infra.service;
+
+import com.qhtx.eta.infra.entity.dw.DWIndexFrame;
+
+import java.util.List;
+
+public interface IndexFrameService {
+
+    long getMaxTableCode();
+
+    DWIndexFrame getByCnName(String cnName);
+
+
+    void insertOrUpdate(DWIndexFrame dwIndexFrame);
+}

+ 0 - 2
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/OdsDimService.java

@@ -1,7 +1,5 @@
 package com.qhtx.eta.infra.service;
 
-import com.qhtx.eta.common.eunms.DataSourceType;
-import com.qhtx.eta.infra.annotation.UseDataSource;
 
 public interface OdsDimService {
     void odsDimDataUpdate(String tableName, Long minOperationTime, Integer sourceType);

+ 43 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/EtaApiClassifyServiceImpl.java

@@ -0,0 +1,43 @@
+package com.qhtx.eta.infra.service.impl;
+
+import com.qhtx.eta.common.eunms.DataSourceType;
+import com.qhtx.eta.infra.annotation.UseDataSource;
+import com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping;
+import com.qhtx.eta.infra.mapper.ETAClassifyIndexFrameMappingDao;
+import com.qhtx.eta.infra.service.EtaApiClassifyService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@UseDataSource(dataSourceType = DataSourceType.DW)
+@Service("etaApiClassifyService")
+@Slf4j
+public class EtaApiClassifyServiceImpl implements EtaApiClassifyService {
+
+    @Resource
+    private ETAClassifyIndexFrameMappingDao etaClassifyIndexFrameMappingDao;
+
+    @Override
+    public void batchInsertOrUpdate(List<ETAClassifyIndexFrameMapping> etaClassifyIndexFrameMapping) {
+        etaClassifyIndexFrameMappingDao.insertOrUpdateBatch(etaClassifyIndexFrameMapping);
+    }
+
+    @Override
+    public List<ETAClassifyIndexFrameMapping> getProcessingList() {
+        return etaClassifyIndexFrameMappingDao.getClassifyMappingList();
+    }
+
+    @Override
+    public ETAClassifyIndexFrameMapping getByClassifyId(int id) {
+        return etaClassifyIndexFrameMappingDao.getByClassifyId(id);
+    }
+
+    @Override
+    @Transactional
+    public void update(ETAClassifyIndexFrameMapping etaClassifyIndexFrameMapping) {
+        etaClassifyIndexFrameMappingDao.update(etaClassifyIndexFrameMapping);
+    }
+}

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/EtaApiQuotaDataServiceImpl.java

@@ -2,7 +2,7 @@ package com.qhtx.eta.infra.service.impl;
 
 import com.qhtx.eta.common.annotation.DataOperator;
 import com.qhtx.eta.infra.annotation.UseDataSource;
-import com.qhtx.eta.infra.entity.EtaApiQuotaData;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaData;
 import com.qhtx.eta.infra.mapper.EtaApiQuotaDataDao;
 import com.qhtx.eta.infra.service.EtaApiQuotaDataService;
 import com.qhtx.eta.common.eunms.DataSourceType;

+ 3 - 2
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/EtaApiQuotaInfoServiceImpl.java

@@ -4,7 +4,7 @@ import com.qhtx.eta.common.annotation.DataOperator;
 import com.qhtx.eta.common.eunms.DataSourceType;
 import com.qhtx.eta.common.eunms.ErrorEnum;
 import com.qhtx.eta.infra.annotation.UseDataSource;
-import com.qhtx.eta.infra.entity.EtaApiQuotaInfo;
+import com.qhtx.eta.infra.entity.ods.EtaApiQuotaInfo;
 import com.qhtx.eta.common.eunms.ETAApiType;
 import com.qhtx.eta.infra.mapper.EtaApiQuotaInfoDao;
 import com.qhtx.eta.infra.service.EtaApiQuotaInfoService;
@@ -85,11 +85,12 @@ public class EtaApiQuotaInfoServiceImpl implements EtaApiQuotaInfoService {
     public void batchInsertOrUpdate(List<EtaApiQuotaInfo> quotaInfoDTOS) {
         transactionTemplate.execute(new TransactionCallbackWithoutResult() {
             @Override
-            protected void doInTransactionWithoutResult(@NotNull TransactionStatus transactionStatus) {
+            public void doInTransactionWithoutResult(@NotNull TransactionStatus transactionStatus) {
                 try {
                     etaApiQuotaInfoDao.insertOrUpdateBatch(quotaInfoDTOS);
                 } catch (Exception e) {
                     log.warn(String.format(ErrorEnum.DATASOURCE_EXECUTE_ERROR.getMsg(), e.getMessage()));
+                    throw e;
                 }
 
             }

+ 43 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/service/impl/IndexFrameServiceImpl.java

@@ -0,0 +1,43 @@
+package com.qhtx.eta.infra.service.impl;
+
+import com.qhtx.eta.common.eunms.DataSourceType;
+import com.qhtx.eta.common.eunms.ErrorEnum;
+import com.qhtx.eta.infra.annotation.UseDataSource;
+import com.qhtx.eta.infra.entity.dw.DWIndexFrame;
+import com.qhtx.eta.infra.mapper.DWIndexFrameDao;
+import com.qhtx.eta.infra.service.EtaApiClassifyService;
+import com.qhtx.eta.infra.service.IndexFrameService;
+import lombok.extern.slf4j.Slf4j;
+import org.jetbrains.annotations.NotNull;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.support.TransactionCallbackWithoutResult;
+import org.springframework.transaction.support.TransactionTemplate;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service("indexFrameService")
+@UseDataSource(dataSourceType = DataSourceType.DW)
+@Slf4j
+public class IndexFrameServiceImpl implements IndexFrameService {
+    @Resource
+    private DWIndexFrameDao dwIndexFrameDao;
+
+
+    @Override
+    public long getMaxTableCode() {
+        return dwIndexFrameDao.getMaxTableCode();
+    }
+
+    @Override
+    public DWIndexFrame getByCnName(String cnName) {
+        return dwIndexFrameDao.getByCnName(cnName);
+    }
+
+
+    @Override
+    public void insertOrUpdate(DWIndexFrame dwIndexFrame) {
+        dwIndexFrameDao.insertOrUpdate(dwIndexFrame);
+    }
+}

+ 10 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/java/com/qhtx/eta/infra/utils/DruidEncryptUtil.java

@@ -37,6 +37,16 @@ public class DruidEncryptUtil {
     public static String decrypt(String publicKey, String encryptText) throws Exception {
         return ConfigTools.decrypt(publicKey, encryptText);
     }
+
+    public static void main(String[] args) throws Exception {
+        String privateKey = "MIIBVgIBADANBgkqhkiG9w0BAQEFAASCAUAwggE8AgEAAkEAjClbCy9kHZtlJK4XOO/kYT6ylB2d3mxbZsOOcYz2HDxl/WRe447ZOG6iReCvSIeNBTlYduuRx59Ry8mZD00snQIDAQABAkAXY/tupW0Gx90cPvVfKiGp3OW+dCbZbKngP3hxGL4lvem8eya45/O+yT0aD2uJ4ol4cV8BSTg3zzP76uu76dVBAiEA7mDHxT4hYQLoUHYwLyckqaIq2CYr1UT3c6mChDggGu0CIQCWhdzq0dCDB3XkAMjgWTusbaPlcNWcI1tbE5SW5HsycQIhAIAwhV15ouOTd7DFTfYde6bJcXbZWBsRQmztjCVkNUelAiEAk85LCoKRP7k5uHRUzIiTIlRfVlQgTbwiXyKxDCK8HuECIQDYpOmiX0KOjRTPVHaFUlEtP+qZ4b37GLlcUCEGXEnIsQ==";
+        String encrypt = encrypt(privateKey, "Qhtx04291558");
+        String publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAIwpWwsvZB2bZSSuFzjv5GE+spQdnd5sW2bDjnGM9hw8Zf1kXuOO2ThuokXgr0iHjQU5WHbrkcefUcvJmQ9NLJ0CAwEAAQ==";
+        System.out.println("encrypt:" + encrypt);
+        String decrypt = decrypt(publicKey, "EHJ8+uBSlUzU48DsV0GLVljzARFG1Ek/pbNb/ki6gV1fWvtFs+JN7d5CnWaiEzZuc5sNFzAQvKB7oKhSBSBBxw==");
+        System.out.println("decrypt:" + decrypt);
+    }
 }
 
 
+

+ 69 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/DWIndexFrameDao.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.qhtx.eta.infra.mapper.DWIndexFrameDao">
+
+    <resultMap type="com.qhtx.eta.infra.entity.dw.DWIndexFrame" id="DWIndexFrameDataMap">
+        <result property="id" column="ID" jdbcType="VARCHAR"/>
+        <result property="cnName" column="CN_NAME" jdbcType="VARCHAR"/>
+        <result property="pId" column="PID" jdbcType="VARCHAR"/>
+        <result property="framePath" column="FRAME_PATH" jdbcType="VARCHAR"/>
+        <result property="frameIdPath" column="FRAME_ID_PATH" jdbcType="VARCHAR"/>
+        <result property="isEnable" column="IS_ENABLE" jdbcType="INTEGER"/>
+        <result property="frameLevel" column="FRAME_LEVEL" jdbcType="INTEGER"/>
+    </resultMap>
+    <select id="getMaxTableCode" resultType="string">
+        select TABLE_CODE
+        FROM (SELECT TABLE_CODE
+              FROM T_DAMP_DW_INDEX_FRAME
+              ORDER BY TABLE_CODE desc)
+        where ROWNUM =1
+    </select>
+
+    <select id="getByCnName" resultMap="DWIndexFrameDataMap">
+        SELECT ID,CN_NAME,PID,FRAME_PATH,FRAME_ID_PATH,IS_ENABLE,FRAME_LEVEL FROM T_DAMP_DW_INDEX_FRAME WHERE CN_NAME = #{cnName}
+    </select>
+
+    <update  id="insertOrUpdate"  keyProperty="id" useGeneratedKeys="false">
+        MERGE INTO
+        T_DAMP_DW_INDEX_FRAME t
+        USING (
+            SELECT   #{item.id,jdbcType=VARCHAR} AS ID,
+        #{item.cnName,jdbcType=VARCHAR} AS CN_NAME,
+        #{item.enName,jdbcType=VARCHAR} AS EN_NAME,
+        #{item.cnDescription,jdbcType=VARCHAR} AS CN_DESCRIPTION,
+        #{item.enDescription,jdbcType=VARCHAR} AS EN_DESCRIPTION,
+        #{item.sort,jdbcType=INTEGER} AS SORT,
+        #{item.pId,jdbcType=VARCHAR} AS PID,
+        #{item.hasChild,jdbcType=INTEGER} AS HAS_CHILD,
+        #{item.frameLevel,jdbcType=INTEGER} AS FRAME_LEVEL,
+        #{item.framePath,jdbcType=VARCHAR} AS FRAME_PATH,
+        #{item.frameIdPath,jdbcType=VARCHAR} AS FRAME_ID_PATH,
+        #{item.isDelete,jdbcType=INTEGER} AS IS_DELETE,
+        #{item.isEnable,jdbcType=INTEGER} AS IS_ENABLE,
+        #{item.createTime,jdbcType=INTEGER} AS CREATE_TIME,
+        #{item.updateTime,jdbcType=INTEGER} AS UPDATE_TIME,
+        #{item.createUserId,jdbcType=INTEGER} AS CREATE_USER_ID,
+        #{item.createUserName,jdbcType=VARCHAR} AS CREATE_USER_NAME,
+        #{item.updateUserId,jdbcType=INTEGER} AS UPDATE_USER_ID,
+        #{item.updateUserName,jdbcType=VARCHAR} AS UPDATE_USER_NAME,
+        #{item.tableCode,jdbcType=VARCHAR} AS TABLE_CODE,
+        #{item.indexNum,jdbcType=INTEGER} AS INDEX_NUM,
+        #{item.enableIndexNum,jdbcType=INTEGER} AS ENABLE_INDEX_NUM
+            FROM dual
+        ) s ON (t.id = s.id)
+        WHEN MATCHED THEN
+        UPDATE SET
+            t.CN_NAME = s.CN_NAME,
+            t.SORT = s.SORT,
+            t.PID = s.PID,
+            t.HAS_CHILD = s.HAS_CHILD,
+            t.FRAME_LEVEL = s.FRAME_LEVEL,
+            t.FRAME_PATH = s.FRAME_PATH,
+            t.FRAME_ID_PATH = s.FRAME_ID_PATH
+        WHEN NOT MATCHED THEN
+        INSERT
+        (ID, CN_NAME, EN_NAME, CN_DESCRIPTION, EN_DESCRIPTION, SORT, PID, HAS_CHILD, FRAME_LEVEL, FRAME_PATH, FRAME_ID_PATH, IS_DELETE, IS_ENABLE, CREATE_TIME, UPDATE_TIME, CREATE_USER_ID, CREATE_USER_NAME, UPDATE_USER_ID, UPDATE_USER_NAME, TABLE_CODE, INDEX_NUM, ENABLE_INDEX_NUM)
+        VALUES
+            (s.ID, s.CN_NAME, s.EN_NAME, s.CN_DESCRIPTION, s.EN_DESCRIPTION, s.SORT, s.PID, s.HAS_CHILD, s.FRAME_LEVEL, s.FRAME_PATH, s.FRAME_ID_PATH, s.IS_DELETE, s.IS_ENABLE, s.CREATE_TIME, s.UPDATE_TIME, s.CREATE_USER_ID, s.CREATE_USER_NAME, s.UPDATE_USER_ID, s.UPDATE_USER_NAME, s.TABLE_CODE, s.INDEX_NUM, s.ENABLE_INDEX_NUM)
+    </update>
+</mapper>

+ 64 - 0
qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/ETAClassifyIndexFrameMappingDao.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.qhtx.eta.infra.mapper.ETAClassifyIndexFrameMappingDao">
+    <resultMap type="com.qhtx.eta.infra.entity.dw.ETAClassifyIndexFrameMapping" id="EtaClassifyIndexFrameMappingMap">
+        <id property="id" column="ID" jdbcType="INTEGER"/>
+        <result property="classifyId" column="CLASSIFY_ID" jdbcType="INTEGER"/>
+        <result property="indexFrameId" column="INDEX_FRAME_ID" jdbcType="VARCHAR"/>
+        <result property="uniqueCode" column="UNIQUE_CODE" jdbcType="VARCHAR"/>
+        <result property="classifyName" column="CLASSIFY_NAME" jdbcType="DATE"/>
+        <result property="sort" column="SORT" jdbcType="DATE"/>
+        <result property="frameLevel" column="FRAME_LEVEL" jdbcType="DATE"/>
+        <result property="parentId" column="PARENT_ID" jdbcType="INTEGER"/>
+    </resultMap>
+    <!-- 批量插入或更新-->
+    <update id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="false">
+        MERGE INTO
+        T_ETA_CLASSIFY_INDEX_MAPPING t
+        USING (
+        <foreach item="item" separator="UNION ALL" collection="entities">
+            SELECT #{item.classifyId,jdbcType=INTEGER} as CLASSIFY_ID,
+            #{item.indexFrameId,jdbcType=VARCHAR} AS INDEX_FRAME_ID,
+            #{item.uniqueCode,jdbcType=VARCHAR} AS UNIQUE_CODE,
+            #{item.classifyName,jdbcType=VARCHAR} AS CLASSIFY_NAME,
+            #{item.parentId,jdbcType=VARCHAR} AS PARENT_ID,
+            #{item.sort,jdbcType=INTEGER} AS SORT,
+            #{item.frameLevel,jdbcType=VARCHAR} AS FRAME_LEVEL,
+            #{item.createTime,jdbcType=TIMESTAMP} AS CREATE_TIME
+            FROM dual
+        </foreach>
+        ) s ON (t.CLASSIFY_ID = s.CLASSIFY_ID)
+        WHEN MATCHED THEN
+        UPDATE SET
+        t.classify_name = s.classify_name,
+        t.parent_id = s.parent_id,
+        t.sort=s.sort,
+        t.update_time=SYSDATE
+        WHEN NOT MATCHED THEN
+        INSERT
+        (CLASSIFY_ID,INDEX_FRAME_ID,CLASSIFY_NAME,PARENT_ID,SORT,FRAME_LEVEL,UNIQUE_CODE,CREATE_TIME)
+        VALUES
+        (s.CLASSIFY_ID,s.INDEX_FRAME_ID,s.CLASSIFY_NAME,s.PARENT_ID,s.SORT,s.FRAME_LEVEL,s.UNIQUE_CODE,s.CREATE_TIME)
+    </update>
+
+    <select id="getClassifyMappingList" resultMap="EtaClassifyIndexFrameMappingMap">
+        select *
+        from T_ETA_CLASSIFY_INDEX_MAPPING
+        order by id
+    </select>
+
+
+    <select id="getByClassifyId"  resultMap="EtaClassifyIndexFrameMappingMap">
+        select * from  T_ETA_CLASSIFY_INDEX_MAPPING where classify_id=#{id}
+    </select>
+
+    <update id="update">
+        update T_ETA_CLASSIFY_INDEX_MAPPING
+        <set>
+            <if test="entity.indexFrameId != null">
+                index_frame_id = #{entity.indexFrameId}
+            </if>
+        </set>
+        where id = #{entity.id}
+    </update>
+</mapper>

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/EtaApiQuotaDataDao.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qhtx.eta.infra.mapper.EtaApiQuotaDataDao">
 
-    <resultMap type="com.qhtx.eta.infra.entity.EtaApiQuotaData" id="EtaApiQuotaDataMap">
+    <resultMap type="com.qhtx.eta.infra.entity.ods.EtaApiQuotaData" id="EtaApiQuotaDataMap">
         <result property="dataId" column="DATA_ID" jdbcType="INTEGER"/>
         <result property="uniqueCode" column="unique_code" jdbcType="VARCHAR"/>
         <result property="dataValue" column="DATA_VALUE" jdbcType="DECIMAL"/>

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-infra/src/main/resources/mapper/EtaApiQuotaInfoDao.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qhtx.eta.infra.mapper.EtaApiQuotaInfoDao">
 
-    <resultMap type="com.qhtx.eta.infra.entity.EtaApiQuotaInfo" id="EtaApiQuotaInfoMap">
+    <resultMap type="com.qhtx.eta.infra.entity.ods.EtaApiQuotaInfo" id="EtaApiQuotaInfoMap">
         <id property="quotaId" column="QUOTE_ID" jdbcType="INTEGER"/>
         <result property="edbInfoId" column="EDB_INFO_ID" jdbcType="INTEGER"/>
         <result property="edbCode" column="EDB_CODE" jdbcType="VARCHAR"/>

+ 1 - 1
qhtx-eta-integrator/qhtx-integrator-starter/pom.xml

@@ -32,7 +32,7 @@
 
         <dependency>
             <groupId>com.qhtx.eta</groupId>
-            <artifactId>qhtx-integrator-domain</artifactId>
+            <artifactId>qhtx-integrator-application</artifactId>
             <version>${project.version}</version>
         </dependency>
 

+ 5 - 3
qhtx-eta-integrator/qhtx-integrator-starter/src/main/resources/bootstrap-prod.yml

@@ -1,9 +1,11 @@
+server:
+  port: 8109
 spring:
   cloud:
     nacos:
       config:
-        server-addr: 192.168.77.130:8848
-        namespace: f448f995-0813-4a94-a463-028ee1d4f46e
-        group: DATABASE_GROUP
+        server-addr: 10.226.21.31:8848
+        namespace: 3bdc8aff-d4e0-46dd-a8c8-04b9bcf12e1a
+        group: eta_group
         prefix: ${spring.application.name}
         file-extension: yaml

+ 0 - 13
qhtx-eta-task/src/main/java/com/qhtx/eta/App.java

@@ -1,13 +0,0 @@
-package com.qhtx.eta;
-
-/**
- * Hello world!
- *
- */
-public class App 
-{
-    public static void main( String[] args )
-    {
-        System.out.println( "Hello World!" );
-    }
-}

+ 9 - 0
qhtx-integrator-web.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$/qhtx-eta-integrator/qhtx-integrator-web" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>