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
fcc4c544
Commit
fcc4c544
authored
Nov 08, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 添加resultMap
parent
7a3cc8b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
6 deletions
+45
-6
GreenwaveHistMapper.xml
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
+22
-3
GreenwaveRealtimeMapper.xml
...bus/src/main/resources/mapper/GreenwaveRealtimeMapper.xml
+23
-3
No files found.
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
View file @
fcc4c544
...
@@ -2,6 +2,25 @@
...
@@ -2,6 +2,25 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveHistMapper"
>
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveHistMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"net.wanji.databus.dao.entity.GreenwaveHistPO"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"trafficIndex"
column=
"traffic_index"
/>
<result
property=
"speed"
column=
"speed"
/>
<result
property=
"trvalTime"
column=
"trval_time"
/>
<result
property=
"stopTimes"
column=
"stop_times"
/>
<result
property=
"queueLength"
column=
"queue_length"
/>
<result
property=
"congRate"
column=
"cong_rate"
/>
<result
property=
"delayTime"
column=
"delay_time"
/>
<result
property=
"noparkPassRate"
column=
"nopark_pass_rate"
/>
<result
property=
"cordReliability"
column=
"cord_reliability"
/>
<result
property=
"cordQueueRatio"
column=
"cord_queue_ratio"
/>
<result
property=
"uncoordinatePhaseQueue"
column=
"uncoordinate_phase_queue"
/>
<result
property=
"gmtCreate"
column=
"gmt_create"
/>
<result
property=
"gmtModified"
column=
"gmt_modified"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,status,type,traffic_index,speed,trval_time,stop_times,queue_length,cong_rate,delay_time,nopark_pass_rate,
id,status,type,traffic_index,speed,trval_time,stop_times,queue_length,cong_rate,delay_time,nopark_pass_rate,
cord_reliability,cord_queue_ratio,uncoordinate_phase_queue,gmt_create,gmt_modified
cord_reliability,cord_queue_ratio,uncoordinate_phase_queue,gmt_create,gmt_modified
...
@@ -42,11 +61,11 @@
...
@@ -42,11 +61,11 @@
</select>
</select>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.dao.entity.GreenwaveHistPO"
>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.dao.entity.GreenwaveHistPO"
>
insert into t_greenwave_realtime
insert into t_greenwave_realtime
(status,type,traffic_index,speed,trval_time,stop_times,queue_length,cong_rate,delay_time,nopark_pass_rate,
<include
refid=
"Base_Column_List"
></include>
cord_reliability,cord_queue_ratio,uncoordinate_phase_queue)
values
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"list"
item=
"entity"
separator=
","
open=
"("
close=
")"
>
(#{entity.
id}, #{entity.
status}, #{entity.type}, #{entity.trafficIndex},#{entity.speed},
(#{entity.status}, #{entity.type}, #{entity.trafficIndex},#{entity.speed},
#{entity.trvalTime}, #{entity.stopTimes}, #{entity.queueLength}, #{entity.congRate},
#{entity.trvalTime}, #{entity.stopTimes}, #{entity.queueLength}, #{entity.congRate},
#{entity.delayTime}, #{entity.noparkPassRate}, #{entity.cordReliability}, #{entity.cordQueueRatio},
#{entity.delayTime}, #{entity.noparkPassRate}, #{entity.cordReliability}, #{entity.cordQueueRatio},
#{entity.uncoordinatePhaseQueue})
#{entity.uncoordinatePhaseQueue})
...
...
wj-databus/src/main/resources/mapper/GreenwaveRealtimeMapper.xml
View file @
fcc4c544
...
@@ -2,6 +2,25 @@
...
@@ -2,6 +2,25 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveRealtimeMapper"
>
<mapper
namespace=
"net.wanji.databus.dao.mapper.GreenwaveRealtimeMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"net.wanji.databus.dao.entity.GreenwaveRealtimePO"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"trafficIndex"
column=
"traffic_index"
/>
<result
property=
"speed"
column=
"speed"
/>
<result
property=
"trvalTime"
column=
"trval_time"
/>
<result
property=
"stopTimes"
column=
"stop_times"
/>
<result
property=
"queueLength"
column=
"queue_length"
/>
<result
property=
"congRate"
column=
"cong_rate"
/>
<result
property=
"delayTime"
column=
"delay_time"
/>
<result
property=
"noparkPassRate"
column=
"nopark_pass_rate"
/>
<result
property=
"cordReliability"
column=
"cord_reliability"
/>
<result
property=
"cordQueueRatio"
column=
"cord_queue_ratio"
/>
<result
property=
"uncoordinatePhaseQueue"
column=
"uncoordinate_phase_queue"
/>
<result
property=
"gmtCreate"
column=
"gmt_create"
/>
<result
property=
"gmtModified"
column=
"gmt_modified"
/>
</resultMap>
<sql
id=
"baseColumnList"
>
<sql
id=
"baseColumnList"
>
id,status,type,traffic_index,speed,trval_time,stop_times,queue_length,cong_rate,delay_time,nopark_pass_rate,
id,status,type,traffic_index,speed,trval_time,stop_times,queue_length,cong_rate,delay_time,nopark_pass_rate,
cord_reliability, cord_queue_ratio, uncoordinate_phase_queue,gmt_create,gmt_modified
cord_reliability, cord_queue_ratio, uncoordinate_phase_queue,gmt_create,gmt_modified
...
@@ -16,11 +35,12 @@
...
@@ -16,11 +35,12 @@
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.dao.entity.GreenwaveRealtimePO"
>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.databus.dao.entity.GreenwaveRealtimePO"
>
insert into t_greenwave_realtime
insert into t_greenwave_realtime
<include
refid=
"baseColumnList"
></include>
(status,type,traffic_index,speed,trval_time,stop_times,queue_length,cong_rate,delay_time,nopark_pass_rate,
cord_reliability, cord_queue_ratio, uncoordinate_phase_queue)
values
values
<foreach
collection=
"list"
item=
"entity"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"list"
item=
"entity"
separator=
","
open=
"("
close=
")"
>
(#{entity.
id}, #{entity.status}, #{entity.type}, #{entity.trafficIndex},
#{entity.speed},
(#{entity.
status}, #{entity.type}, #{entity.trafficIndex},
#{entity.speed},
#{entity.trvalTime}, #{entity.stopTimes}, #{entity.queueLength}, #{entity.congRate},
#{entity.trvalTime}, #{entity.stopTimes}, #{entity.queueLength}, #{entity.congRate},
#{entity.delayTime}, #{entity.noparkPassRate}, #{entity.cordReliability}, #{entity.cordQueueRatio},
#{entity.delayTime}, #{entity.noparkPassRate}, #{entity.cordReliability}, #{entity.cordQueueRatio},
#{entity.uncoordinatePhaseQueue})
#{entity.uncoordinatePhaseQueue})
</foreach>
</foreach>
...
...
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