zhwl/zhwl-business/zhwl-scenic/target/classes/mapper/scenic/ZdyPointMapMapper.xml

254 lines
11 KiB
XML
Raw Normal View History

2025-07-01 17:54:58 +08:00
<?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.zhwl.scenic.mapper.ZdyPointMapMapper">
<resultMap type="ZdyPointMap" id="ZdyPointMapResult">
<result property="id" column="id"/>
<result property="mapName" column="map_name"/>
<result property="image" column="image"/>
<result property="zoomType" column="zoom_type"/>
<result property="zoomLevel" column="zoom_level"/>
<result property="coordinateType" column="coordinate_type"/>
<result property="centerLongitude" column="center_longitude"/>
<result property="centerLatitude" column="center_latitude"/>
<result property="leftLongitude" column="left_longitude"/>
<result property="leftLatitude" column="left_latitude"/>
<result property="rightLongitude" column="right_longitude"/>
<result property="rightLatitude" column="right_latitude"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="delFlag" column="del_flag"/>
<result property="deptId" column="dept_id"/>
</resultMap>
<resultMap type="ZdyPointMapVO" id="ZdyPointMapVOResult">
<result property="id" column="id"/>
<result property="mapName" column="map_name"/>
<result property="image" column="image"/>
<result property="zoomType" column="zoom_type"/>
<result property="zoomLevel" column="zoom_level"/>
<result property="coordinateType" column="coordinate_type"/>
<result property="centerLongitude" column="center_longitude"/>
<result property="centerLatitude" column="center_latitude"/>
<result property="leftLongitude" column="left_longitude"/>
<result property="leftLatitude" column="left_latitude"/>
<result property="rightLongitude" column="right_longitude"/>
<result property="rightLatitude" column="right_latitude"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="delFlag" column="del_flag"/>
<result property="deptId" column="dept_id"/>
<result property="scenicName" column="scenic_name"/>
</resultMap>
<sql id="selectZdyPointMapVo">
select a.id,
a.map_name,
a.image,
a.zoom_type,
a.zoom_level,
a.coordinate_type,
a.center_longitude,
a.center_latitude,
a.left_longitude,
a.left_latitude,
a.right_longitude,
a.right_latitude,
a.create_time,
a.create_by,
a.update_time,
a.update_by,
a.del_flag,
a.dept_id
from zdy_point_map a
left join sys_dept d on d.dept_id = a.dept_id
</sql>
<select id="selectZdyPointMapList" parameterType="ZdyPointMap" resultMap="ZdyPointMapVOResult">
select a.id, a.map_name, a.image, a.zoom_type, a.zoom_level, a.coordinate_type,
a.center_longitude,a.center_latitude, a.left_longitude, a.left_latitude, a.right_longitude, a.right_latitude,
a.create_time, a.create_by, a.update_time, a.update_by, a.del_flag,a.dept_id,s.scenic_name
from zdy_point_map a
left join zdy_scenic s on a.dept_id = s.dept_id
<where>
<if test="mapName != null and mapName != ''">
and a.map_name like concat('%', #{mapName}, '%')
</if>
<if test="image != null and image != ''">
and a.image = #{image}
</if>
<if test="zoomType != null and zoomType != ''">
and a.zoom_type = #{zoomType}
</if>
<if test="zoomLevel != null and zoomLevel != ''">
and a.zoom_level = #{zoomLevel}
</if>
<if test="coordinateType != null and coordinateType != ''">
and a.coordinate_type = #{coordinateType}
</if>
<if test="centerLongitude != null and centerLongitude != ''">
and a.center_longitude = #{centerLongitude}
</if>
<if test="centerLatitude != null and centerLatitude != ''">
and a.center_latitude = #{centerLatitude}
</if>
<if test="leftLongitude != null and leftLongitude != ''">
and a.left_longitude = #{leftLongitude}
</if>
<if test="leftLatitude != null and leftLatitude != ''">
and a.left_latitude = #{leftLatitude}
</if>
<if test="rightLongitude != null and rightLongitude != ''">
and a.right_longitude = #{rightLongitude}
</if>
<if test="rightLatitude != null and rightLatitude != ''">
and a.right_latitude = #{rightLatitude}
</if>
<if test="deptId != null">
and a.dept_id = #{deptId}
</if>
${params.dataScope}
and a.del_flag = '0'
</where>
</select>
<select id="selectZdyPointMapById" parameterType="Long"
resultMap="ZdyPointMapResult">
<include refid="selectZdyPointMapVo"/>
where a.id = #{id} and a.del_flag = '0'
</select>
<insert id="insertZdyPointMap" parameterType="ZdyPointMap" useGeneratedKeys="true" keyProperty="id">
insert into zdy_point_map
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="mapName != null and mapName != ''">map_name,
</if>
<if test="image != null and image != ''">image,
</if>
<if test="zoomType != null and zoomType != ''">zoom_type,
</if>
<if test="zoomLevel != null and zoomLevel != ''">zoom_level,
</if>
<if test="coordinateType != null and coordinateType != ''">coordinate_type,
</if>
<if test="centerLongitude != null and centerLongitude != ''">center_longitude,
</if>
<if test="centerLatitude != null and centerLatitude != ''">center_latitude,
</if>
<if test="leftLongitude != null and leftLongitude != ''">left_longitude,
</if>
<if test="leftLatitude != null and leftLatitude != ''">left_latitude,
</if>
<if test="rightLongitude != null and rightLongitude != ''">right_longitude,
</if>
<if test="rightLatitude != null and rightLatitude != ''">right_latitude,
</if>
<if test="createBy != null">create_by,
</if>
<if test="deptId != null">dept_id,
</if>
create_time,del_flag,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="mapName != null and mapName != ''">#{mapName},
</if>
<if test="image != null and image != ''">#{image},
</if>
<if test="zoomType != null and zoomType != ''">#{zoomType},
</if>
<if test="zoomLevel != null and zoomLevel != ''">#{zoomLevel},
</if>
<if test="coordinateType != null and coordinateType != ''">#{coordinateType},
</if>
<if test="centerLongitude != null and centerLongitude != ''">#{centerLongitude},
</if>
<if test="centerLatitude != null and centerLatitude != ''">#{center_latitude},
</if>
<if test="leftLongitude != null and leftLongitude != ''">#{leftLongitude},
</if>
<if test="leftLatitude != null and leftLatitude != ''">#{leftLatitude},
</if>
<if test="rightLongitude != null and rightLongitude != ''">#{rightLongitude},
</if>
<if test="rightLatitude != null and rightLatitude != ''">#{rightLatitude},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="deptId != null">#{deptId},
</if>
sysdate(), '0',
</trim>
</insert>
<update id="updateZdyPointMap" parameterType="ZdyPointMap">
update zdy_point_map
<trim prefix="SET" suffixOverrides=",">
<if test="mapName != null">map_name =
#{mapName},
</if>
<if test="image != null">image =
#{image},
</if>
<if test="zoomType != null">zoom_type =
#{zoomType},
</if>
<if test="zoomLevel != null">zoom_level =
#{zoomLevel},
</if>
<if test="coordinateType != null">coordinate_type =
#{coordinateType},
</if>
<if test="centerLongitude != null">center_longitude =
#{centerLongitude},
</if>
<if test="centerLatitude != null">center_latitude =
#{centerLatitude},
</if>
<if test="leftLongitude != null">left_longitude =
#{leftLongitude},
</if>
<if test="leftLatitude != null">left_latitude =
#{leftLatitude},
</if>
<if test="rightLongitude != null">right_longitude =
#{rightLongitude},
</if>
<if test="rightLatitude != null">right_latitude =
#{rightLatitude},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="deptId != null">dept_id =
#{deptId},
</if>
update_time = sysdate(),
</trim>
where id = #{id}
</update>
<delete id="deleteZdyPointMapById" parameterType="Long">
delete
from zdy_point_map
where id = #{id}
</delete>
<delete id="deleteZdyPointMapByIds" parameterType="String">
delete from zdy_point_map where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectZdyPointMapByDeptId" parameterType="Long"
resultMap="ZdyPointMapResult">
<include refid="selectZdyPointMapVo"/>
where a.dept_id = #{deptId} and a.del_flag = '0' limit 1
</select>
</mapper>