Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
signal
traffic-signal-platform
Commits
b2acedd9
Commit
b2acedd9
authored
May 13, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 数据中心版本databus0.0.databus-0.0.3-CH
parent
2bc5f717
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
60 additions
and
68 deletions
+60
-68
CrossLightsStatusHistPO.java
...net/wanji/databus/dao/entity/CrossLightsStatusHistPO.java
+0
-3
CrossSchedulesPO.java
...n/java/net/wanji/databus/dao/entity/CrossSchedulesPO.java
+0
-1
BaseCrossLaneLightsMapper.java
...t/wanji/databus/dao/mapper/BaseCrossLaneLightsMapper.java
+0
-2
LaneInfoMapper.java
...ain/java/net/wanji/databus/dao/mapper/LaneInfoMapper.java
+0
-2
CrossDataHistPO.java
...s/src/main/java/net/wanji/databus/po/CrossDataHistPO.java
+3
-0
CrossDirDataHistPO.java
...rc/main/java/net/wanji/databus/po/CrossDirDataHistPO.java
+3
-0
CrossLaneDataHistPO.java
...c/main/java/net/wanji/databus/po/CrossLaneDataHistPO.java
+3
-0
CrossTurnDataHistPO.java
...c/main/java/net/wanji/databus/po/CrossTurnDataHistPO.java
+3
-0
LightsStatusVO2.java
...s/src/main/java/net/wanji/databus/vo/LightsStatusVO2.java
+0
-2
BaseCrossLaneLightsMapper.xml
...s/src/main/resources/mapper/BaseCrossLaneLightsMapper.xml
+0
-7
BaseCrossSchemeMapper.xml
...tabus/src/main/resources/mapper/BaseCrossSchemeMapper.xml
+4
-25
CrossDataHistMapper.xml
wj-databus/src/main/resources/mapper/CrossDataHistMapper.xml
+12
-3
CrossDataRealtimeMapper.xml
...bus/src/main/resources/mapper/CrossDataRealtimeMapper.xml
+1
-1
CrossDirDataHistMapper.xml
...abus/src/main/resources/mapper/CrossDirDataHistMapper.xml
+1
-1
CrossDirDataRealtimeMapper.xml
.../src/main/resources/mapper/CrossDirDataRealtimeMapper.xml
+2
-2
CrossLaneDataHistMapper.xml
...bus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
+12
-3
CrossLaneDataRealTimeMapper.xml
...src/main/resources/mapper/CrossLaneDataRealTimeMapper.xml
+2
-2
CrossLightsStatusHist.xml
...tabus/src/main/resources/mapper/CrossLightsStatusHist.xml
+1
-1
CrossTurnDataHistMapper.xml
...bus/src/main/resources/mapper/CrossTurnDataHistMapper.xml
+12
-3
CrossTurnDataRealtimeMapper.xml
...src/main/resources/mapper/CrossTurnDataRealtimeMapper.xml
+1
-1
GreenwaveHistMapper.xml
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
+0
-2
LaneInfoMapper.xml
wj-databus/src/main/resources/mapper/LaneInfoMapper.xml
+0
-7
No files found.
wj-databus/src/main/java/net/wanji/databus/dao/entity/CrossLightsStatusHistPO.java
View file @
b2acedd9
package
net
.
wanji
.
databus
.
dao
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
...
...
@@ -14,8 +13,6 @@ public class CrossLightsStatusHistPO {
private
String
crossId
;
private
Integer
batchTime
;
private
String
lightsStatusJson
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
gmtCreate
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
gmtModified
;
}
wj-databus/src/main/java/net/wanji/databus/dao/entity/CrossSchedulesPO.java
View file @
b2acedd9
...
...
@@ -39,7 +39,6 @@ public class CrossSchedulesPO {
private
String
weeks
;
/** 特殊日期 */
@ApiModelProperty
(
value
=
"特殊日期"
,
notes
=
""
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
specialDate
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
,
notes
=
""
)
...
...
wj-databus/src/main/java/net/wanji/databus/dao/mapper/BaseCrossLaneLightsMapper.java
View file @
b2acedd9
...
...
@@ -30,8 +30,6 @@ public interface BaseCrossLaneLightsMapper {
Integer
selectLightsIdByLaneId
(
@Param
(
"crossId"
)
String
crossId
,
@Param
(
"laneId"
)
String
laneId
);
List
<
CrossLaneLightsPO
>
selectByCrossId
(
@Param
(
"crossId"
)
String
crossId
);
List
<
CrossLaneLightsPO
>
selectLanesByLightId
(
@Param
(
"crossId"
)
String
crossId
,
@Param
(
"lightId"
)
Integer
lightId
);
...
...
wj-databus/src/main/java/net/wanji/databus/dao/mapper/LaneInfoMapper.java
View file @
b2acedd9
...
...
@@ -21,8 +21,6 @@ public interface LaneInfoMapper {
List
<
LaneInfoPO
>
selectBycrossId
(
@Param
(
"crossId"
)
String
crossId
);
List
<
LaneInfoPO
>
selectBycrossIdAll
(
@Param
(
"crossId"
)
String
crossId
);
LaneInfoPO
selectByCrossIdDirCode
(
@Param
(
"crossId"
)
String
crossId
,
@Param
(
"dir"
)
Integer
dir
,
@Param
(
"code"
)
String
code
);
...
...
wj-databus/src/main/java/net/wanji/databus/po/CrossDataHistPO.java
View file @
b2acedd9
...
...
@@ -15,4 +15,7 @@ import java.util.Date;
@ApiModel
(
value
=
"CrossDataHistPO"
,
description
=
"路口实时数据历史"
)
public
class
CrossDataHistPO
extends
CrossDataRealtimePO
{
private
Integer
dt
;
private
Integer
dt_15min
;
private
Integer
dt_30min
;
private
Integer
dt_60min
;
}
wj-databus/src/main/java/net/wanji/databus/po/CrossDirDataHistPO.java
View file @
b2acedd9
...
...
@@ -13,4 +13,7 @@ import lombok.Data;
@ApiModel
(
value
=
"CrossDirDataHistPO"
,
description
=
"路口转向实时数据历史"
)
public
class
CrossDirDataHistPO
extends
CrossDirDataRealtimePO
{
private
Integer
dt
;
private
Integer
dt_15min
;
private
Integer
dt_30min
;
private
Integer
dt_60min
;
}
wj-databus/src/main/java/net/wanji/databus/po/CrossLaneDataHistPO.java
View file @
b2acedd9
...
...
@@ -13,4 +13,7 @@ import lombok.Data;
@ApiModel
(
value
=
"CrossLaneDataHistPO"
,
description
=
"路口车道实时数据历史"
)
public
class
CrossLaneDataHistPO
extends
CrossLaneDataRealTimePO
{
private
Integer
dt
;
private
Integer
dt_15min
;
private
Integer
dt_30min
;
private
Integer
dt_60min
;
}
wj-databus/src/main/java/net/wanji/databus/po/CrossTurnDataHistPO.java
View file @
b2acedd9
...
...
@@ -13,4 +13,7 @@ import lombok.Data;
@ApiModel
(
value
=
"CrossTurnDataHistPO"
,
description
=
"路口转向实时数据历史"
)
public
class
CrossTurnDataHistPO
extends
CrossTurnDataRealtimePO
{
private
Integer
dt
;
private
Integer
dt_15min
;
private
Integer
dt_30min
;
private
Integer
dt_60min
;
}
wj-databus/src/main/java/net/wanji/databus/vo/LightsStatusVO2.java
View file @
b2acedd9
...
...
@@ -38,8 +38,6 @@ public class LightsStatusVO2 extends BaseCrossInfo {
private
String
schemeId
;
@ApiModelProperty
(
value
=
"灯组状态"
)
private
List
<
DirInfo
>
dirLampGroupMapList
;
@ApiModelProperty
(
value
=
"当前相位灯组状态"
)
private
List
<
DirInfo
>
curPhaseLampGroupMapList
;
@ApiModelProperty
(
value
=
"数据上报时间戳"
)
@Field
(
type
=
FieldType
.
Keyword
,
name
=
"timeStamp"
)
private
String
timeStamp
;
...
...
wj-databus/src/main/resources/mapper/BaseCrossLaneLightsMapper.xml
View file @
b2acedd9
...
...
@@ -74,13 +74,6 @@
where cross_id = #{crossId} and lights_id = #{lightId}
</select>
<select
id=
"selectByCrossId"
resultMap=
"BaseResultMap"
>
select
id,lights_id,lane_id,cross_id,gmt_create,gmt_modified
from t_base_cross_lane_lights
where cross_id = #{crossId}
</select>
<select
id=
"selectByLightsId"
resultMap=
"BaseResultMap"
>
select
id,lights_id,lane_id,cross_id,gmt_create,gmt_modified
...
...
wj-databus/src/main/resources/mapper/BaseCrossSchemeMapper.xml
View file @
b2acedd9
...
...
@@ -238,20 +238,10 @@
AND section.scheme_id = scheme.id
WHERE
schedules.cross_id = #{crossId}
AND (
DATE_FORMAT(schedules.special_date, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
OR
(
schedules.week = #{week}
AND (
DATE_FORMAT(schedules.special_date, '%Y-%m-%d') != DATE_FORMAT(NOW(), '%Y-%m-%d')
OR schedules.special_date IS NULL
)
)
)
AND schedules.`week` = #{week}
AND DATE_FORMAT( NOW(), '%H:%i' ) BETWEEN DATE_FORMAT( CAST( section.start_time AS TIME ), '%H:%i' )
AND DATE_FORMAT( CAST( section.end_time AS TIME ), '%H:%i' )
ORDER BY schedules.special_date, DATE_FORMAT( CAST( section.end_time AS TIME ), '%H:%i' )
,schedules.special_date
DESC LIMIT 1
ORDER BY schedules.special_date, DATE_FORMAT( CAST( section.end_time AS TIME ), '%H:%i' ) DESC LIMIT 1
</select>
<select
id=
"selectSchemeByParams"
resultType=
"net.wanji.databus.dao.entity.BaseCrossSchemePO"
>
...
...
@@ -265,21 +255,10 @@
AND section.scheme_id = scheme.id
WHERE
schedules.cross_id = #{crossId}
AND (
DATE_FORMAT(schedules.special_date, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
OR
(
schedules.week = #{week}
AND (
DATE_FORMAT(schedules.special_date, '%Y-%m-%d') != DATE_FORMAT(NOW(), '%Y-%m-%d')
OR schedules.special_date IS NULL
)
)
)
AND schedules.`week` = #{week}
AND DATE_FORMAT( #{queryTime}, '%H:%i' ) BETWEEN DATE_FORMAT( CAST( section.start_time AS TIME ), '%H:%i' )
AND DATE_FORMAT( CAST( section.end_time AS TIME ), '%H:%i' )
ORDER BY schedules.special_date, DATE_FORMAT( CAST( section.end_time AS TIME ), '%H:%i' )
,schedules.special_date
DESC LIMIT 1
ORDER BY schedules.special_date, DATE_FORMAT( CAST( section.end_time AS TIME ), '%H:%i' ) DESC LIMIT 1
</select>
...
...
wj-databus/src/main/resources/mapper/CrossDataHistMapper.xml
View file @
b2acedd9
...
...
@@ -65,11 +65,11 @@
no_stop_rate,one_stop_rate,two_stop_rate,three_stop_rate,non_motor_flow,v_85,
traffic_flow_A,traffic_flow_B,traffic_flow_C,vehicle_length_ratio_mean,time_occupancy,
strategy, strategy_duration, optimize_count, optimize_seconds, empty_pass, service_level,
direction, turn,
dt
direction, turn,
dt, dt_15min, dt_30min, dt_60min
</sql>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.po.CrossDataHistPO"
>
insert
ignore
into t_cross_data_hist
insert into t_cross_data_hist
(
<include
refid=
"Base_Column_List"
></include>
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
...
...
@@ -82,9 +82,18 @@
#{entity.nonMotorFlow},#{entity.v85},#{entity.trafficFlowA},#{entity.trafficFlowB},
#{entity.trafficFlowC},#{entity.vehicleLengthRatioMean},#{entity.timeOccupancy},
#{entity.strategy}, #{entity.strategyDuration}, #{entity.optimizeCount}, #{entity.optimizeSeconds},
#{entity.emptyPass}, #{entity.serviceLevel}, #{entity.direction}, #{entity.turn}, DATE_FORMAT(#{entity.startTime}, '%Y%m%d')
#{entity.emptyPass}, #{entity.serviceLevel}, #{entity.direction}, #{entity.turn},
cast(to_char(cast(#{entity.startTime} as DATE), 'YYYYMMDD') as INTEGER),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 15) * 15 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 30) * 30 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 60) * 60 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP)
)
</foreach>
on conflict(cross_id, batch_time, dt)
do update set batch_time = excluded.batch_time
</insert>
<delete
id=
"deleteBatch"
parameterType=
"String"
>
...
...
wj-databus/src/main/resources/mapper/CrossDataRealtimeMapper.xml
View file @
b2acedd9
...
...
@@ -69,7 +69,7 @@
</sql>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.po.CrossDataRealtimePO"
>
insert i
gnore i
nto t_cross_data_realtime
insert into t_cross_data_realtime
(
<include
refid=
"Base_Column_List"
></include>
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
...
...
wj-databus/src/main/resources/mapper/CrossDirDataHistMapper.xml
View file @
b2acedd9
This diff is collapsed.
Click to expand it.
wj-databus/src/main/resources/mapper/CrossDirDataRealtimeMapper.xml
View file @
b2acedd9
...
...
@@ -37,11 +37,11 @@
</sql>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.po.CrossDirDataRealtimePO"
>
insert i
gnore i
nto t_cross_dir_data_realtime
insert into t_cross_dir_data_realtime
(
<include
refid=
"Base_Column_List"
></include>
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
(
#{entity.id}, #{entity.dirType}, #{entity.inOutType}, #{entity.crossId}, #{entity.length}, #{entity.status}, #{entity.trafficIndex}, #{entity.startTime}, #{entity.capacity}, #{entity.duration}, #{entity.flow},
(#{entity.id}, #{entity.dirType}, #{entity.inOutType}, #{entity.crossId}, #{entity.length}, #{entity.status}, #{entity.trafficIndex}, #{entity.startTime}, #{entity.capacity}, #{entity.duration}, #{entity.flow},
#{entity.speed}, #{entity.queueLength}, #{entity.stopTimes}, #{entity.delayTime}, #{entity.sturation},
#{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate},#{entity.batchTime},
now(), now(),#{entity.effusionRate}, #{entity.greenLightEfficiency} )
...
...
wj-databus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
View file @
b2acedd9
...
...
@@ -42,11 +42,11 @@
vehhead_dist, vehhead_time, quality, batch_time, gmt_create, gmt_modified,
no_stop_rate,one_stop_rate,two_stop_rate,three_stop_rate,start_time,effusion_rate,green_light_efficiency,
vehicle_nums_ratio_mean,vehicle_length_ratio_mean,time_occupancy,non_motor_flow,v_85,
traffic_flow_A,traffic_flow_B,traffic_flow_C,
dt
traffic_flow_A,traffic_flow_B,traffic_flow_C,
dt, dt_15min, dt_30min, dt_60min
</sql>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.po.CrossLaneDataHistPO"
>
insert i
gnore i
nto t_lane_data_hist
insert into t_lane_data_hist
(
<include
refid=
"Base_Column_List"
></include>
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
...
...
@@ -55,9 +55,18 @@
now(),now(),
#{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate},#{entity.startTime},
#{entity.effusionRate},#{entity.greenLightEfficiency},#{entity.vehicleNumsRatioMean},#{entity.vehicleLengthRatioMean},#{entity.timeOccupancy},
#{entity.nonMotorFlow},#{entity.v85},#{entity.trafficFlowA},#{entity.trafficFlowB},#{entity.trafficFlowC}, DATE_FORMAT(#{entity.startTime}, '%Y%m%d')
#{entity.nonMotorFlow},#{entity.v85},#{entity.trafficFlowA},#{entity.trafficFlowB},#{entity.trafficFlowC},
cast(to_char(cast(#{entity.startTime} as DATE), 'YYYYMMDD') as INTEGER),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 15) * 15 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 30) * 30 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 60) * 60 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP)
)
</foreach>
on conflict(id, batch_time, dt)
do update set batch_time = excluded.batch_time
</insert>
<delete
id=
"deleteBatch"
parameterType=
"String"
>
...
...
wj-databus/src/main/resources/mapper/CrossLaneDataRealTimeMapper.xml
View file @
b2acedd9
...
...
@@ -44,11 +44,11 @@
</sql>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.po.CrossLaneDataRealTimePO"
>
insert
ignore
into t_lane_data_realtime
insert into t_lane_data_realtime
(
<include
refid=
"Base_Column_List"
></include>
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
(#{entity.id},#{entity.crossId},#{entity.flow},#{entity.speed},#{entity.inSpeed},#{entity.outSpeed},#{entity.queueLength},#{entity.stopTimes},#{entity.delayTime},#{entity.capacity},#{entity.sturation},
(#{entity.id},
#{entity.crossId},#{entity.flow},#{entity.speed},#{entity.inSpeed},#{entity.outSpeed},#{entity.queueLength},#{entity.stopTimes},#{entity.delayTime},#{entity.capacity},#{entity.sturation},
#{entity.vehheadDist},#{entity.vehheadTime},#{entity.quality},#{entity.batchTime},
now(), now(),
#{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate},#{entity.startTime},
...
...
wj-databus/src/main/resources/mapper/CrossLightsStatusHist.xml
View file @
b2acedd9
...
...
@@ -42,7 +42,7 @@
</select>
<insert
id=
"insertOne"
parameterType=
"net.wanji.databus.dao.entity.CrossLightsStatusHistPO"
>
insert
ignore
into t_cross_lights_status_hist (cross_id, batch_time, lights_status_json)
insert into t_cross_lights_status_hist (cross_id, batch_time, lights_status_json)
values (#{entity.crossId}, #{entity.batchTime}, #{entity.lightsStatusJson})
</insert>
...
...
wj-databus/src/main/resources/mapper/CrossTurnDataHistMapper.xml
View file @
b2acedd9
...
...
@@ -37,11 +37,11 @@
id, turn_type, in_dir, out_dir, cross_id, flow, status, traffic_index, speed, in_speed, out_speed, queue_length,
stop_times, delay_time, sturation, vehhead_dist, vehhead_time, quality, batch_time, gmt_create, gmt_modified,
no_stop_rate,one_stop_rate,two_stop_rate,three_stop_rate,start_time,
green_light_efficiency,effusion_rate,dt
green_light_efficiency,effusion_rate,dt
, dt_15min, dt_30min, dt_60min
</sql>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.po.CrossTurnDataHistPO"
>
insert i
gnore i
nto t_cross_turn_data_hist
insert into t_cross_turn_data_hist
(
<include
refid=
"Base_Column_List"
></include>
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
...
...
@@ -50,9 +50,18 @@
#{entity.queueLength},#{entity.stopTimes},#{entity.delayTime},#{entity.sturation},#{entity.vehheadDist},#{entity.vehheadTime},
#{entity.quality},#{entity.batchTime},now(),now(),
#{entity.noStopRate},#{entity.oneStopRate},#{entity.twoStopRate},#{entity.threeStopRate},#{entity.startTime},
#{entity.greenLightEfficiency},#{entity.effusionRate}, DATE_FORMAT(#{entity.startTime}, '%Y%m%d')
#{entity.greenLightEfficiency},#{entity.effusionRate},
cast(to_char(cast(#{entity.startTime} as DATE), 'YYYYMMDD') as INTEGER),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 15) * 15 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 30) * 30 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP),
cast(to_char(date_trunc('hour', cast(#{entity.startTime} as TIMESTAMP)) +
(floor(extract(minute from cast(#{entity.startTime} as TIMESTAMP)) / 60) * 60 * interval '1 minute'), 'YYYY-MM-DD HH24:MI:00') as TIMESTAMP)
)
</foreach>
on conflict(id, batch_time, dt)
do update set batch_time = excluded.batch_time
</insert>
<delete
id=
"deleteBatch"
parameterType=
"String"
>
...
...
wj-databus/src/main/resources/mapper/CrossTurnDataRealtimeMapper.xml
View file @
b2acedd9
...
...
@@ -42,7 +42,7 @@
</sql>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.po.CrossTurnDataRealtimePO"
>
insert
ignore
into t_cross_turn_data_realtime
insert into t_cross_turn_data_realtime
(
<include
refid=
"Base_Column_List"
></include>
)
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
>
...
...
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
View file @
b2acedd9
...
...
@@ -106,8 +106,6 @@
#{entity.speedFactor}
)
</foreach>
ON DUPLICATE KEY UPDATE
gmt_modified = values(gmt_modified)
</insert>
<select
id=
"selectByIdAndType"
resultType=
"net.wanji.databus.dao.entity.GreenwaveHistPO"
>
...
...
wj-databus/src/main/resources/mapper/LaneInfoMapper.xml
View file @
b2acedd9
...
...
@@ -51,13 +51,6 @@
where cross_id = #{crossId} and type = 2
</select>
<select
id=
"selectBycrossIdAll"
resultMap=
"BaseResultMap"
>
select
id,code,sort,type,dir,turn,category,cross_id,rid,length,width,wkt,gmt_create,gmt_modified
from t_base_lane_info
where cross_id = #{crossId}
</select>
<select
id=
"selectByCrossIdDirCode"
resultMap=
"BaseResultMap"
>
select
id,code,sort,type,dir,turn,category,cross_id,rid,length,width,wkt,gmt_create,gmt_modified
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment