<?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.ruoyi.sy.mapper.ArdTankWallMapper">
|
|
<resultMap type="ArdTankWall" id="ArdTankWallResult">
|
<result property="id" column="id" />
|
<result property="wallName" column="wall_name" />
|
<result property="longitude" column="longitude" />
|
<result property="latitude" column="latitude" />
|
<result property="distance" column="distance" />
|
</resultMap>
|
|
<sql id="selectArdTankWallVo">
|
select id, wall_name, longitude, latitude, distance from ard_tank_wall
|
</sql>
|
|
<select id="selectArdTankWallList" parameterType="ArdTankWall" resultMap="ArdTankWallResult">
|
<include refid="selectArdTankWallVo"/>
|
<where>
|
<if test="wallName != null and wallName != ''"> and wall_name like '%'||#{wallName}||'%'</if>
|
<if test="longitude != null "> and longitude = #{longitude}</if>
|
<if test="latitude != null "> and latitude = #{latitude}</if>
|
<if test="distance != null "> and distance = #{distance}</if>
|
</where>
|
</select>
|
|
<select id="selectArdTankWallById" parameterType="String" resultMap="ArdTankWallResult">
|
<include refid="selectArdTankWallVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertArdTankWall" parameterType="ArdTankWall">
|
insert into ard_tank_wall
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="wallName != null">wall_name,</if>
|
<if test="longitude != null">longitude,</if>
|
<if test="latitude != null">latitude,</if>
|
<if test="distance != null">distance,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="wallName != null">#{wallName},</if>
|
<if test="longitude != null">#{longitude},</if>
|
<if test="latitude != null">#{latitude},</if>
|
<if test="distance != null">#{distance},</if>
|
</trim>
|
</insert>
|
|
<update id="updateArdTankWall" parameterType="ArdTankWall">
|
update ard_tank_wall
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="wallName != null">wall_name = #{wallName},</if>
|
<if test="longitude != null">longitude = #{longitude},</if>
|
<if test="latitude != null">latitude = #{latitude},</if>
|
<if test="distance != null">distance = #{distance},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdTankWallById" parameterType="String">
|
delete from ard_tank_wall where id = #{id}
|
</delete>
|
|
<delete id="deleteArdTankWallByIds" parameterType="String">
|
delete from ard_tank_wall where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|