济菏高速数据中心代码
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.
 
 
 
 
 

73 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.DcEventAbnormalWeatherMapper">
<resultMap type="com.zc.business.domain.DcEventAbnormalWeather" id="DcEventAbnormalWeatherResult">
<result property="id" column="id" />
<result property="weatherSituation" column="weather_situation" />
<result property="emergencyLevel" column="emergency_level" />
<result property="endStakeMark" column="end_stake_mark" />
<result property="numericalValue" column="numerical_value" />
</resultMap>
<sql id="selectDcEventAbnormalWeatherVo">
select numerical_value,id, weather_situation, emergency_level, end_stake_mark from dc_event_abnormal_weather
</sql>
<select id="selectDcEventAbnormalWeatherList" parameterType="DcEventAbnormalWeather" resultMap="DcEventAbnormalWeatherResult">
<include refid="selectDcEventAbnormalWeatherVo"/>
<where>
<if test="weatherSituation != null and weatherSituation != ''"> and weather_situation = #{weatherSituation}</if>
<if test="emergencyLevel != null "> and emergency_level = #{emergencyLevel}</if>
<if test="endStakeMark != null and endStakeMark != ''"> and end_stake_mark = #{endStakeMark}</if>
<if test="numericalValue != null and numericalValue != ''"> and numerical_value = #{numericalValue}</if>
</where>
</select>
<select id="selectDcEventAbnormalWeatherById" parameterType="String" resultMap="DcEventAbnormalWeatherResult">
<include refid="selectDcEventAbnormalWeatherVo"/>
where id = #{id}
</select>
<insert id="insertDcEventAbnormalWeather" parameterType="DcEventAbnormalWeather">
insert into dc_event_abnormal_weather
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="weatherSituation != null and weatherSituation != ''">weather_situation,</if>
<if test="emergencyLevel != null">emergency_level,</if>
<if test="endStakeMark != null and endStakeMark != ''">end_stake_mark,</if>
<if test="numericalValue != null and numericalValue != ''">numerical_value,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="weatherSituation != null and weatherSituation != ''">#{weatherSituation},</if>
<if test="emergencyLevel != null">#{emergencyLevel},</if>
<if test="endStakeMark != null and endStakeMark != ''">#{endStakeMark},</if>
<if test="numericalValue != null and numericalValue != ''">#{numericalValue},</if>
</trim>
</insert>
<update id="updateDcEventAbnormalWeather" parameterType="DcEventAbnormalWeather">
update dc_event_abnormal_weather
<trim prefix="SET" suffixOverrides=",">
<if test="weatherSituation != null and weatherSituation != ''">weather_situation = #{weatherSituation},</if>
<if test="emergencyLevel != null">emergency_level = #{emergencyLevel},</if>
<if test="endStakeMark != null and endStakeMark != ''">end_stake_mark = #{endStakeMark},</if>
<if test="numericalValue != null and numericalValue != ''">numerical_value = #{numericalValue},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcEventAbnormalWeatherById" parameterType="String">
delete from dc_event_abnormal_weather where id = #{id}
</delete>
<delete id="deleteDcEventAbnormalWeatherByIds" parameterType="String">
delete from dc_event_abnormal_weather where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>