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
0fb8c68a
Commit
0fb8c68a
authored
May 29, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 路径优化
parent
2942e5a1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
55 deletions
+97
-55
CrossPhaseMapper.xml
wj-databus/src/main/resources/mapper/CrossPhaseMapper.xml
+50
-32
CrossPlanMapper.xml
wj-databus/src/main/resources/mapper/CrossPlanMapper.xml
+39
-15
CrossSectionMapper.xml
wj-databus/src/main/resources/mapper/CrossSectionMapper.xml
+7
-7
SignalStatusLogMapper.xml
...tabus/src/main/resources/mapper/SignalStatusLogMapper.xml
+1
-1
No files found.
wj-databus/src/main/resources/mapper/CrossPhaseMapper.xml
View file @
0fb8c68a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.opt.dao.mapper.BaseCrossPhaseMapper"
>
<!-- 通用查询映射结果 -->
<mapper
namespace=
"net.wanji.databus.dao.mapper.CrossPhaseMapper"
>
<resultMap
type=
"net.wanji.databus.dao.entity.CrossPhasePO"
id=
"BaseResultMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"phaseNo"
column=
"phase_no"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"crossId"
column=
"cross_id"
/>
<result
property=
"
scheme
Id"
column=
"plan_id"
/>
<result
property=
"
plan
Id"
column=
"plan_id"
/>
<result
property=
"ringNo"
column=
"ring_no"
/>
<result
property=
"groupNo"
column=
"group_no"
/>
<!--<result property="type" column="type"/>-->
<result
property=
"controlMode"
column=
"control_mode"
/>
<result
property=
"phaseTime"
column=
"phase_time"
/>
<result
property=
"greenTime"
column=
"green_time"
/>
...
...
@@ -25,33 +22,54 @@
<result
property=
"gmtModified"
column=
"gmt_modified"
/>
</resultMap>
<select
id=
"listCrossPhase"
resultMap=
"BaseResultMap"
>
<insert
id=
"insertOne"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into t_cross_phase(phase_no,name,sort,cross_id,plan_id,ring_no,control_mode,phase_time,green_time,green_flash_time,ped_flash_time,yellow_time,red_time,min_green_time,max_green_time)
values (#{phaseNo},#{name},#{sort},#{crossId},#{planId},#{ringNo},#{controlMode},#{phaseTime},#{greenTime},#{greenFlashTime},#{pedFlashTime},#{yellowTime},#{redTime},#{minGreenTime},#{maxGreenTime})
</insert>
<insert
id=
"insertBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into t_cross_phase(phase_no,name,sort,cross_id,plan_id,ring_no,control_mode,phase_time,green_time,
green_flash_time,ped_flash_time,yellow_time,red_time,min_green_time,max_green_time)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.phaseNo},#{entity.name},#{entity.sort},#{entity.crossId},#{entity.planId},#{entity.ringNo},
#{entity.controlMode},#{entity.phaseTime},#{entity.greenTime},#{entity.greenFlashTime},#{entity.pedFlashTime},
#{entity.yellowTime},#{entity.redTime},#{entity.minGreenTime},#{entity.maxGreenTime})
</foreach>
</insert>
<delete
id=
"deleteBatch"
>
delete from t_cross_phase
where cross_id = #{crossId} and plan_id = #{schemeId}
</delete>
<delete
id=
"deleteByCrossId"
>
delete from t_cross_phase
where cross_id = #{crossId}
</delete>
<sql
id=
"baseColumn"
>
id,phase_no,name,sort,cross_id,plan_id,ring_no,control_mode,phase_time,green_time,
green_flash_time,ped_flash_time,yellow_time,red_time,min_green_time,max_green_time
</sql>
<select
id=
"selectByCrossIdAndPlanId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"baseColumn"
/>
from t_cross_phase where cross_id = #{crossId} and plan_id = #{planId}
</select>
<select
id=
"selectIdsByPhaseNo"
resultType=
"java.lang.Integer"
>
select id from t_cross_phase
where cross_id = #{crossId} and phase_no = #{phaseNo}
</select>
<select
id=
"selectByCrossId"
resultMap=
"BaseResultMap"
>
select
id
,phase_no
,name
,sort
,cross_id
,plan_id
,ring_no
,group_no
,control_mode
,phase_time
,green_time
,green_flash_time
,ped_flash_time
,yellow_time
,red_time
,min_green_time
,max_green_time
from
t_base_cross_phase
where 1=1
<if
test=
"crossId != null and crossId != ''"
>
and cross_id = #{crossId}
</if>
<if
test=
"schemeId != null and schemeId != ''"
>
and plan_id = #{schemeId}
</if>
id,phase_no,name,sort,cross_id,plan_id,ring_no,control_mode,phase_time,green_time,green_flash_time,ped_flash_time,yellow_time,red_time,min_green_time,max_green_time,gmt_create,gmt_modified
from t_cross_phase
where cross_id = #{crossId}
</select>
</mapper>
wj-databus/src/main/resources/mapper/CrossPlanMapper.xml
View file @
0fb8c68a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.opt.dao.mapper.BaseCrossPlanMapper"
>
<!-- 通用查询映射结果 -->
<mapper
namespace=
"net.wanji.databus.dao.mapper.CrossPlanMapper"
>
<resultMap
type=
"net.wanji.databus.dao.entity.CrossPlanPO"
id=
"BaseResultMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"planNo"
column=
"plan_no"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"crossId"
column=
"cross_id"
/>
<result
property=
"gmtCreate"
column=
"gmt_create"
/>
<result
property=
"gmtModified"
column=
"gmt_modified"
/>
</resultMap>
<!-- 查询计划基础信息列表 -->
<select
id=
"listCrossPlanInfo"
parameterType=
"String"
resultMap=
"BaseResultMap"
>
select
id
,plan_no
,name
,cross_id
from
t_base_cross_plan
where 1=1
<if
test=
"crossId != null and crossId != ''"
>
and cross_id = #{crossId}
</if>
<!--新增数据-->
<insert
id=
"insertOne"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into t_cross_plan(plan_no,name,cross_id)
values (#{planNo},#{name},#{crossId})
</insert>
<insert
id=
"insertBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into t_cross_plan(plan_no,name,cross_id)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.planNo},#{entity.name},#{entity.crossId})
</foreach>
</insert>
<delete
id=
"deleteOne"
>
delete from t_cross_plan
where cross_id = #{crossId} and plan_no = #{planNo}
</delete>
<select
id=
"selectIdByNo"
resultType=
"java.lang.Integer"
>
select id
from t_cross_plan
where cross_id = #{crossId} and plan_no = #{planNo}
</select>
<select
id=
"selectByCrossId"
resultMap=
"BaseResultMap"
>
select
id,plan_no,name,cross_id,gmt_create,gmt_modified
from t_cross_plan
where cross_id = #{crossId}
</select>
<select
id=
"selectByCrossIdAndPlanNo"
resultMap=
"BaseResultMap"
>
select
id,plan_no,name,cross_id,gmt_create,gmt_modified
from t_cross_plan
where cross_id = #{crossId} and plan_no = #{planNo}
</select>
</mapper>
wj-databus/src/main/resources/mapper/CrossSectionMapper.xml
View file @
0fb8c68a
...
...
@@ -9,21 +9,21 @@
<result
property=
"crossId"
column=
"cross_id"
/>
<result
property=
"planId"
column=
"plan_id"
/>
<result
property=
"controlMode"
column=
"control_mode"
/>
<result
property=
"sc
emeId"
column=
"sc
eme_id"
/>
<result
property=
"sc
hemeId"
column=
"sch
eme_id"
/>
<result
property=
"gmtCreate"
column=
"gmt_create"
/>
<result
property=
"gmtModified"
column=
"gmt_modified"
/>
</resultMap>
<insert
id=
"insertOne"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into t_cross_section(section_no, start_time, end_time, cross_id, plan_id, control_mode, sceme_id)
values (#{sectionNo}, #{startTime}, #{endTime}, #{crossId}, #{planId}, #{controlMode}, #{scemeId})
insert into t_cross_section(section_no, start_time, end_time, cross_id, plan_id, control_mode, sc
h
eme_id)
values (#{sectionNo}, #{startTime}, #{endTime}, #{crossId}, #{planId}, #{controlMode}, #{sc
h
emeId})
</insert>
<insert
id=
"insertBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into t_cross_section(section_no,start_time,end_time,cross_id,plan_id,control_mode,sceme_id)
insert into t_cross_section(section_no,start_time,end_time,cross_id,plan_id,control_mode,sc
h
eme_id)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.sectionNo},#{entity.startTime},#{entity.endTime},#{entity.crossId},#{entity.planId},#{entity.controlMode},#{entity.scemeId})
(#{entity.sectionNo},#{entity.startTime},#{entity.endTime},#{entity.crossId},#{entity.planId},#{entity.controlMode},#{entity.sc
h
emeId})
</foreach>
</insert>
...
...
@@ -50,7 +50,7 @@
cross_id,
plan_id,
control_mode,
sceme_id,
sc
h
eme_id,
gmt_create,
gmt_modified
from t_cross_section
...
...
@@ -65,7 +65,7 @@
cross_id,
plan_id,
control_mode,
sceme_id,
sc
h
eme_id,
gmt_create,
gmt_modified
from t_cross_section
...
...
wj-databus/src/main/resources/mapper/SignalStatusLogMapper.xml
View file @
0fb8c68a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.
utc
.mapper.SignalStatusLogMapper"
>
<mapper
namespace=
"net.wanji.
databus.dao
.mapper.SignalStatusLogMapper"
>
<resultMap
type=
"net.wanji.databus.po.SignalStatusLogPO"
id=
"BaseResultMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"signalId"
column=
"signal_id"
/>
...
...
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