68 lines
3.0 KiB
68 lines
3.0 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.DcEventServiceAreaMapper">
|
||
|
|
||
|
<resultMap type="DcEventServiceArea" id="DcEventServiceAreaResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="exitsInlets" column="exits_inlets" />
|
||
|
<result property="facilityId" column="facility_id" />
|
||
|
<result property="disableFacility" column="disable_facility" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectDcEventServiceAreaVo">
|
||
|
select id, exits_inlets, facility_id, disable_facility from dc_event_service_area
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectDcEventServiceAreaList" parameterType="DcEventServiceArea" resultMap="DcEventServiceAreaResult">
|
||
|
<include refid="selectDcEventServiceAreaVo"/>
|
||
|
<where>
|
||
|
<if test="exitsInlets != null "> and exits_inlets = #{exitsInlets}</if>
|
||
|
<if test="facilityId != null "> and facility_id = #{facilityId}</if>
|
||
|
<if test="disableFacility != null "> and disable_facility = #{disableFacility}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectDcEventServiceAreaById" parameterType="String" resultMap="DcEventServiceAreaResult">
|
||
|
<include refid="selectDcEventServiceAreaVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertDcEventServiceArea" parameterType="DcEventServiceArea">
|
||
|
insert into dc_event_service_area
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">id,</if>
|
||
|
<if test="exitsInlets != null">exits_inlets,</if>
|
||
|
<if test="facilityId != null">facility_id,</if>
|
||
|
<if test="disableFacility != null">disable_facility,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">#{id},</if>
|
||
|
<if test="exitsInlets != null">#{exitsInlets},</if>
|
||
|
<if test="facilityId != null">#{facilityId},</if>
|
||
|
<if test="disableFacility != null">#{disableFacility},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateDcEventServiceArea" parameterType="DcEventServiceArea">
|
||
|
update dc_event_service_area
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="exitsInlets != null">exits_inlets = #{exitsInlets},</if>
|
||
|
<if test="facilityId != null">facility_id = #{facilityId},</if>
|
||
|
<if test="disableFacility != null">disable_facility = #{disableFacility},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteDcEventServiceAreaById" parameterType="String">
|
||
|
delete from dc_event_service_area where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteDcEventServiceAreaByIds" parameterType="String">
|
||
|
delete from dc_event_service_area where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|