Commit 0fb8c68a authored by duanruiming's avatar duanruiming

[update] 路径优化

parent 2942e5a1
<?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="schemeId" column="plan_id"/>
<result property="planId" 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>
<?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>
......@@ -9,21 +9,21 @@
<result property="crossId" column="cross_id"/>
<result property="planId" column="plan_id"/>
<result property="controlMode" column="control_mode"/>
<result property="scemeId" column="sceme_id"/>
<result property="schemeId" column="scheme_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, scheme_id)
values (#{sectionNo}, #{startTime}, #{endTime}, #{crossId}, #{planId}, #{controlMode}, #{schemeId})
</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,scheme_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.schemeId})
</foreach>
</insert>
......@@ -50,7 +50,7 @@
cross_id,
plan_id,
control_mode,
sceme_id,
scheme_id,
gmt_create,
gmt_modified
from t_cross_section
......@@ -65,7 +65,7 @@
cross_id,
plan_id,
control_mode,
sceme_id,
scheme_id,
gmt_create,
gmt_modified
from t_cross_section
......
<?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"/>
......
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