<?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.javaweb.geo.mapper.ExceptionConfigMapper">
|
|
<resultMap type="ExceptionConfig" id="ExceptionConfigResult">
|
<result property="ids" column="ids" />
|
<result property="addrDistance" column="addr_distance" />
|
<result property="addrNum1" column="addr_num1" />
|
<result property="addrNum2" column="addr_num2" />
|
<result property="addrMaxDistance" column="addr_max_distance" />
|
<result property="timeSpead" column="time_spead" />
|
<result property="timeNum1" column="time_num1" />
|
<result property="timeNum2" column="time_num2" />
|
<result property="timeMaxSpead" column="time_max_spead" />
|
<result property="userCertifacate" column="user_certifacate" />
|
<result property="userHours" column="user_hours" />
|
</resultMap>
|
|
<sql id="selectExceptionConfigVo">
|
select ids, addr_distance, addr_num1, addr_num2, addr_max_distance, time_spead, time_num1, time_num2, time_max_spead, user_certifacate, user_hours from js_exception_config
|
</sql>
|
|
<select id="selectExceptionConfigList" parameterType="ExceptionConfig" resultMap="ExceptionConfigResult">
|
<include refid="selectExceptionConfigVo"/>
|
<where>
|
<if test="addrDistance != null and addrDistance != ''"> and addr_distance = #{addrDistance}</if>
|
<if test="addrNum1 != null and addrNum1 != ''"> and addr_num1 = #{addrNum1}</if>
|
<if test="addrNum2 != null and addrNum2 != ''"> and addr_num2 = #{addrNum2}</if>
|
<if test="addrMaxDistance != null and addrMaxDistance != ''"> and addr_max_distance = #{addrMaxDistance}</if>
|
<if test="timeSpead != null and timeSpead != ''"> and time_spead = #{timeSpead}</if>
|
<if test="timeNum1 != null and timeNum1 != ''"> and time_num1 = #{timeNum1}</if>
|
<if test="timeNum2 != null and timeNum2 != ''"> and time_num2 = #{timeNum2}</if>
|
<if test="timeMaxSpead != null and timeMaxSpead != ''"> and time_max_spead = #{timeMaxSpead}</if>
|
<if test="userCertifacate != null and userCertifacate != ''"> and user_certifacate = #{userCertifacate}</if>
|
<if test="userHours != null and userHours != ''"> and user_hours = #{userHours}</if>
|
</where>
|
</select>
|
|
<select id="selectExceptionConfigById" parameterType="Long" resultMap="ExceptionConfigResult">
|
<include refid="selectExceptionConfigVo"/>
|
where ids = #{ids}
|
</select>
|
|
<insert id="insertExceptionConfig" parameterType="ExceptionConfig">
|
insert into js_exception_config
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="ids != null ">ids,</if>
|
<if test="addrDistance != null and addrDistance != ''">addr_distance,</if>
|
<if test="addrNum1 != null and addrNum1 != ''">addr_num1,</if>
|
<if test="addrNum2 != null and addrNum2 != ''">addr_num2,</if>
|
<if test="addrMaxDistance != null and addrMaxDistance != ''">addr_max_distance,</if>
|
<if test="timeSpead != null and timeSpead != ''">time_spead,</if>
|
<if test="timeNum1 != null and timeNum1 != ''">time_num1,</if>
|
<if test="timeNum2 != null and timeNum2 != ''">time_num2,</if>
|
<if test="timeMaxSpead != null and timeMaxSpead != ''">time_max_spead,</if>
|
<if test="userCertifacate != null and userCertifacate != ''">user_certifacate,</if>
|
<if test="userHours != null and userHours != ''">user_hours,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="ids != null ">#{ids},</if>
|
<if test="addrDistance != null and addrDistance != ''">#{addrDistance},</if>
|
<if test="addrNum1 != null and addrNum1 != ''">#{addrNum1},</if>
|
<if test="addrNum2 != null and addrNum2 != ''">#{addrNum2},</if>
|
<if test="addrMaxDistance != null and addrMaxDistance != ''">#{addrMaxDistance},</if>
|
<if test="timeSpead != null and timeSpead != ''">#{timeSpead},</if>
|
<if test="timeNum1 != null and timeNum1 != ''">#{timeNum1},</if>
|
<if test="timeNum2 != null and timeNum2 != ''">#{timeNum2},</if>
|
<if test="timeMaxSpead != null and timeMaxSpead != ''">#{timeMaxSpead},</if>
|
<if test="userCertifacate != null and userCertifacate != ''">#{userCertifacate},</if>
|
<if test="userHours != null and userHours != ''">#{userHours},</if>
|
</trim>
|
</insert>
|
|
<update id="updateExceptionConfig" parameterType="ExceptionConfig">
|
update js_exception_config
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="addrDistance != null and addrDistance != ''">addr_distance = #{addrDistance},</if>
|
<if test="addrNum1 != null and addrNum1 != ''">addr_num1 = #{addrNum1},</if>
|
<if test="addrNum2 != null and addrNum2 != ''">addr_num2 = #{addrNum2},</if>
|
<if test="addrMaxDistance != null and addrMaxDistance != ''">addr_max_distance = #{addrMaxDistance},</if>
|
<if test="timeSpead != null and timeSpead != ''">time_spead = #{timeSpead},</if>
|
<if test="timeNum1 != null and timeNum1 != ''">time_num1 = #{timeNum1},</if>
|
<if test="timeNum2 != null and timeNum2 != ''">time_num2 = #{timeNum2},</if>
|
<if test="timeMaxSpead != null and timeMaxSpead != ''">time_max_spead = #{timeMaxSpead},</if>
|
<if test="userCertifacate != null and userCertifacate != ''">user_certifacate = #{userCertifacate},</if>
|
<if test="userHours != null and userHours != ''">user_hours = #{userHours},</if>
|
</trim>
|
where ids = #{ids}
|
</update>
|
|
<delete id="deleteExceptionConfigById" parameterType="Long">
|
delete from js_exception_config where ids = #{ids}
|
</delete>
|
|
<delete id="deleteExceptionConfigByIds" parameterType="String">
|
delete from js_exception_config where ids in
|
<foreach item="ids" collection="array" open="(" separator="," close=")">
|
#{ids}
|
</foreach>
|
</delete>
|
|
</mapper>
|