diff --git a/jeecg-server-cloud/zhkj-applet-cloud-start/src/main/java/org/jeecg/ZhkjAppletCloudApplication.java b/jeecg-server-cloud/zhkj-applet-cloud-start/src/main/java/org/jeecg/ZhkjAppletCloudApplication.java index 0021c9a..598b1cf 100644 --- a/jeecg-server-cloud/zhkj-applet-cloud-start/src/main/java/org/jeecg/ZhkjAppletCloudApplication.java +++ b/jeecg-server-cloud/zhkj-applet-cloud-start/src/main/java/org/jeecg/ZhkjAppletCloudApplication.java @@ -24,6 +24,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; @SpringBootApplication @EnableScheduling @MapperScan("org.jeecg.system.applet.mapper") +@EnableFeignClients public class ZhkjAppletCloudApplication implements CommandLineRunner { @Autowired diff --git a/zh-module-applet/zh-applet-api/pom.xml b/zh-module-applet/zh-applet-api/pom.xml index 3edc4b8..a9c840f 100644 --- a/zh-module-applet/zh-applet-api/pom.xml +++ b/zh-module-applet/zh-applet-api/pom.xml @@ -74,6 +74,12 @@ compile + + + org.springframework.cloud + spring-cloud-starter-openfeign + + diff --git a/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/client/ZhAdminFeignClient.java b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/client/ZhAdminFeignClient.java new file mode 100644 index 0000000..0535320 --- /dev/null +++ b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/client/ZhAdminFeignClient.java @@ -0,0 +1,12 @@ +package org.jeecg.system.applet.client; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +@FeignClient(value = "zh-applet-admin") +public interface ZhAdminFeignClient { + + @GetMapping("/inner/b/hello/{name}") + String callServiceB(@PathVariable("name") String name); +} diff --git a/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/mapper/xml/SurvAlertRecordMapper.xml b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/mapper/xml/SurvAlertRecordMapper.xml index 96002e9..688f8fa 100644 --- a/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/mapper/xml/SurvAlertRecordMapper.xml +++ b/zh-module-applet/zh-applet-api/src/main/java/org/jeecg/system/applet/mapper/xml/SurvAlertRecordMapper.xml @@ -78,14 +78,14 @@ SELECT DATE(ALERT_TIME) as date_part, HOUR(ALERT_TIME) as hour_part, - FLOOR(MINUTE(ALERT_TIME) / 5) as minute_group, + FLOOR(MINUTE(ALERT_TIME) / 15) as minute_group, MIN(ALERT_TIME) as first_time_in_interval FROM surv_alert_record WHERE ALERT_TIME >= #{startDateTime} AND ALERT_TIME <= #{endDateTime} AND DEPLOY_ID = #{deployId} AND ITEM_CODE = #{itemCode} GROUP BY date_part, hour_part, minute_group ) t2 ON DATE(t1.ALERT_TIME) = t2.date_part AND HOUR(t1.ALERT_TIME) = t2.hour_part - AND FLOOR(MINUTE(t1.ALERT_TIME) / 5) = t2.minute_group + AND FLOOR(MINUTE(t1.ALERT_TIME) / 15) = t2.minute_group AND t1.ALERT_TIME = t2.first_time_in_interval ) ad ON ad.ALERT_TIME >= ti.interval_start AND ad.ALERT_TIME < DATE_ADD(ti.interval_start, INTERVAL 5 MINUTE)