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.
155 lines
9.2 KiB
155 lines
9.2 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.DcEventHistoryMapper">
|
|
|
|
<resultMap type="com.zc.business.domain.DcEventHistory" id="DcEventHistoryResult">
|
|
<result property="id" column="id" />
|
|
<result property="groupId" column="group_id" />
|
|
<result property="stakeMark" column="stake_mark" />
|
|
<result property="direction" column="direction" />
|
|
<result property="roadId" column="road_id" />
|
|
<result property="startTime" column="start_time" />
|
|
<result property="endTime" column="end_time" />
|
|
<result property="eventLevel" column="event_level" />
|
|
<result property="eventCategory" column="event_category" />
|
|
<result property="eventType" column="event_type" />
|
|
<result property="eventSubclass" column="event_subclass" />
|
|
<result property="eventCause" column="event_cause" />
|
|
<result property="impactLevel" column="impact_level" />
|
|
<result property="description" column="description" />
|
|
<result property="handlingPerson" column="handling_person" />
|
|
<result property="handlingResult" column="handling_result" />
|
|
<result property="otherConfig" column="other_config" />
|
|
<result property="eventSource" column="event_source" />
|
|
<result property="eventNature" column="event_nature" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDcEventHistoryVo">
|
|
select id, group_id, stake_mark, direction, road_id, start_time, end_time, event_level, event_category, event_type, event_subclass, event_cause, impact_level, description, handling_person, handling_result, other_config, event_source, event_nature, remark, create_time, update_time from dc_event_history
|
|
</sql>
|
|
|
|
<select id="selectDcEventHistoryList" parameterType="DcEventHistory" resultMap="DcEventHistoryResult">
|
|
<include refid="selectDcEventHistoryVo"/>
|
|
<where>
|
|
<if test="groupId != null "> and group_id = #{groupId}</if>
|
|
<if test="stakeMark != null and stakeMark != ''"> and stake_mark = #{stakeMark}</if>
|
|
<if test="direction != null and direction != ''"> and direction = #{direction}</if>
|
|
<if test="roadId != null "> and road_id = #{roadId}</if>
|
|
<if test="startTime != null "> and start_time = #{startTime}</if>
|
|
<if test="endTime != null "> and end_time = #{endTime}</if>
|
|
<if test="eventLevel != null "> and event_level = #{eventLevel}</if>
|
|
<if test="eventCategory != null "> and event_category = #{eventCategory}</if>
|
|
<if test="eventType != null "> and event_type = #{eventType}</if>
|
|
<if test="eventSubclass != null "> and event_subclass = #{eventSubclass}</if>
|
|
<if test="eventCause != null and eventCause != ''"> and event_cause = #{eventCause}</if>
|
|
<if test="impactLevel != null "> and impact_level = #{impactLevel}</if>
|
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
|
<if test="handlingPerson != null "> and handling_person = #{handlingPerson}</if>
|
|
<if test="handlingResult != null "> and handling_result = #{handlingResult}</if>
|
|
<if test="otherConfig != null and otherConfig != ''"> and other_config = #{otherConfig}</if>
|
|
<if test="eventSource != null "> and event_source = #{eventSource}</if>
|
|
<if test="eventNature != null "> and event_nature = #{eventNature}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDcEventHistoryById" parameterType="String" resultMap="DcEventHistoryResult">
|
|
<include refid="selectDcEventHistoryVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertDcEventHistory" parameterType="DcEventHistory">
|
|
insert into dc_event_history
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="groupId != null">group_id,</if>
|
|
<if test="stakeMark != null and stakeMark != ''">stake_mark,</if>
|
|
<if test="direction != null and direction != ''">direction,</if>
|
|
<if test="roadId != null">road_id,</if>
|
|
<if test="startTime != null">start_time,</if>
|
|
<if test="endTime != null">end_time,</if>
|
|
<if test="eventLevel != null">event_level,</if>
|
|
<if test="eventCategory != null">event_category,</if>
|
|
<if test="eventType != null">event_type,</if>
|
|
<if test="eventSubclass != null">event_subclass,</if>
|
|
<if test="eventCause != null">event_cause,</if>
|
|
<if test="impactLevel != null">impact_level,</if>
|
|
<if test="description != null">description,</if>
|
|
<if test="handlingPerson != null">handling_person,</if>
|
|
<if test="handlingResult != null">handling_result,</if>
|
|
<if test="otherConfig != null">other_config,</if>
|
|
<if test="eventSource != null">event_source,</if>
|
|
<if test="eventNature != null">event_nature,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="groupId != null">#{groupId},</if>
|
|
<if test="stakeMark != null and stakeMark != ''">#{stakeMark},</if>
|
|
<if test="direction != null and direction != ''">#{direction},</if>
|
|
<if test="roadId != null">#{roadId},</if>
|
|
<if test="startTime != null">#{startTime},</if>
|
|
<if test="endTime != null">#{endTime},</if>
|
|
<if test="eventLevel != null">#{eventLevel},</if>
|
|
<if test="eventCategory != null">#{eventCategory},</if>
|
|
<if test="eventType != null">#{eventType},</if>
|
|
<if test="eventSubclass != null">#{eventSubclass},</if>
|
|
<if test="eventCause != null">#{eventCause},</if>
|
|
<if test="impactLevel != null">#{impactLevel},</if>
|
|
<if test="description != null">#{description},</if>
|
|
<if test="handlingPerson != null">#{handlingPerson},</if>
|
|
<if test="handlingResult != null">#{handlingResult},</if>
|
|
<if test="otherConfig != null">#{otherConfig},</if>
|
|
<if test="eventSource != null">#{eventSource},</if>
|
|
<if test="eventNature != null">#{eventNature},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDcEventHistory" parameterType="DcEventHistory">
|
|
update dc_event_history
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="groupId != null">group_id = #{groupId},</if>
|
|
<if test="stakeMark != null and stakeMark != ''">stake_mark = #{stakeMark},</if>
|
|
<if test="direction != null and direction != ''">direction = #{direction},</if>
|
|
<if test="roadId != null">road_id = #{roadId},</if>
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
|
<if test="endTime != null">end_time = #{endTime},</if>
|
|
<if test="eventLevel != null">event_level = #{eventLevel},</if>
|
|
<if test="eventCategory != null">event_category = #{eventCategory},</if>
|
|
<if test="eventType != null">event_type = #{eventType},</if>
|
|
<if test="eventSubclass != null">event_subclass = #{eventSubclass},</if>
|
|
<if test="eventCause != null">event_cause = #{eventCause},</if>
|
|
<if test="impactLevel != null">impact_level = #{impactLevel},</if>
|
|
<if test="description != null">description = #{description},</if>
|
|
<if test="handlingPerson != null">handling_person = #{handlingPerson},</if>
|
|
<if test="handlingResult != null">handling_result = #{handlingResult},</if>
|
|
<if test="otherConfig != null">other_config = #{otherConfig},</if>
|
|
<if test="eventSource != null">event_source = #{eventSource},</if>
|
|
<if test="eventNature != null">event_nature = #{eventNature},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDcEventHistoryById" parameterType="String">
|
|
delete from dc_event_history where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDcEventHistoryByIds" parameterType="String">
|
|
delete from dc_event_history where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|