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.
103 lines
6.3 KiB
103 lines
6.3 KiB
1 year ago
|
<?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.DcEventConstructionMapper">
|
||
|
|
||
|
<resultMap type="DcEventConstruction" id="DcEventConstructionResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="controlMode" column="control_mode" />
|
||
|
<result property="locationType" column="location_type" />
|
||
|
<result property="specialPlaceDescription" column="special_place_description" />
|
||
|
<result property="specialConstruction" column="special_construction" />
|
||
|
<result property="otherConstructionName" column="other_construction_name" />
|
||
|
<result property="constructionMeasurement" column="construction_measurement" />
|
||
|
<result property="facilityId" column="facility_id" />
|
||
|
<result property="exitsInlets" column="exits_inlets" />
|
||
|
<result property="laneOccupancy" column="lane_occupancy" />
|
||
|
<result property="trafficCondition" column="traffic_condition" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectDcEventConstructionVo">
|
||
|
select id, control_mode, location_type, special_place_description, special_construction, other_construction_name, construction_measurement, facility_id, exits_inlets, lane_occupancy, traffic_condition from dc_event_construction
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectDcEventConstructionList" parameterType="DcEventConstruction" resultMap="DcEventConstructionResult">
|
||
|
<include refid="selectDcEventConstructionVo"/>
|
||
|
<where>
|
||
|
<if test="controlMode != null "> and control_mode = #{controlMode}</if>
|
||
|
<if test="locationType != null "> and location_type = #{locationType}</if>
|
||
|
<if test="specialPlaceDescription != null and specialPlaceDescription != ''"> and special_place_description = #{specialPlaceDescription}</if>
|
||
|
<if test="specialConstruction != null "> and special_construction = #{specialConstruction}</if>
|
||
|
<if test="otherConstructionName != null and otherConstructionName != ''"> and other_construction_name like concat('%', #{otherConstructionName}, '%')</if>
|
||
|
<if test="constructionMeasurement != null "> and construction_measurement = #{constructionMeasurement}</if>
|
||
|
<if test="facilityId != null "> and facility_id = #{facilityId}</if>
|
||
|
<if test="exitsInlets != null "> and exits_inlets = #{exitsInlets}</if>
|
||
|
<if test="laneOccupancy != null and laneOccupancy != ''"> and lane_occupancy = #{laneOccupancy}</if>
|
||
|
<if test="trafficCondition != null "> and traffic_condition = #{trafficCondition}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectDcEventConstructionById" parameterType="String" resultMap="DcEventConstructionResult">
|
||
|
<include refid="selectDcEventConstructionVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertDcEventConstruction" parameterType="DcEventConstruction">
|
||
|
insert into dc_event_construction
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">id,</if>
|
||
|
<if test="controlMode != null">control_mode,</if>
|
||
|
<if test="locationType != null">location_type,</if>
|
||
|
<if test="specialPlaceDescription != null">special_place_description,</if>
|
||
|
<if test="specialConstruction != null">special_construction,</if>
|
||
|
<if test="otherConstructionName != null">other_construction_name,</if>
|
||
|
<if test="constructionMeasurement != null">construction_measurement,</if>
|
||
|
<if test="facilityId != null">facility_id,</if>
|
||
|
<if test="exitsInlets != null">exits_inlets,</if>
|
||
|
<if test="laneOccupancy != null">lane_occupancy,</if>
|
||
|
<if test="trafficCondition != null">traffic_condition,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">#{id},</if>
|
||
|
<if test="controlMode != null">#{controlMode},</if>
|
||
|
<if test="locationType != null">#{locationType},</if>
|
||
|
<if test="specialPlaceDescription != null">#{specialPlaceDescription},</if>
|
||
|
<if test="specialConstruction != null">#{specialConstruction},</if>
|
||
|
<if test="otherConstructionName != null">#{otherConstructionName},</if>
|
||
|
<if test="constructionMeasurement != null">#{constructionMeasurement},</if>
|
||
|
<if test="facilityId != null">#{facilityId},</if>
|
||
|
<if test="exitsInlets != null">#{exitsInlets},</if>
|
||
|
<if test="laneOccupancy != null">#{laneOccupancy},</if>
|
||
|
<if test="trafficCondition != null">#{trafficCondition},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateDcEventConstruction" parameterType="DcEventConstruction">
|
||
|
update dc_event_construction
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="controlMode != null">control_mode = #{controlMode},</if>
|
||
|
<if test="locationType != null">location_type = #{locationType},</if>
|
||
|
<if test="specialPlaceDescription != null">special_place_description = #{specialPlaceDescription},</if>
|
||
|
<if test="specialConstruction != null">special_construction = #{specialConstruction},</if>
|
||
|
<if test="otherConstructionName != null">other_construction_name = #{otherConstructionName},</if>
|
||
|
<if test="constructionMeasurement != null">construction_measurement = #{constructionMeasurement},</if>
|
||
|
<if test="facilityId != null">facility_id = #{facilityId},</if>
|
||
|
<if test="exitsInlets != null">exits_inlets = #{exitsInlets},</if>
|
||
|
<if test="laneOccupancy != null">lane_occupancy = #{laneOccupancy},</if>
|
||
|
<if test="trafficCondition != null">traffic_condition = #{trafficCondition},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteDcEventConstructionById" parameterType="String">
|
||
|
delete from dc_event_construction where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteDcEventConstructionByIds" parameterType="String">
|
||
|
delete from dc_event_construction where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|