Browse Source

版本升级

dev_shibei_match
wxz 5 years ago
parent
commit
ba20500fa1
  1. 8
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
  2. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml
  4. 2
      epmet-module/data-statistical/data-statistical-server/pom.xml
  5. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java
  6. 2
      epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml
  7. 2
      epmet-module/epmet-job/epmet-job-server/pom.xml
  8. 9
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DimInitService.java
  9. 19
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimInitServiceImpl.java
  10. 31
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DimInitTask.java

8
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java

@ -128,4 +128,12 @@ public interface DataStatisticalOpenFeignClient {
@PostMapping("/data/stats/statsproject/gridprojectstats")
Result gridProjectStats();
/**
* 初始化所有维度
*
* @return
*/
@PostMapping("/data/stats/dim/all/init")
Result initAllDims();
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java

@ -132,4 +132,9 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp
public Result gridProjectStats() {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "gridProjectStats");
}
@Override
public Result initAllDims() {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "initAllDims");
}
}

2
epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
data-statistical-server:
container_name: data-statistical-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.5
image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.6
ports:
- "8108:8108"
network_mode: host # 使用现有网络

2
epmet-module/data-statistical/data-statistical-server/pom.xml

@ -2,7 +2,7 @@
<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">
<version>0.3.5</version>
<version>0.3.6</version>
<parent>
<artifactId>data-statistical</artifactId>
<groupId>com.epmet</groupId>

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java

@ -46,7 +46,7 @@ public class DimController {
* @return
*/
@PostMapping("/all/init")
public Result initAll() {
public Result initAllDims() {
try {
dimDateService.initDimDate();
logger.info("初始化按日维度成功");

2
epmet-module/epmet-job/epmet-job-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-job-server:
container_name: epmet-job-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-job-server:0.3.10
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-job-server:0.3.11
ports:
- "8084:8084"
network_mode: host # 使用现有网络

2
epmet-module/epmet-job/epmet-job-server/pom.xml

@ -2,7 +2,7 @@
<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>
<version>0.3.10</version>
<version>0.3.11</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-job</artifactId>

9
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/DimInitService.java

@ -0,0 +1,9 @@
package com.epmet.service;
import com.epmet.commons.tools.utils.Result;
public interface DimInitService {
Result initAllDims();
}

19
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/service/impl/DimInitServiceImpl.java

@ -0,0 +1,19 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.DataStatisticalOpenFeignClient;
import com.epmet.service.DimInitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DimInitServiceImpl implements DimInitService {
@Autowired
private DataStatisticalOpenFeignClient statsFeignClient;
@Override
public Result initAllDims() {
return statsFeignClient.initAllDims();
}
}

31
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/DimInitTask.java

@ -0,0 +1,31 @@
package com.epmet.task;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.DimInitService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/6/23 14:36
*/
@Slf4j
@Component("dimInitTask")
public class DimInitTask implements ITask {
@Autowired
private DimInitService dimInitService;
@Override
public void run(String params) {
log.debug("DimInitTask定时任务正在执行,参数为:{}", params);
Result result = dimInitService.initAllDims();
if (result.success()){
log.debug("DimInitTask定时任务正在执行定时任务执行成功");
}else {
log.debug("DimInitTask定时任务正在执行定时任务执行失败:" + result.getMsg());
}
}
}
Loading…
Cancel
Save