Commit 68b02faf authored by wangjinjing's avatar wangjinjing

推送近五分钟车流量改bug

parent 1d60ae39
package com.hzjt.controller; package com.hzjt.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hzjt.mapper.TraffFlowMapper;
import com.hzjt.service.TraffFlowService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
...@@ -21,7 +24,8 @@ public class RouterController { ...@@ -21,7 +24,8 @@ public class RouterController {
@Autowired @Autowired
private StringRedisTemplate redisTemplate; private StringRedisTemplate redisTemplate;
@Autowired
TraffFlowService traffFlowService;
/** /**
* 登陆页面 * 登陆页面
...@@ -32,5 +36,11 @@ public class RouterController { ...@@ -32,5 +36,11 @@ public class RouterController {
public String index() { public String index() {
return "login"; return "login";
} }
@GetMapping("/indexxx")
public void indexxx() {
Map map = traffFlowService.getfiveFlowByVideoid("1");
System.out.println(map);
}
} }
...@@ -15,13 +15,13 @@ mybatis.configuration.default-statement-timeout=3000 ...@@ -15,13 +15,13 @@ mybatis.configuration.default-statement-timeout=3000
#mybatis.mapperLocations = classpath:xxx.xml #mybatis.mapperLocations = classpath:xxx.xml
logging.level.com.hzjt=debug logging.level.com.hzjt=debug
#spring.datasource.username=test spring.datasource.username=test
#spring.datasource.password=test spring.datasource.password=test
#spring.datasource.url=jdbc:oracle:thin:@192.168.168.212:1523:helowin spring.datasource.url=jdbc:oracle:thin:@192.168.168.212:1523:helowin
spring.datasource.username=hzjt #spring.datasource.username=hzjt
spring.datasource.password=hzjt #spring.datasource.password=hzjt
spring.datasource.url=jdbc:oracle:thin:@33.50.1.22:1521:orcl #spring.datasource.url=jdbc:oracle:thin:@33.50.1.22:1521:orcl
spring.datasource.driverClassName=oracle.jdbc.OracleDriver spring.datasource.driverClassName=oracle.jdbc.OracleDriver
# druid # druid
......
...@@ -185,14 +185,14 @@ ...@@ -185,14 +185,14 @@
else else
0 0
end), end),
0) downfiveflow, 0)as "downfiveflow",
NVL(sum(case NVL(sum(case
when ruletag = '1' then when ruletag = '1' then
1 1
else else
0 0
end), end),
0) upfiveflow 0) as "upfiveflow"
from vehicle from vehicle
where CREATE_TIME >= SYSDATE - 5 / 1440 and video_id=#{videoid} where CREATE_TIME >= SYSDATE - 5 / 1440 and video_id=#{videoid}
......
...@@ -2,11 +2,14 @@ package com.hzjt; ...@@ -2,11 +2,14 @@ package com.hzjt;
import com.hzjt.domain.Traffalarmrecord; import com.hzjt.domain.Traffalarmrecord;
import com.hzjt.domain.VideoDeviceTraffic; import com.hzjt.domain.VideoDeviceTraffic;
import com.hzjt.mapper.TraffFlowMapper;
import com.hzjt.service.TraffFlowService;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
public class ExcelToDbApplicationTests { import java.util.Map;
public class ExcelToDbApplicationTests {
@Test @Test
public void t(){ public void t(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment