济菏高速数据中心代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

82 lines
3.9 KiB

<?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="com.zc.business.mapper.DcEventTrafficControlMapper">
<resultMap type="com.zc.business.domain.DcEventTrafficControl" id="DcEventTrafficControlResult">
<result property="id" column="id" />
<result property="controlType" column="control_type" />
<result property="controlCause" column="control_cause" />
<result property="exitsInlets" column="exits_inlets" />
<result property="facilityId" column="facility_id" />
<result property="rampId" column="ramp_id" />
<result property="rampId" column="road_id" />
</resultMap>
<sql id="selectDcEventTrafficControlVo">
select id, control_type, control_cause, exits_inlets, facility_id, ramp_id,road_id from dc_event_traffic_control
</sql>
<select id="selectDcEventTrafficControlList" parameterType="DcEventTrafficControl" resultMap="DcEventTrafficControlResult">
<include refid="selectDcEventTrafficControlVo"/>
<where>
<if test="controlType != null "> and control_type = #{controlType}</if>
<if test="controlCause != null "> and control_cause = #{controlCause}</if>
<if test="exitsInlets != null "> and exits_inlets = #{exitsInlets}</if>
<if test="facilityId != null "> and facility_id = #{facilityId}</if>
<if test="rampId != null "> and ramp_id = #{rampId}</if>
</where>
</select>
<select id="selectDcEventTrafficControlById" parameterType="String" resultMap="DcEventTrafficControlResult">
<include refid="selectDcEventTrafficControlVo"/>
where id = #{id}
</select>
<insert id="insertDcEventTrafficControl" parameterType="DcEventTrafficControl">
insert into dc_event_traffic_control
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="controlType != null">control_type,</if>
<if test="controlCause != null">control_cause,</if>
<if test="exitsInlets != null">exits_inlets,</if>
<if test="facilityId != null">facility_id,</if>
<if test="rampId != null">ramp_id,</if>
<if test="roadId != null">road_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="controlType != null">#{controlType},</if>
<if test="controlCause != null">#{controlCause},</if>
<if test="exitsInlets != null">#{exitsInlets},</if>
<if test="facilityId != null">#{facilityId},</if>
<if test="rampId != null">#{rampId},</if>
<if test="roadId != null">#{roadId},</if>
</trim>
</insert>
<update id="updateDcEventTrafficControl" parameterType="DcEventTrafficControl">
update dc_event_traffic_control
<trim prefix="SET" suffixOverrides=",">
<if test="controlType != null">control_type = #{controlType},</if>
<if test="controlCause != null">control_cause = #{controlCause},</if>
<if test="exitsInlets != null">exits_inlets = #{exitsInlets},</if>
<if test="facilityId != null">facility_id = #{facilityId},</if>
<if test="rampId != null">ramp_id = #{rampId},</if>
<if test="roadId != null">road_id = #{roadId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcEventTrafficControlById" parameterType="String">
delete from dc_event_traffic_control where id = #{id}
</delete>
<delete id="deleteDcEventTrafficControlByIds" parameterType="String">
delete from dc_event_traffic_control where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>