支付
This commit is contained in:
@@ -0,0 +1,285 @@
|
||||
<?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.ZdyPointDataMapper">
|
||||
|
||||
<resultMap type="ZdyPointData" id="ZdyPointDataResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="pointMapId" column="point_map_id"/>
|
||||
<result property="pointTypeId" column="point_type_id"/>
|
||||
<result property="pointName" column="point_name"/>
|
||||
<result property="spotId" column="spot_id"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="blurb" column="blurb"/>
|
||||
<result property="audioGuideUrl" column="audio_guide_url"/>
|
||||
<result property="association" column="association"/>
|
||||
<result property="associationType" column="association_type"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
<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"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyPointDataVo">
|
||||
select id,point_map_id, point_type_id, point_name, spot_id,image, longitude, latitude, blurb, audio_guide_url,association, association_type, ticket_id, create_time, create_by, update_time, update_by, del_flag
|
||||
from zdy_point_data
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyPointDataList" parameterType="ZdyPointData" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
<where>
|
||||
<if test="pointMapId != null ">
|
||||
and point_map_id = #{pointMapId}
|
||||
</if>
|
||||
<if test="pointTypeId != null ">
|
||||
and point_type_id = #{pointTypeId}
|
||||
</if>
|
||||
<if test="pointName != null and pointName != ''">
|
||||
and point_name like concat('%', #{pointName}, '%')
|
||||
</if>
|
||||
<if test="image != null and image != ''">
|
||||
and image = #{image}
|
||||
</if>
|
||||
<if test="spotId != null">
|
||||
and spot_id = #{spotId}
|
||||
</if>
|
||||
<if test="longitude != null and longitude != ''">
|
||||
and longitude = #{longitude}
|
||||
</if>
|
||||
<if test="latitude != null and latitude != ''">
|
||||
and latitude = #{latitude}
|
||||
</if>
|
||||
<if test="blurb != null and blurb != ''">
|
||||
and blurb = #{blurb}
|
||||
</if>
|
||||
<if test="audioGuideUrl != null and audioGuideUrl != ''">
|
||||
and audio_guide_url = #{audioGuideUrl}
|
||||
</if>
|
||||
<if test="association != null and association != ''">
|
||||
and association = #{association}
|
||||
</if>
|
||||
<if test="associationType != null and associationType != ''">
|
||||
and association_type = #{associationType}
|
||||
</if>
|
||||
<if test="ticketId != null ">
|
||||
and ticket_id = #{ticketId}
|
||||
</if>
|
||||
and del_flag = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointDataByPointTypeIds" parameterType="String" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
where del_flag = '0' and point_type_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointDataByPointMapIds" parameterType="String" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
where del_flag = '0' and point_map_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointDataById" parameterType="Long" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
where id = #{id} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointDataBySpotIds" parameterType="String" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
where del_flag = '0' and spot_id in
|
||||
<foreach item="spotId" collection="array" open="(" separator="," close=")">
|
||||
#{spotId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointDataBySpotId" parameterType="Long" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
where del_flag = '0' and spot_id = #{spotId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectZdyPointDataByName" parameterType="String" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
where point_name = #{pointName} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointDataIsSpot" resultMap="ZdyPointDataResult">
|
||||
select *
|
||||
from zdy_point_data zpd
|
||||
left join zdy_point_type zpt on zpd.point_type_id = zpt.id
|
||||
where zpt.dept_id = #{deptId}
|
||||
and zpt.type = #{scenicSpotType}
|
||||
and zpd.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointDataColumnList" parameterType="ZdyPointData" resultMap="ZdyPointDataResult">
|
||||
select
|
||||
a.id,
|
||||
a.point_name,
|
||||
a.point_type_id,
|
||||
a.longitude,
|
||||
a.latitude,
|
||||
b.potype_name as pointTypName
|
||||
from zdy_point_data a
|
||||
left join zdy_point_type b on b.id = a.point_type_id
|
||||
<where>
|
||||
<if test="pointName != null and pointName != ''">
|
||||
and a.point_name like concat('%', #{pointName}, '%')
|
||||
</if>
|
||||
<if test="pointTypeId != null ">
|
||||
and a.point_type_id = #{pointTypeId}
|
||||
</if>
|
||||
<if test="pointIds != null ">
|
||||
and a.id not in
|
||||
<foreach collection="pointIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
and a.del_flag = '0'
|
||||
and (a.longitude is not null and a.longitude !='')
|
||||
and (a.latitude is not null and a.latitude !='')
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyPointData" parameterType="ZdyPointData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zdy_point_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pointMapId != null and pointMapId != ''">point_map_id,
|
||||
</if>
|
||||
<if test="pointTypeId != null and pointTypeId != ''">point_type_id,
|
||||
</if>
|
||||
<if test="pointName != null and pointName != ''">point_name,
|
||||
</if>
|
||||
<if test="spotId != null">spot_id,
|
||||
</if>
|
||||
<if test="image != null and image != ''">image,
|
||||
</if>
|
||||
<if test="longitude != null and longitude != ''">longitude,
|
||||
</if>
|
||||
<if test="latitude != null and latitude != ''">latitude,
|
||||
</if>
|
||||
<if test="blurb != null">blurb,
|
||||
</if>
|
||||
<if test="audioGuideUrl != null and audioGuideUrl != ''">
|
||||
audio_guide_url,
|
||||
</if>
|
||||
<if test="association != null and association != ''">association,
|
||||
</if>
|
||||
<if test="associationType != null">association_type,
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
create_time,del_flag,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pointMapId != null and pointMapId != ''">#{pointMapId},
|
||||
</if>
|
||||
<if test="pointTypeId != null and pointTypeId != ''">#{pointTypeId},
|
||||
</if>
|
||||
<if test="pointName != null and pointName != ''">#{pointName},
|
||||
</if>
|
||||
<if test="spotId != null">#{spotId},
|
||||
</if>
|
||||
<if test="image != null and image != ''">#{image},
|
||||
</if>
|
||||
<if test="longitude != null and longitude != ''">#{longitude},
|
||||
</if>
|
||||
<if test="latitude != null and latitude != ''">#{latitude},
|
||||
</if>
|
||||
<if test="blurb != null">#{blurb},
|
||||
</if>
|
||||
<if test="audioGuideUrl != null and audioGuideUrl != ''">
|
||||
#{audioGuideUrl},
|
||||
</if>
|
||||
<if test="association != null and association != ''">#{association},
|
||||
</if>
|
||||
<if test="associationType != null">#{associationType},
|
||||
</if>
|
||||
<if test="ticketId != null">#{ticketId},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
sysdate(), '0',
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyPointData" parameterType="ZdyPointData">
|
||||
update zdy_point_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pointMapId != null">point_map_id =
|
||||
#{pointMapId},
|
||||
</if>
|
||||
<if test="pointTypeId != null">point_type_id =
|
||||
#{pointTypeId},
|
||||
</if>
|
||||
<if test="pointName != null">point_name =
|
||||
#{pointName},
|
||||
</if>
|
||||
<if test="spotId != null">spot_id =
|
||||
#{spotId},
|
||||
</if>
|
||||
<if test="image != null">image =
|
||||
#{image},
|
||||
</if>
|
||||
<if test="longitude != null">longitude =
|
||||
#{longitude},
|
||||
</if>
|
||||
<if test="latitude != null">latitude =
|
||||
#{latitude},
|
||||
</if>
|
||||
<if test="blurb != null">blurb =
|
||||
#{blurb},
|
||||
</if>
|
||||
<if test="audioGuideUrl != null and audioGuideUrl != ''">
|
||||
audio_guide_url = #{audioGuideUrl},
|
||||
</if>
|
||||
<if test="association != null">association =
|
||||
#{association},
|
||||
</if>
|
||||
<if test="associationType != null">association_type =
|
||||
#{associationType},
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id =
|
||||
#{ticketId},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyPointDataById" parameterType="Long">
|
||||
delete from zdy_point_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyPointDataByIds" parameterType="String">
|
||||
delete from zdy_point_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="checkPointNameUnique" resultMap="ZdyPointDataResult">
|
||||
<include refid="selectZdyPointDataVo"/>
|
||||
where
|
||||
del_flag = '0'
|
||||
and point_type_id = #{pointTypeId}
|
||||
and point_name = #{name}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,254 @@
|
||||
<?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>
|
@@ -0,0 +1,247 @@
|
||||
<?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.ZdyPointTypeMapper">
|
||||
|
||||
<resultMap type="ZdyPointType" id="ZdyPointTypeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="potypeName" column="potype_name"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="delBtnType" column="del_btn_type"/>
|
||||
<result property="image" column="image"/>
|
||||
<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="ZdyPointTypeVO" id="ZdyPointTypeVOResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="potypeName" column="potype_name"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="delBtnType" column="del_btn_type"/>
|
||||
<result property="image" column="image"/>
|
||||
<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="selectZdyPointTypeVo">
|
||||
select a.id, a.potype_name,a.`type`,a.del_btn_type, a.image, a.create_time, a.create_by, a.update_time, a.update_by, a.del_flag,a.dept_id
|
||||
from zdy_point_type a
|
||||
left join sys_dept d on d.dept_id = a.dept_id
|
||||
</sql>
|
||||
|
||||
|
||||
<resultMap type="ZdyPointType" id="ZdyPointTypeColumnResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="potypeName" column="potype_name"/>
|
||||
<result property="type" column="type"/>
|
||||
<collection property="pointDataList" ofType="ZdyPointData" resultMap="ZdyPointDataResult">
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdyPointData" id="ZdyPointDataResult">
|
||||
<result property="id" column="column_id"/>
|
||||
<result property="pointMapId" column="point_map_id"/>
|
||||
<result property="pointTypeId" column="point_type_id"/>
|
||||
<result property="pointName" column="point_name"/>
|
||||
<result property="spotId" column="spot_id"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="blurb" column="blurb"/>
|
||||
<result property="audioGuideUrl" column="audio_guide_url"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
<result property="ticketName" column="ticketName"/>
|
||||
<result property="classify" column="classify"/>
|
||||
<result property="salesRice" column="sales_rice"/>
|
||||
<result property="groupName" column="groupName"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectZdyPointTypeColumnVo">
|
||||
select
|
||||
a.id,
|
||||
a.potype_name,
|
||||
a.`type`,
|
||||
a.dept_id,
|
||||
b.id as column_id,
|
||||
b.point_map_id,
|
||||
b.point_type_id,
|
||||
b.point_name,
|
||||
b.spot_id,
|
||||
b.image,
|
||||
b.longitude,
|
||||
b.latitude,
|
||||
b.blurb,
|
||||
b.ticket_id,
|
||||
b.audio_guide_url,
|
||||
ti.name as ticketName,
|
||||
ti.classify,
|
||||
ti.sales_rice,
|
||||
gr.name as groupName
|
||||
from zdy_point_type a
|
||||
left join zdy_point_data b on b.point_type_id = a.id
|
||||
left join zdy_ticket ti on ti.id = b.ticket_id
|
||||
left join zdy_ticket_group gr on gr.id = ti.group_id
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyPointTypeList" parameterType="ZdyPointType" resultMap="ZdyPointTypeVOResult">
|
||||
select a.id, a.potype_name,a.`type`,a.del_btn_type, a.image, a.create_time, a.create_by, a.update_time,
|
||||
a.update_by, a.del_flag,a.dept_id,s.scenic_name
|
||||
from zdy_point_type a
|
||||
left join zdy_scenic s on a.dept_id = s.dept_id
|
||||
<where>
|
||||
<if test="potypeName != null and potypeName != ''">
|
||||
and a.potype_name like concat('%', #{potypeName}, '%')
|
||||
</if>
|
||||
<if test="image != null and image != ''">
|
||||
and a.image = #{image}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and a.dept_id = #{deptId}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
and a.del_flag = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointTypeColumnList" parameterType="ZdyPointType" resultMap="ZdyPointTypeColumnResult">
|
||||
<include refid="selectZdyPointTypeColumnVo"/>
|
||||
<where>
|
||||
<if test="pointMapId != null ">
|
||||
and b.point_map_id = #{pointMapId}
|
||||
</if>
|
||||
<if test="potypeName != null and potypeName != ''">
|
||||
and b.point_name like concat('%', #{potypeName}, '%')
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and b.point_type_id = #{id}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and a.dept_id = #{deptId}
|
||||
</if>
|
||||
and a.del_flag = '0' and b.del_flag = '0'
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectZdyPointTypeById" parameterType="Long"
|
||||
resultMap="ZdyPointTypeResult">
|
||||
<include refid="selectZdyPointTypeVo"/>
|
||||
where a.id = #{id} and a.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointTypeByName" parameterType="String" resultMap="ZdyPointTypeResult">
|
||||
<include refid="selectZdyPointTypeVo"/>
|
||||
where a.potype_name = #{potypeName} and a.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyPointType" parameterType="ZdyPointType" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zdy_point_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="potypeName != null and potypeName !=''">potype_name,
|
||||
</if>
|
||||
<if test="type != null">type,
|
||||
</if>
|
||||
<if test="image != null and image !=''">image,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="delBtnType != null and delBtnType !=''">del_btn_type,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
create_time,del_flag,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="potypeName != null and potypeName !=''">#{potypeName},
|
||||
</if>
|
||||
<if test="type != null">#{type},
|
||||
</if>
|
||||
<if test="image != null and image !=''">#{image},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="delBtnType != null and delBtnType !=''">#{delBtnType},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
sysdate(), '0',
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyPointType" parameterType="ZdyPointType">
|
||||
update zdy_point_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="potypeName != null">potype_name =
|
||||
#{potypeName},
|
||||
</if>
|
||||
<if test="type != null">type =
|
||||
#{type},
|
||||
</if>
|
||||
<if test="image != null">image =
|
||||
#{image},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="delBtnType != null and delBtnType !=''">del_btn_type =
|
||||
#{delBtnType},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyPointTypeById" parameterType="Long">
|
||||
delete from zdy_point_type where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyPointTypeByIds" parameterType="String">
|
||||
delete from zdy_point_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="countByPointType" resultType="int">
|
||||
select count(1) from zdy_point_type
|
||||
where del_flag='0' and potype_name = #{pointType}
|
||||
</select>
|
||||
|
||||
<select id="checkPointTypeNameUnique" resultMap="ZdyPointTypeResult">
|
||||
<include refid="selectZdyPointTypeVo"/>
|
||||
where
|
||||
a.del_flag = '0'
|
||||
and a.dept_id = #{deptId}
|
||||
and a.potype_name = #{name}
|
||||
</select>
|
||||
|
||||
<select id="checkPointTypeUnique" resultMap="ZdyPointTypeResult">
|
||||
<include refid="selectZdyPointTypeVo"/>
|
||||
where
|
||||
a.del_flag = '0'
|
||||
and a.dept_id = #{deptId}
|
||||
and a.`type` = #{type}
|
||||
</select>
|
||||
|
||||
<select id="selectZdyPointTypeByDeptId" resultMap="ZdyPointTypeResult">
|
||||
<include refid="selectZdyPointTypeVo"/>
|
||||
where
|
||||
a.del_flag = '0'
|
||||
and a.dept_id = #{deptId}
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,560 @@
|
||||
<?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.ZdyScenicMapper">
|
||||
|
||||
<resultMap type = "ZdyScenic" id = "ZdyScenicResult">
|
||||
<result property = "id" column = "id"/>
|
||||
<result property = "deptId" column = "dept_id"/>
|
||||
<result property = "scenicName" column = "scenic_name"/>
|
||||
<result property = "address" column = "address"/>
|
||||
<result property = "coordinate" column = "coordinate"/>
|
||||
<result property = "scenicLevel" column = "scenic_level"/>
|
||||
<result property = "adjust" column = "adjust"/>
|
||||
<result property = "officialPhone" column = "official_phone"/>
|
||||
<result property = "image" column = "image"/>
|
||||
<result property = "blurb" column = "blurb"/>
|
||||
<result property = "reachinfo" column = "reachinfo"/>
|
||||
<result property = "createBy" column = "create_by"/>
|
||||
<result property = "createTime" column = "create_time"/>
|
||||
<result property = "updateBy" column = "update_by"/>
|
||||
<result property = "updateTime" column = "update_time"/>
|
||||
<result property = "delFlag" column = "del_flag"/>
|
||||
<result property = "deptName" column = "dept_name"/>
|
||||
<result property = "scenicLevelName" column = "scenicLevelName"/>
|
||||
<result property = "audioGuideUrl" column = "audio_guide_url"/>
|
||||
<result property = "imagePage" column = "image_page"/>
|
||||
<result property = "areaCity" column = "area_city"/>
|
||||
<result property = "logo" column = "logo"/>
|
||||
<result property = "complaintPhone" column = "complaint_phone"/>
|
||||
<result property = "recommend" column = "recommend"/>
|
||||
<result property = "textType" column = "text_type"/>
|
||||
<result property = "mapId" column = "map_id"/>
|
||||
<result property = "minPrice" column = "min_price"/>
|
||||
<result property = "flag" column = "flag"/>
|
||||
<result property = "spotNum" column = "spotNum"/>
|
||||
<result property="pftId" column="pft_id"/>
|
||||
<collection property = "tagList" javaType = "java.util.List" ofType = "ZdyScenicTags"
|
||||
select = "selectZdyScenicTagsByScenicId" column = "id"/>
|
||||
</resultMap>
|
||||
<resultMap id = "ZdyScenicZdyScenicSpotResult" type = "ScenicSpotVo" extends = "ZdyScenicResult">
|
||||
<collection property = "spotList" notNullColumn = "sub_scenic_id" javaType = "java.util.List" resultMap = "ZdyScenicSpotVoResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type = "ScenicSpotVo" id = "ZdyScenicSpotVoResult">
|
||||
<result property = "id" column = "sub_id"/>
|
||||
<result property = "scenicName" column = "sub_scenic_name"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id = "ZdyScenicZdyScenicTicketResult" type = "ScenicTicketVo" extends = "ZdyScenicResult">
|
||||
<collection property = "ticketList" notNullColumn = "sub_scenic_id" javaType = "java.util.List" resultMap = "ZdyScenicTicketResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type = "TicketVo" id = "ZdyScenicTicketResult">
|
||||
<result property = "id" column = "sub_id"/>
|
||||
<result property = "ticketName" column = "sub_name"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type = "ZdyScenicTags" id = "ZdyScenicTagsResult">
|
||||
<result property = "id" column = "tag_id"/>
|
||||
<result property = "name" column = "tag_name"/>
|
||||
<result property = "scenicId" column = "tag_scenic_id"/>
|
||||
</resultMap>
|
||||
|
||||
<select id = "selectZdyScenicTagsByScenicId" parameterType = "Long" resultMap = "ZdyScenicTagsResult">
|
||||
select id as tag_id, name as tag_name, scenic_id as tag_scenic_id
|
||||
from zdy_scenic_tags
|
||||
where scenic_id = #{id}
|
||||
</select>
|
||||
|
||||
<sql id = "selectZdyScenicVo">
|
||||
SELECT a.id,
|
||||
a.dept_id,
|
||||
a.scenic_name,
|
||||
a.address,
|
||||
a.coordinate,
|
||||
a.scenic_level,
|
||||
a.adjust,
|
||||
a.official_phone,
|
||||
a.image,
|
||||
a.blurb,
|
||||
a.reachinfo,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.audio_guide_url,
|
||||
a.image_page,
|
||||
a.area_city,
|
||||
d.dept_name,
|
||||
a.logo,
|
||||
a.recommend,
|
||||
a.text_type,
|
||||
a.complaint_phone,
|
||||
a.flag,
|
||||
a.pft_id
|
||||
FROM zdy_scenic a
|
||||
LEFT JOIN sys_dept d ON d.dept_id = a.dept_id
|
||||
</sql>
|
||||
|
||||
<select id = "selectZdyScenicList" parameterType = "ZdyScenic" resultMap = "ZdyScenicResult">
|
||||
SELECT a.id,
|
||||
a.dept_id,
|
||||
a.scenic_name,
|
||||
a.address,
|
||||
a.coordinate,
|
||||
a.scenic_level,
|
||||
a.adjust,
|
||||
a.official_phone,
|
||||
a.image,
|
||||
a.reachinfo,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.audio_guide_url,
|
||||
a.image_page,
|
||||
a.area_city,
|
||||
d.dept_name,
|
||||
a.logo,
|
||||
a.recommend,
|
||||
a.text_type,
|
||||
a.complaint_phone,
|
||||
a.blurb,
|
||||
a.flag,
|
||||
a.pft_id
|
||||
FROM zdy_scenic a
|
||||
LEFT JOIN sys_dept d ON d.dept_id = a.dept_id
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test = "deptId != null ">
|
||||
and a.dept_id = #{deptId}
|
||||
</if>
|
||||
<if test = "scenicName != null and scenicName != ''">
|
||||
and a.scenic_name like concat('%', #{scenicName}, '%')
|
||||
</if>
|
||||
<if test = "deptList != null ">
|
||||
and a.dept_id in
|
||||
<foreach collection = "deptList" item = "deptId" open = "(" separator = "," close = ")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test = "address != null and address != ''">
|
||||
and a.address = #{address}
|
||||
</if>
|
||||
<if test = "coordinate != null and coordinate != ''">
|
||||
and a.coordinate = #{coordinate}
|
||||
</if>
|
||||
<if test = "scenicLevel != null and scenicLevel != ''">
|
||||
and a.scenic_level = #{scenicLevel}
|
||||
</if>
|
||||
<if test = "adjust != null and adjust != ''">
|
||||
and a.adjust = #{adjust}
|
||||
</if>
|
||||
<if test = "officialPhone != null and officialPhone != ''">
|
||||
and a.official_phone = #{officialPhone}
|
||||
</if>
|
||||
<if test = "image != null and image != ''">
|
||||
and a.image = #{image}
|
||||
</if>
|
||||
<if test = "blurb != null and blurb != ''">
|
||||
and a.blurb = #{blurb}
|
||||
</if>
|
||||
<if test = "reachinfo != null and reachinfo != ''">
|
||||
and a.reachinfo = #{reachinfo}
|
||||
</if>
|
||||
<if test = "recommend != null and recommend != ''">
|
||||
and a.recommend = #{recommend}
|
||||
</if>
|
||||
<if test = "flag != null and flag != ''">
|
||||
and find_in_set(#{flag},a.flag)
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by a.update_time desc
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicListApp" parameterType = "ZdyScenic" resultMap = "ZdyScenicResult">
|
||||
SELECT a.id,
|
||||
a.dept_id,
|
||||
a.scenic_name,
|
||||
a.address,
|
||||
a.coordinate,
|
||||
a.scenic_level,
|
||||
a.adjust,
|
||||
a.official_phone,
|
||||
a.image,
|
||||
a.reachinfo,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.audio_guide_url,
|
||||
a.image_page,
|
||||
a.area_city,
|
||||
d.dept_name,
|
||||
a.logo,
|
||||
a.recommend,
|
||||
a.text_type,
|
||||
a.complaint_phone,
|
||||
a.flag,
|
||||
a.pft_id,
|
||||
ROUND(ST_DISTANCE_SPHERE(
|
||||
POINT(substr(coordinate, 1, instr(coordinate, ',') - 1),
|
||||
substr(coordinate, instr(coordinate, ',') + 1)),
|
||||
POINT(#{params.longitude}, #{params.latitude})) / 1000, 2) distance,
|
||||
zpm.id map_id,
|
||||
i.min_price,
|
||||
(select count(1) FROM zdy_scenic_spot where scenic_id = a.id and status = 1 and del_flag=0) spotNum
|
||||
FROM zdy_scenic a
|
||||
LEFT JOIN sys_dept d ON d.dept_id = a.dept_id
|
||||
left join zdy_point_map zpm on a.dept_id = zpm.dept_id
|
||||
left join (select t.scenic_id, MIN(sales_rice) min_price
|
||||
from zdy_ticket t
|
||||
where scenic_id is not null
|
||||
group by t.scenic_id) i on a.id = i.scenic_id
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test = "deptId != null ">
|
||||
and a.dept_id = #{deptId}
|
||||
</if>
|
||||
<if test = "scenicName != null and scenicName != ''">
|
||||
and a.scenic_name like concat('%', #{scenicName}, '%')
|
||||
</if>
|
||||
<if test = "deptList != null ">
|
||||
and a.dept_id in
|
||||
<foreach collection = "deptList" item = "deptId" open = "(" separator = "," close = ")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test = "address != null and address != ''">
|
||||
and a.address = #{address}
|
||||
</if>
|
||||
<if test = "coordinate != null and coordinate != ''">
|
||||
and a.coordinate = #{coordinate}
|
||||
</if>
|
||||
<if test = "scenicLevel != null and scenicLevel != ''">
|
||||
and a.scenic_level = #{scenicLevel}
|
||||
</if>
|
||||
<if test = "adjust != null and adjust != ''">
|
||||
and a.adjust = #{adjust}
|
||||
</if>
|
||||
<if test = "officialPhone != null and officialPhone != ''">
|
||||
and a.official_phone = #{officialPhone}
|
||||
</if>
|
||||
<if test = "image != null and image != ''">
|
||||
and a.image = #{image}
|
||||
</if>
|
||||
<if test = "blurb != null and blurb != ''">
|
||||
and a.blurb = #{blurb}
|
||||
</if>
|
||||
<if test = "reachinfo != null and reachinfo != ''">
|
||||
and a.reachinfo = #{reachinfo}
|
||||
</if>
|
||||
<if test = "recommend != null and recommend != ''">
|
||||
and a.recommend = #{recommend}
|
||||
</if>
|
||||
<if test = "flag != null and flag != ''">
|
||||
and find_in_set(#{flag},a.flag)
|
||||
</if>
|
||||
</where>
|
||||
order by ISNULL(distance),distance asc
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicById" parameterType = "Long" resultMap = "ZdyScenicResult">
|
||||
<include refid = "selectZdyScenicVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicByScenicCode" parameterType = "String" resultMap = "ZdyScenicResult">
|
||||
<include refid = "selectZdyScenicVo"/>
|
||||
where a.scenic_code = #{scenicCode} and a.del_flag='0' order by a.id desc
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicByDeptId" parameterType = "Long" resultMap = "ZdyScenicResult">
|
||||
<include refid = "selectZdyScenicVo"/>
|
||||
where a.dept_id = #{deptId} and a.del_flag='0' order by a.id desc
|
||||
</select>
|
||||
|
||||
<insert id = "insertZdyScenic" parameterType = "ZdyScenic" useGeneratedKeys = "true" keyProperty = "id">
|
||||
insert into zdy_scenic
|
||||
<trim prefix = "(" suffix = ")" suffixOverrides = ",">
|
||||
<if test = "deptId != null">dept_id,</if>
|
||||
<if test = "scenicName != null and scenicName != ''">scenic_name,</if>
|
||||
<if test = "address != null">address,</if>
|
||||
<if test = "coordinate != null">coordinate,</if>
|
||||
<if test = "scenicLevel != null">scenic_level,</if>
|
||||
<if test = "adjust != null">adjust,</if>
|
||||
<if test = "officialPhone != null">official_phone,</if>
|
||||
<if test = "image != null">image,</if>
|
||||
<if test = "blurb != null">blurb,</if>
|
||||
<if test = "reachinfo != null">reachinfo,</if>
|
||||
<if test = "createBy != null">create_by,</if>
|
||||
<if test = "audioGuideUrl != null">audio_guide_url,</if>
|
||||
<if test = "imagePage != null">image_page,</if>
|
||||
<if test = "areaCity != null">area_city,</if>
|
||||
<if test = "logo != null">logo,</if>
|
||||
<if test = "complaintPhone != null">complaint_phone,</if>
|
||||
<if test = "textType != null">text_type,</if>
|
||||
<if test = "flag != null">flag,</if>
|
||||
<if test="pftId !=null">pft_id,</if>
|
||||
del_flag, create_time,
|
||||
</trim>
|
||||
<trim prefix = "values (" suffix = ")" suffixOverrides = ",">
|
||||
<if test = "deptId != null">#{deptId},</if>
|
||||
<if test = "scenicName != null and scenicName != ''">#{scenicName},</if>
|
||||
<if test = "address != null">#{address},</if>
|
||||
<if test = "coordinate != null">#{coordinate},</if>
|
||||
<if test = "scenicLevel != null">#{scenicLevel},</if>
|
||||
<if test = "adjust != null">#{adjust},</if>
|
||||
<if test = "officialPhone != null">#{officialPhone},</if>
|
||||
<if test = "image != null">#{image},</if>
|
||||
<if test = "blurb != null">#{blurb},</if>
|
||||
<if test = "reachinfo != null">#{reachinfo},</if>
|
||||
<if test = "createBy != null">#{createBy},</if>
|
||||
<if test = "audioGuideUrl != null">#{audioGuideUrl},</if>
|
||||
<if test = "imagePage != null">#{imagePage},</if>
|
||||
<if test = "areaCity != null">#{areaCity},</if>
|
||||
<if test = "logo != null">#{logo},</if>
|
||||
<if test = "complaintPhone != null">#{complaintPhone},</if>
|
||||
<if test = "textType != null">#{textType},</if>
|
||||
<if test = "flag != null">#{flag},</if>
|
||||
<if test="pftId !=null">#{pftId},</if>
|
||||
'0', sysdate(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id = "updateZdyScenic" parameterType = "ZdyScenic">
|
||||
update zdy_scenic
|
||||
<trim prefix = "SET" suffixOverrides = ",">
|
||||
<if test = "deptId != null">dept_id = #{deptId},</if>
|
||||
<if test = "scenicName != null and scenicName != ''">scenic_name = #{scenicName},</if>
|
||||
<if test = "address != null">address = #{address},</if>
|
||||
<if test = "coordinate != null">coordinate = #{coordinate},</if>
|
||||
<if test = "scenicLevel != null">scenic_level = #{scenicLevel},</if>
|
||||
<if test = "adjust != null">adjust = #{adjust},</if>
|
||||
<if test = "officialPhone != null">official_phone = #{officialPhone},</if>
|
||||
<if test = "image != null">image = #{image},</if>
|
||||
<if test = "blurb != null">blurb = #{blurb},</if>
|
||||
<if test = "reachinfo != null">reachinfo = #{reachinfo},</if>
|
||||
<if test = "updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test = "audioGuideUrl != null">audio_guide_url = #{audioGuideUrl},</if>
|
||||
<if test = "imagePage != null">image_page = #{imagePage},</if>
|
||||
<if test = "areaCity != null">area_city = #{areaCity},</if>
|
||||
<if test = "logo != null">logo = #{logo},</if>
|
||||
<if test = "complaintPhone != null">complaint_phone = #{complaintPhone},</if>
|
||||
<if test = "textType != null">text_type = #{textType},</if>
|
||||
<if test = "flag != null">flag = #{flag},</if>
|
||||
<if test="pftId !=null">pft_id = #{pftId},</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id = "deleteZdyScenicById" parameterType = "Long">
|
||||
update zdy_scenic
|
||||
set del_flag = '1'
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id = "deleteZdyScenicByIds" parameterType = "String">
|
||||
update zdy_scenic set del_flag = '1' where id in
|
||||
<foreach item = "id" collection = "array" open = "(" separator = "," close = ")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id = "selectZdyScenicInfoList" resultType = "map">
|
||||
SELECT id,
|
||||
scenic_name as scenicName,
|
||||
image,
|
||||
coordinate,
|
||||
blurb,
|
||||
address,
|
||||
logo,
|
||||
image_page as imagePage
|
||||
from zdy_scenic
|
||||
where del_flag = '0'
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicExpandList" resultMap = "ZdyScenicResult">
|
||||
SELECT id
|
||||
from zdy_scenic
|
||||
where del_flag = '0'
|
||||
order by id desc
|
||||
</select>
|
||||
<select id = "selectZdyScenicNameList" parameterType = "com.zhwl.common.core.domain.ZdyScenic" resultMap = "ZdyScenicResult">
|
||||
SELECT a.id,
|
||||
a.scenic_name
|
||||
from zdy_scenic a
|
||||
LEFT JOIN sys_dept d ON d.dept_id = a.dept_id
|
||||
where a.del_flag = '0'
|
||||
${params.dataScope}
|
||||
order by a.id desc
|
||||
</select>
|
||||
<select id = "selectZdyScenicByIds" resultMap = "ZdyScenicResult" parameterType = "String">
|
||||
SELECT a.id,
|
||||
a.dept_id,
|
||||
a.scenic_name,
|
||||
a.address,
|
||||
a.coordinate,
|
||||
a.scenic_level,
|
||||
a.adjust,
|
||||
a.official_phone,
|
||||
a.image,
|
||||
a.reachinfo,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.audio_guide_url,
|
||||
a.image_page,
|
||||
a.area_city,
|
||||
a.logo,
|
||||
a.recommend,
|
||||
a.text_type,
|
||||
a.complaint_phone,
|
||||
a.flag,
|
||||
a.pft_id
|
||||
FROM zdy_scenic a
|
||||
WHERE a.del_flag = '0' and a.id IN
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
group by a.id
|
||||
order by a.id desc
|
||||
|
||||
</select>
|
||||
|
||||
<update id = "updateZdyScenicByDeptId" parameterType = "ZdyScenic">
|
||||
update zdy_scenic
|
||||
<trim prefix = "SET" suffixOverrides = ",">
|
||||
<if test = "scenicName != null and scenicName != ''">scenic_name = #{scenicName},
|
||||
</if>
|
||||
<if test = "address != null">address = #{address},
|
||||
</if>
|
||||
<if test = "coordinate != null">coordinate = #{coordinate},
|
||||
</if>
|
||||
<if test = "scenicLevel != null">scenic_level = #{scenicLevel},
|
||||
</if>
|
||||
<if test = "adjust != null">adjust = #{adjust},
|
||||
</if>
|
||||
<if test = "officialPhone != null">official_phone = #{officialPhone},
|
||||
</if>
|
||||
<if test = "image != null">image = #{image},
|
||||
</if>
|
||||
<if test = "blurb != null">blurb = #{blurb},
|
||||
</if>
|
||||
<if test = "reachinfo != null">reachinfo = #{reachinfo},
|
||||
</if>
|
||||
<if test = "updateBy != null">update_by = #{updateBy},
|
||||
</if>
|
||||
update_time = sysdate(),
|
||||
</trim>
|
||||
where dept_id = #{deptId}
|
||||
</update>
|
||||
|
||||
<select id = "selectZdyScenicSelectList" resultType = "com.zhwl.scenic.domain.vo.ZdyScenicVo">
|
||||
SELECT id,
|
||||
scenic_name as scenicName
|
||||
FROM zdy_scenic
|
||||
where del_flag = '0'
|
||||
order by update_time desc, sort
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicSpotList" parameterType = "ZdyScenic" resultMap = "ZdyScenicZdyScenicTicketResult">
|
||||
SELECT a.id, a.scenic_name, b.id AS sub_id, b.NAME AS sub_name, b.scenic_id AS sub_scenic_id FROM zdy_scenic a
|
||||
LEFT JOIN zdy_ticket b ON b.scenic_id = a.id
|
||||
<where>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
ORDER BY a.update_time DESC, a.sort
|
||||
</select>
|
||||
<select id = "selectZdyScenicInfoByAdminId" resultType = "Long" parameterType = "Long">
|
||||
SELECT a.id
|
||||
FROM zdy_scenic a
|
||||
LEFT JOIN sys_user u ON u.dept_id = a.dept_id
|
||||
WHERE a.del_flag = '0'
|
||||
AND u.user_id = #{userId}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicByAdminId" resultMap="ZdyScenicResult" parameterType = "long">
|
||||
SELECT a.id,a.scenic_name,a.dept_id
|
||||
FROM zdy_scenic a
|
||||
LEFT JOIN sys_user u ON u.dept_id = a.dept_id
|
||||
WHERE a.del_flag = '0'
|
||||
AND u.user_id = #{userId}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id = "selectZdyScenicNameById" parameterType = "Long"
|
||||
resultType = "com.zhwl.scenic.domain.vo.ZdyScenicConfigVo">
|
||||
select id,
|
||||
scenic_name as scenicName,
|
||||
coordinate,
|
||||
area_city as areaCity,
|
||||
official_phone as officialPhone,
|
||||
complaint_phone as complaintPhone,
|
||||
adjust,
|
||||
dept_id as deptId
|
||||
FROM zdy_scenic
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id = "countByScenicName" resultType = "int">
|
||||
select count(1)
|
||||
from zdy_scenic
|
||||
where del_flag = '0'
|
||||
and scenic_name = #{scenicName}
|
||||
</select>
|
||||
|
||||
<select id = "listScenicNamesAll" resultType= "com.zhwl.common.core.domain.ZdyScenic">
|
||||
SELECT a.id,
|
||||
a.scenic_name as scenicName
|
||||
from zdy_scenic a
|
||||
where a.del_flag = '0'
|
||||
order by a.id desc
|
||||
</select>
|
||||
<select id="selectbaseList" resultType="map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.scenic_name as scenicName,
|
||||
d.dict_label as scenicLevel,
|
||||
a.adjust,
|
||||
a.official_phone,
|
||||
a.complaint_phone,
|
||||
a.address,
|
||||
a.coordinate,
|
||||
a.image_page as image,
|
||||
a.blurb,
|
||||
GROUP_CONCAT( t.NAME ) AS tags
|
||||
FROM
|
||||
zdy_scenic a
|
||||
left JOIN zdy_scenic_tags t ON a.id = t.scenic_id
|
||||
LEFT JOIN sys_dict_data d ON d.dict_type = 'scenic_level' AND d.dict_value = a.scenic_level
|
||||
WHERE
|
||||
a.del_flag = '0'
|
||||
GROUP BY
|
||||
a.id, a.scenic_name, d.dict_label, a.adjust, a.official_phone,
|
||||
a.complaint_phone, a.address, a.coordinate, a.image, a.blurb
|
||||
</select>
|
||||
<select id="selectByName" resultMap = "ZdyScenicResult">
|
||||
SELECT *
|
||||
FROM zdy_scenic
|
||||
where del_flag='0' and scenic_name = #{name}
|
||||
</select>
|
||||
<select id="selectBypftId" resultMap = "ZdyScenicResult">
|
||||
SELECT *
|
||||
FROM zdy_scenic
|
||||
where del_flag='0' and pft_id like concat('%',#{pftId},'%')
|
||||
</select>
|
||||
<select id="selectScenicCount" resultType="java.lang.Integer">
|
||||
select count(1) from zdy_scenic where del_flag='0'
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,435 @@
|
||||
<?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.ZdyScenicSpotMapper">
|
||||
|
||||
<resultMap type="ZdyScenicSpot" id="ZdyScenicSpotResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="scenicCode" column="scenic_code"/>
|
||||
<result property="scenicName" column="scenic_name"/>
|
||||
<result property="adjust" column="adjust"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="blurb" column="blurb"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="flag" column="flag"/>
|
||||
<result property="tag" column="tag"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="tagName" column="tagName"/>
|
||||
<result property="scenicAreaName" column="scenicAreaName"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="flagName" column="flagName"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="audioGuideUrl" column="audio_guide_url"/>
|
||||
<result property="videoUrl" column="video_url"/>
|
||||
<result property="arVrContentUl" column="ar_vr_content_ul"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="image21" column="image21"/>
|
||||
<result property="image43" column="image43"/>
|
||||
<result property="subtitle" column="subtitle"/>
|
||||
<result property="shareQrcodeUrl" column="share_qrcode_url"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="audioCharge" column="audio_charge"/>
|
||||
<result property="audioPrice" column="audio_price"/>
|
||||
<result property="audioGuideTimeLength" column="audio_guide_time_length"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyScenicSpotVo">
|
||||
SELECT a.id,
|
||||
a.dept_id,
|
||||
a.scenic_code,
|
||||
a.scenic_name,
|
||||
a.flag,
|
||||
a.tag,
|
||||
a.adjust,
|
||||
a.image,
|
||||
a.blurb,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.scenic_id,
|
||||
a.sort,
|
||||
a.location,
|
||||
a.audio_guide_url,
|
||||
a.video_url,
|
||||
a.ar_vr_content_ul,
|
||||
a.address,
|
||||
a.image21,
|
||||
a.image43,
|
||||
a.subtitle,
|
||||
a.share_qrcode_url,
|
||||
a.status,
|
||||
a.audio_charge,
|
||||
a.audio_price,
|
||||
a.audio_guide_time_length,
|
||||
scenic.scenic_name AS scenicAreaName
|
||||
FROM zdy_scenic_spot a
|
||||
LEFT JOIN zdy_scenic scenic ON scenic.id = a.scenic_id
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyScenicSpotList" parameterType="ZdyScenicSpot" resultMap="ZdyScenicSpotResult">
|
||||
<include refid="selectZdyScenicSpotVo"/>
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="deptId != null ">
|
||||
and a.dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="scenicCode != null and scenicCode != ''">
|
||||
and a.scenic_code like concat(#{scenicCode}, '%')
|
||||
</if>
|
||||
<if test="scenicName != null and scenicName != ''">
|
||||
and a.scenic_name like concat('%', #{scenicName}, '%')
|
||||
</if>
|
||||
<if test="adjust != null and adjust != ''">
|
||||
and a.adjust = #{adjust}
|
||||
</if>
|
||||
<if test="image != null and image != ''">
|
||||
and a.image = #{image}
|
||||
</if>
|
||||
<if test="blurb != null and blurb != ''">
|
||||
and a.blurb = #{blurb}
|
||||
</if>
|
||||
<if test="flag != null and flag != ''">
|
||||
and FIND_IN_SET(#{flag}, a.flag)
|
||||
</if>
|
||||
<if test="scenicId != null">
|
||||
and a.scenic_id = #{scenicId}
|
||||
</if>
|
||||
<if test="audioCharge!=null">
|
||||
and a.audio_charge = #{audioCharge}
|
||||
</if>
|
||||
<if test="status!=null">
|
||||
and a.status = #{status}
|
||||
</if>
|
||||
<if test="spotIds != null ">
|
||||
and a.id not in
|
||||
<foreach collection="spotIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
-- ORDER BY
|
||||
-- FIELD( a.flag, 'top', 'hot', 'new', 'recommend', '' ),
|
||||
-- sort
|
||||
order by a.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyScenicSpotById" parameterType="Long"
|
||||
resultMap="ZdyScenicSpotResult">
|
||||
<include refid="selectZdyScenicSpotVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyScenicSpot" parameterType="ZdyScenicSpot" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_scenic_spot
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
<if test="scenicCode != null and scenicCode != ''">scenic_code,
|
||||
</if>
|
||||
<if test="scenicName != null and scenicName != ''">scenic_name,
|
||||
</if>
|
||||
<if test="adjust != null">adjust,
|
||||
</if>
|
||||
<if test="image != null">image,
|
||||
</if>
|
||||
<if test="blurb != null">blurb,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag,
|
||||
</if>
|
||||
<if test="flag != null">flag,
|
||||
</if>
|
||||
<if test="tag != null">tag,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
<if test="sort != null">sort,
|
||||
</if>
|
||||
<if test="location != null">location,
|
||||
</if>
|
||||
<if test="audioGuideUrl != null">audio_guide_url,
|
||||
</if>
|
||||
<if test="videoUrl != null">video_url,
|
||||
</if>
|
||||
<if test="arVrContentUl != null">ar_vr_content_ul,
|
||||
</if>
|
||||
<if test="address != null">address,
|
||||
</if>
|
||||
<if test="image21 != null">image21,
|
||||
</if>
|
||||
<if test="image43 != null">image43,
|
||||
</if>
|
||||
<if test="subtitle != null">subtitle,
|
||||
</if>
|
||||
<if test="shareQrcodeUrl != null">share_qrcode_url,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="audioCharge != null">audio_charge,
|
||||
</if>
|
||||
<if test="audioPrice != null">audio_price,
|
||||
</if>
|
||||
<if test="audioGuideTimeLength != null">audio_guide_time_length,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
<if test="scenicCode != null and scenicCode != ''">#{scenicCode},
|
||||
</if>
|
||||
<if test="scenicName != null and scenicName != ''">#{scenicName},
|
||||
</if>
|
||||
<if test="adjust != null">#{adjust},
|
||||
</if>
|
||||
<if test="image != null">#{image},
|
||||
</if>
|
||||
<if test="blurb != null">#{blurb},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="delFlag != null">#{delFlag},
|
||||
</if>
|
||||
<if test="flag != null">#{flag},
|
||||
</if>
|
||||
<if test="tag != null">#{tag},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
<if test="sort != null">#{sort},
|
||||
</if>
|
||||
<if test="location != null">#{location},
|
||||
</if>
|
||||
<if test="audioGuideUrl != null">#{audioGuideUrl},
|
||||
</if>
|
||||
<if test="videoUrl != null">#{videoUrl},
|
||||
</if>
|
||||
<if test="arVrContentUl != null">#{arVrContentUl},
|
||||
</if>
|
||||
<if test="address != null">#{address},
|
||||
</if>
|
||||
<if test="image21 != null">#{image21},
|
||||
</if>
|
||||
<if test="image43 != null">#{image43},
|
||||
</if>
|
||||
<if test="subtitle != null">#{subtitle},
|
||||
</if>
|
||||
<if test="shareQrcodeUrl != null">#{shareQrcodeUrl},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="audioCharge != null">#{audioCharge},
|
||||
</if>
|
||||
<if test="audioPrice != null">#{audioPrice},
|
||||
</if>
|
||||
<if test="audioGuideTimeLength != null">#{audioGuideTimeLength},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyScenicSpot" parameterType="ZdyScenicSpot">
|
||||
update zdy_scenic_spot
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="scenicCode != null and scenicCode != ''">scenic_code =
|
||||
#{scenicCode},
|
||||
</if>
|
||||
<if test="scenicName != null and scenicName != ''">scenic_name =
|
||||
#{scenicName},
|
||||
</if>
|
||||
<if test="adjust != null">adjust =
|
||||
#{adjust},
|
||||
</if>
|
||||
<if test="image != null">image =
|
||||
#{image},
|
||||
</if>
|
||||
<if test="blurb != null">blurb =
|
||||
#{blurb},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag =
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="flag != null">flag =
|
||||
#{flag},
|
||||
</if>
|
||||
<if test="tag != null">tag =
|
||||
#{tag},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
<if test="sort != null">sort =
|
||||
#{sort},
|
||||
</if>
|
||||
<if test="location != null">location =
|
||||
#{location},
|
||||
</if>
|
||||
<if test="audioGuideUrl != null">audio_guide_url =
|
||||
#{audioGuideUrl},
|
||||
</if>
|
||||
<if test="videoUrl != null">video_url =
|
||||
#{videoUrl},
|
||||
</if>
|
||||
<if test="arVrContentUl != null">ar_vr_content_ul =
|
||||
#{arVrContentUl},
|
||||
</if>
|
||||
<if test="address != null">address =
|
||||
#{address},
|
||||
</if>
|
||||
<if test="image21 != null">image21 =
|
||||
#{image21},
|
||||
</if>
|
||||
<if test="image43 != null">image43 =
|
||||
#{image43},
|
||||
</if>
|
||||
<if test="subtitle != null">subtitle =
|
||||
#{subtitle},
|
||||
</if>
|
||||
<if test="shareQrcodeUrl != null">share_qrcode_url =
|
||||
#{shareQrcodeUrl},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="audioCharge != null">audio_charge =
|
||||
#{audioCharge},
|
||||
</if>
|
||||
<if test="audioPrice != null">audio_price =
|
||||
#{audioPrice},
|
||||
</if>
|
||||
<if test="audioGuideTimeLength != null">audio_guide_time_length =
|
||||
#{audioGuideTimeLength},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyScenicSpotById" parameterType="Long">
|
||||
delete
|
||||
from zdy_scenic_spot
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyScenicSpotByIds" parameterType="String">
|
||||
delete from zdy_scenic_spot where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="selectZdyScenicSpotByScenicId" parameterType="Long"
|
||||
resultType="ZdyScenicSpotVo">
|
||||
SELECT id,
|
||||
scenic_code as scenicCode,
|
||||
scenic_name as scenicName,
|
||||
flag,
|
||||
tag,
|
||||
image,
|
||||
scenic_id as scenicId,
|
||||
blurb,
|
||||
adjust,
|
||||
location,
|
||||
audio_guide_url,
|
||||
video_url,
|
||||
ar_vr_content_ul,
|
||||
address,
|
||||
image43,
|
||||
image21,
|
||||
subtitle
|
||||
FROM zdy_scenic_spot
|
||||
where scenic_id = #{scenicId}
|
||||
and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyScenicSpotAppList" parameterType="ZdyScenicSpot" resultType="ZdyScenicSpotVo">
|
||||
SELECT id,
|
||||
scenic_code as scenicCode,
|
||||
scenic_name as scenicName,
|
||||
flag,
|
||||
tag,
|
||||
image,
|
||||
adjust,
|
||||
scenic_id as scenicId,
|
||||
blurb,
|
||||
location,
|
||||
audio_guide_url,
|
||||
video_url,
|
||||
ar_vr_content_ul,
|
||||
address,
|
||||
image43,
|
||||
image21,
|
||||
subtitle
|
||||
FROM zdy_scenic_spot
|
||||
where del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyScenicSpotListByScenicId" parameterType="Long"
|
||||
resultMap="ZdyScenicSpotResult">
|
||||
SELECT id,
|
||||
scenic_code,
|
||||
scenic_name,
|
||||
flag,
|
||||
tag,
|
||||
image,
|
||||
scenic_id,
|
||||
blurb,
|
||||
adjust,
|
||||
location,
|
||||
audio_guide_url,
|
||||
video_url,
|
||||
ar_vr_content_ul,
|
||||
address,
|
||||
image43,
|
||||
image21,
|
||||
subtitle
|
||||
FROM zdy_scenic_spot
|
||||
where scenic_id = #{scenicId}
|
||||
and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyScenicSpotByIds" resultMap="ZdyScenicSpotResult" parameterType="String">
|
||||
SELECT
|
||||
id,dept_id,scenic_code,scenic_name,adjust,image,blurb,scenic_id,tag,flag,sort,del_flag,create_by,create_time,update_by,update_time,location,audio_guide_url,video_url,ar_vr_content_ul,address,image43,image21,subtitle
|
||||
FROM zdy_scenic_spot
|
||||
where id IN
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by id desc
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,84 @@
|
||||
<?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.ZdyScenicTagsMapper">
|
||||
|
||||
<resultMap type="ZdyScenicTags" id="ZdyScenicTagsResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyScenicTagsVo">
|
||||
select id, name, scenic_id
|
||||
from zdy_scenic_tags
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyScenicTagsList" parameterType="ZdyScenicTags" resultMap="ZdyScenicTagsResult">
|
||||
<include refid="selectZdyScenicTagsVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="scenicId != null ">
|
||||
and scenic_id = #{scenicId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyScenicTagsById" parameterType="Integer"
|
||||
resultMap="ZdyScenicTagsResult">
|
||||
<include refid="selectZdyScenicTagsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyScenicTags" parameterType="ZdyScenicTags" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_scenic_tags
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyScenicTags" parameterType="ZdyScenicTags">
|
||||
update zdy_scenic_tags
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyScenicTagsById" parameterType="Integer">
|
||||
delete
|
||||
from zdy_scenic_tags
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyScenicTagsByIds" parameterType="String">
|
||||
delete from zdy_scenic_tags where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteZdyScenicTagsBySecnicId" parameterType="Long">
|
||||
delete
|
||||
from zdy_scenic_tags
|
||||
where scenic_id = #{scenicId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,270 @@
|
||||
<?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.ZdySmartGuideMapper">
|
||||
|
||||
<resultMap type="ZdySmartGuide" id="ZdySmartGuideResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="duration" column="duration"/>
|
||||
<result property="difficulty" column="difficulty"/>
|
||||
<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="coordinate" column="coordinate"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdySmartGuideVO" id="ZdySmartGuideVOResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="duration" column="duration"/>
|
||||
<result property="difficulty" column="difficulty"/>
|
||||
<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="coordinate" column="coordinate"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="scenicName" column="scenic_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdySmartGuideVo">
|
||||
SELECT a.id,
|
||||
a.NAME,
|
||||
a.description,
|
||||
a.duration,
|
||||
a.difficulty,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.dept_id,
|
||||
b.spot_id AS sub_id,
|
||||
b.guide_id AS sub_guide_id,
|
||||
b.sort AS sub_sort,
|
||||
scs.longitude,
|
||||
scs.point_type_id,
|
||||
scs.latitude,
|
||||
scs.blurb,
|
||||
scs.point_name,
|
||||
scs.spot_id as sub_spot_id,
|
||||
scs.ticket_id,
|
||||
ti.name as ticketName,
|
||||
ti.classify,
|
||||
ti.sales_rice,
|
||||
gr.name as groupName,
|
||||
zpt.image,
|
||||
a.coordinate,
|
||||
scs.audio_guide_url
|
||||
FROM zdy_smart_guide a
|
||||
LEFT JOIN zdy_spot_guide b ON b.guide_id = a.id
|
||||
LEFT JOIN zdy_point_data scs ON scs.id = b.spot_id
|
||||
left join zdy_ticket ti on ti.id = scs.ticket_id
|
||||
left join zdy_ticket_group gr on gr.id = ti.group_id
|
||||
LEFT JOIN zdy_point_type zpt ON zpt.id = scs.point_type_id
|
||||
</sql>
|
||||
|
||||
<resultMap id="ZdySmartGuideZdySpotGuideResult" type="ZdySmartGuide" extends="ZdySmartGuideResult">
|
||||
<collection property="spotGuideList" notNullColumn="sub_guide_id"
|
||||
javaType="java.util.List" resultMap="ZdySpotGuideResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdySpotGuide" id="ZdySpotGuideResult">
|
||||
<result property="id" column="sub_id"/>
|
||||
<result property="spotId" column="sub_spot_id"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="blurb" column="blurb"/>
|
||||
<result property="guideId" column="sub_guide_id"/>
|
||||
<result property="pointTypeId" column="point_type_id"/>
|
||||
<result property="sort" column="sub_sort"/>
|
||||
<result property="pointName" column="point_name"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
<result property="ticketName" column="ticketName"/>
|
||||
<result property="classify" column="classify"/>
|
||||
<result property="salesRice" column="sales_rice"/>
|
||||
<result property="groupName" column="groupName"/>
|
||||
<result property="audioGuideUrl" column="audio_guide_url"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectZdySmartGuideList" parameterType="ZdySmartGuide" resultMap="ZdySmartGuideZdySpotGuideResult">
|
||||
<include refid="selectZdySmartGuideVo"/>
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
and a.id = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and a.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
and a.description = #{description}
|
||||
</if>
|
||||
<if test="duration != null ">
|
||||
and a.duration = #{duration}
|
||||
</if>
|
||||
<if test="difficulty != null and difficulty != ''">
|
||||
and a.difficulty = #{difficulty}
|
||||
</if>
|
||||
<if test="spotId != null and spotId != ''">
|
||||
and scs.id = #{spotId}
|
||||
</if>
|
||||
<if test="pointTypeId != null ">
|
||||
and scs.point_type_id = #{pointTypeId}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and a.dept_id = #{deptId}
|
||||
</if>
|
||||
</where>
|
||||
order by a.id, b.sort
|
||||
</select>
|
||||
|
||||
<select id="selectZdySmartGuideColumnList" parameterType="ZdySmartGuide" resultMap="ZdySmartGuideVOResult">
|
||||
SELECT a.id,
|
||||
a.NAME,
|
||||
a.description,
|
||||
a.duration,
|
||||
a.difficulty,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.coordinate,
|
||||
(select count(1) from zdy_spot_guide b where b.guide_id = a.id )as amount,
|
||||
s.scenic_name
|
||||
FROM zdy_smart_guide a
|
||||
left join zdy_scenic s on s.dept_id = a.dept_id
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
and a.id = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and a.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
and a.description = #{description}
|
||||
</if>
|
||||
<if test="duration != null ">
|
||||
and a.duration = #{duration}
|
||||
</if>
|
||||
<if test="difficulty != null and difficulty != ''">
|
||||
and a.difficulty = #{difficulty}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and a.dept_id = #{deptId}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by a.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdySmartGuideById" parameterType="Integer"
|
||||
resultMap="ZdySmartGuideZdySpotGuideResult">
|
||||
<include refid="selectZdySmartGuideVo"/>
|
||||
where a.id = #{id} order by b.sort
|
||||
</select>
|
||||
|
||||
<insert id="insertZdySmartGuide" parameterType="ZdySmartGuide" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_smart_guide
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,
|
||||
</if>
|
||||
<if test="description != null">description,
|
||||
</if>
|
||||
<if test="duration != null">duration,
|
||||
</if>
|
||||
<if test="difficulty != null">difficulty,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="coordinate != null">coordinate,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},
|
||||
</if>
|
||||
<if test="description != null">#{description},
|
||||
</if>
|
||||
<if test="duration != null">#{duration},
|
||||
</if>
|
||||
<if test="difficulty != null">#{difficulty},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="coordinate != null">#{coordinate},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdySmartGuide" parameterType="ZdySmartGuide">
|
||||
update zdy_smart_guide
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="description != null">description =
|
||||
#{description},
|
||||
</if>
|
||||
<if test="duration != null">duration =
|
||||
#{duration},
|
||||
</if>
|
||||
<if test="difficulty != null">difficulty =
|
||||
#{difficulty},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="coordinate != null">coordinate =
|
||||
#{coordinate},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdySmartGuideById" parameterType="Integer">
|
||||
delete
|
||||
from zdy_smart_guide
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdySmartGuideByIds" parameterType="String">
|
||||
delete from zdy_smart_guide where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,83 @@
|
||||
<?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.ZdySpotGuideMapper">
|
||||
|
||||
<resultMap type="ZdySpotGuide" id="ZdySpotGuideResult">
|
||||
<result property="spotId" column="spot_id"/>
|
||||
<result property="guideId" column="guide_id"/>
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdySpotGuideVo">
|
||||
select spot_id, guide_id, sort
|
||||
from zdy_spot_guide
|
||||
</sql>
|
||||
|
||||
<select id="selectZdySpotGuideList" parameterType="ZdySpotGuide" resultMap="ZdySpotGuideResult">
|
||||
<include refid="selectZdySpotGuideVo"/>
|
||||
<where>
|
||||
<if test="sort != null ">
|
||||
and sort = #{sort}
|
||||
</if>
|
||||
<if test="guideId != null">and guide_id = #{guideId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdySpotGuideBySpotId" parameterType="Long"
|
||||
resultMap="ZdySpotGuideResult">
|
||||
<include refid="selectZdySpotGuideVo"/>
|
||||
where spot_id = #{spotId}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdySpotGuide" parameterType="ZdySpotGuide">
|
||||
insert into zdy_spot_guide
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="spotId != null">spot_id,
|
||||
</if>
|
||||
<if test="guideId != null">guide_id,
|
||||
</if>
|
||||
<if test="sort != null">sort,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="spotId != null">#{spotId},
|
||||
</if>
|
||||
<if test="guideId != null">#{guideId},
|
||||
</if>
|
||||
<if test="sort != null">#{sort},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdySpotGuide" parameterType="ZdySpotGuide">
|
||||
update zdy_spot_guide
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sort != null">sort =
|
||||
#{sort},
|
||||
</if>
|
||||
</trim>
|
||||
where spot_id = #{spotId} and guide_id = #{guideId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdySpotGuideByGuideId" parameterType="Integer">
|
||||
delete
|
||||
from zdy_spot_guide
|
||||
where guide_id = #{guideId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdySpotGuideBySpotIds" parameterType="String">
|
||||
delete from zdy_spot_guide where spot_id in
|
||||
<foreach item="spotId" collection="array" open="(" separator="," close=")">
|
||||
#{spotId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdySpotGuideByGuideIds" parameterType="String">
|
||||
delete from zdy_spot_guide where guide_id in
|
||||
<foreach item="guideId" collection="array" open="(" separator="," close=")">
|
||||
#{guideId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,138 @@
|
||||
<?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.ScenicSpotAudioOrdelLogMapper">
|
||||
|
||||
<resultMap type="ScenicSpotAudioOrdelLog" id="ScenicSpotAudioOrdelLogResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="operate" column="operate"/>
|
||||
<result property="memo" column="memo"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScenicSpotAudioOrdelLogVo">
|
||||
select id, order_id, content, status, create_by, create_time, type, operate,memo
|
||||
from zdy_scenic_spot_audio_ordel_log
|
||||
</sql>
|
||||
|
||||
<select id="selectScenicSpotAudioOrdelLogList" parameterType="ScenicSpotAudioOrdelLog"
|
||||
resultMap="ScenicSpotAudioOrdelLogResult">
|
||||
<include refid="selectScenicSpotAudioOrdelLogVo"/>
|
||||
<where>
|
||||
<if test="orderId != null ">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and content = #{content}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="type !=null and type!=''">
|
||||
and type = #{type}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScenicSpotAudioOrdelLogById" parameterType="Long"
|
||||
resultMap="ScenicSpotAudioOrdelLogResult">
|
||||
<include refid="selectScenicSpotAudioOrdelLogVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScenicSpotAudioOrdelLog" parameterType="ScenicSpotAudioOrdelLog" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_scenic_spot_audio_ordel_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,
|
||||
</if>
|
||||
<if test="content != null">content,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="type != null">type,
|
||||
</if>
|
||||
<if test="operate != null">operate,
|
||||
</if>
|
||||
<if test="memo != null">memo,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},
|
||||
</if>
|
||||
<if test="content != null">#{content},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="type != null">#{type},
|
||||
</if>
|
||||
<if test="operate != null">#{operate},
|
||||
</if>
|
||||
<if test="memo != null">#{memo},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScenicSpotAudioOrdelLog" parameterType="ScenicSpotAudioOrdelLog">
|
||||
update zdy_scenic_spot_audio_ordel_log
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id =
|
||||
#{orderId},
|
||||
</if>
|
||||
<if test="content != null">content =
|
||||
#{content},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="type != null">type =
|
||||
#{type},
|
||||
</if>
|
||||
<if test="operate != null">operate =
|
||||
#{operate},
|
||||
</if>
|
||||
<if test="memo != null">memo =
|
||||
#{memo},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScenicSpotAudioOrdelLogById" parameterType="Long">
|
||||
delete
|
||||
from zdy_scenic_spot_audio_ordel_log
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScenicSpotAudioOrdelLogByIds" parameterType="String">
|
||||
delete from zdy_scenic_spot_audio_ordel_log where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteScenicSpotAudioOrdelLogByOrderId">
|
||||
delete
|
||||
from zdy_scenic_spot_audio_ordel_log
|
||||
where order_id = #{orderId}
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,353 @@
|
||||
<?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.ScenicSpotAudioOrderMapper">
|
||||
|
||||
<resultMap type="ScenicSpotAudioOrder" id="ScenicSpotAudioOrderResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="spotId" column="spot_id"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="orderCode" column="order_code"/>
|
||||
<result property="audioPrice" column="audio_price"/>
|
||||
<result property="payPrice" column="pay_price"/>
|
||||
<result property="discountAmount" column="discount_amount"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="payOrderNo" column="pay_order_no"/>
|
||||
<result property="payMethod" column="pay_method"/>
|
||||
<result property="couponId" column="coupon_id"/>
|
||||
<result property="zdyUserId" column="zdy_user_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createName" column="create_name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="payTime" column="pay_time"/>
|
||||
<result property="refundTime" column="refund_time"/>
|
||||
<result property="tradeSession" column="trade_session"/>
|
||||
<result property="refundAmount" column="refund_amount"/>
|
||||
<result property="payEndTime" column="pay_end_time"/>
|
||||
<result property="buyNum" column="buy_num"/>
|
||||
<result property="refundBy" column="refund_by"/>
|
||||
<result property="refundReason" column="refund_reason"/>
|
||||
<result property="refundCode" column="refund_code"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="spotImage" column="spot_image"/>
|
||||
<result property="paymentScene" column="payment_scene"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScenicSpotAudioOrderVo">
|
||||
select id,
|
||||
spot_id,
|
||||
scenic_id,
|
||||
order_code,
|
||||
audio_price,
|
||||
pay_price,
|
||||
discount_amount,
|
||||
status,
|
||||
pay_order_no,
|
||||
pay_method,
|
||||
coupon_id,
|
||||
zdy_user_id,
|
||||
create_time,
|
||||
create_name,
|
||||
phone,
|
||||
pay_time,
|
||||
refund_time,
|
||||
trade_session,
|
||||
refund_amount,
|
||||
pay_end_time,
|
||||
buy_num,
|
||||
refund_by,
|
||||
refund_reason,
|
||||
refund_code,
|
||||
dept_id,
|
||||
payment_scene,
|
||||
spot_image
|
||||
from zdy_scenic_spot_audio_order
|
||||
</sql>
|
||||
|
||||
<select id="selectScenicSpotAudioOrderList" parameterType="ScenicSpotAudioOrder"
|
||||
resultMap="ScenicSpotAudioOrderResult">
|
||||
<include refid="selectScenicSpotAudioOrderVo"/>
|
||||
<where>
|
||||
<if test="spotId != null ">
|
||||
and spot_id = #{spotId}
|
||||
</if>
|
||||
<if test="scenicId != null ">
|
||||
and scenic_id = #{scenicId}
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
and order_code = #{orderCode}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="payMethod != null and payMethod != ''">
|
||||
and pay_method = #{payMethod}
|
||||
</if>
|
||||
<if test="couponId != null ">
|
||||
and coupon_id = #{couponId}
|
||||
</if>
|
||||
<if test="payOrderNo !=null">
|
||||
and pay_order_no = #{payOrderNo}
|
||||
</if>
|
||||
<if test="createName != null">
|
||||
and create_name like concat('%', #{createName}, '%')
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="refundCode !=null and refundCode!=''">
|
||||
and refund_code = #{refundCode}
|
||||
</if>
|
||||
<if test="zdyUserId !=null and zdyUserId!=''">
|
||||
and zdy_user_id = #{zdyUserId}
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{params.beginCreateTime}
|
||||
and #{params.endCreateTime} >= DATE_FORMAT(create_time,'%Y-%m-%d')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectScenicSpotAudioOrderById" parameterType="Long"
|
||||
resultMap="ScenicSpotAudioOrderResult">
|
||||
<include refid="selectScenicSpotAudioOrderVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectScenicSpotAudioOrderByOrderCode"
|
||||
resultMap="ScenicSpotAudioOrderResult">
|
||||
<include refid="selectScenicSpotAudioOrderVo"/>
|
||||
where order_code = #{orderCode}
|
||||
</select>
|
||||
<select id="selectByRefundCode" resultMap="ScenicSpotAudioOrderResult">
|
||||
<include refid="selectScenicSpotAudioOrderVo"/>
|
||||
where refund_code = #{refundCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertScenicSpotAudioOrder" parameterType="ScenicSpotAudioOrder" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_scenic_spot_audio_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="spotId != null">spot_id,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
<if test="orderCode != null">order_code,
|
||||
</if>
|
||||
<if test="audioPrice != null">audio_price,
|
||||
</if>
|
||||
<if test="payPrice != null">pay_price,
|
||||
</if>
|
||||
<if test="discountAmount != null">discount_amount,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="payOrderNo != null">pay_order_no,
|
||||
</if>
|
||||
<if test="payMethod != null">pay_method,
|
||||
</if>
|
||||
<if test="couponId != null">coupon_id,
|
||||
</if>
|
||||
<if test="zdyUserId != null">zdy_user_id,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="createName != null">create_name,
|
||||
</if>
|
||||
<if test="phone != null">phone,
|
||||
</if>
|
||||
<if test="payTime != null">pay_time,
|
||||
</if>
|
||||
<if test="refundTime != null">refund_time,
|
||||
</if>
|
||||
<if test="tradeSession != null">trade_session,
|
||||
</if>
|
||||
<if test="refundAmount != null">refund_amount,
|
||||
</if>
|
||||
<if test="payEndTime != null">pay_end_time,
|
||||
</if>
|
||||
<if test="buyNum != null">buy_num,
|
||||
</if>
|
||||
<if test="refundBy != null">refund_by,
|
||||
</if>
|
||||
<if test="refundReason != null">refund_reason,
|
||||
</if>
|
||||
<if test="refundCode!=null"> refund_code,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
<if test="paymentScene !=null">
|
||||
payment_scene,
|
||||
</if>
|
||||
<if test="spotImage !=null">
|
||||
spot_image,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="spotId != null">#{spotId},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
<if test="orderCode != null">#{orderCode},
|
||||
</if>
|
||||
<if test="audioPrice != null">#{audioPrice},
|
||||
</if>
|
||||
<if test="payPrice != null">#{payPrice},
|
||||
</if>
|
||||
<if test="discountAmount != null">#{discountAmount},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="payOrderNo != null">#{payOrderNo},
|
||||
</if>
|
||||
<if test="payMethod != null">#{payMethod},
|
||||
</if>
|
||||
<if test="couponId != null">#{couponId},
|
||||
</if>
|
||||
<if test="zdyUserId != null">#{zdyUserId},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="createName != null">#{createName},
|
||||
</if>
|
||||
<if test="phone != null">#{phone},
|
||||
</if>
|
||||
<if test="payTime != null">#{payTime},
|
||||
</if>
|
||||
<if test="refundTime != null">#{refundTime},
|
||||
</if>
|
||||
<if test="tradeSession != null">#{tradeSession},
|
||||
</if>
|
||||
<if test="refundAmount != null">#{refundAmount},
|
||||
</if>
|
||||
<if test="payEndTime != null">#{payEndTime},
|
||||
</if>
|
||||
<if test="buyNum != null">#{buyNum},
|
||||
</if>
|
||||
<if test="refundBy != null">#{refundBy},
|
||||
</if>
|
||||
<if test="refundReason != null">#{refundReason},
|
||||
</if>
|
||||
<if test="refundCode!=null">#{refundCode},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
<if test="paymentScene !=null and paymentScene!=''">
|
||||
#{paymentScene},
|
||||
</if>
|
||||
<if test="spotImage !=null">
|
||||
#{spotImage},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScenicSpotAudioOrder" parameterType="ScenicSpotAudioOrder">
|
||||
update zdy_scenic_spot_audio_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="spotId != null">spot_id =
|
||||
#{spotId},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
<if test="orderCode != null">order_code =
|
||||
#{orderCode},
|
||||
</if>
|
||||
<if test="audioPrice != null">audio_price =
|
||||
#{audioPrice},
|
||||
</if>
|
||||
<if test="payPrice != null">pay_price =
|
||||
#{payPrice},
|
||||
</if>
|
||||
<if test="discountAmount != null">discount_amount =
|
||||
#{discountAmount},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="payOrderNo != null">pay_order_no =
|
||||
#{payOrderNo},
|
||||
</if>
|
||||
<if test="payMethod != null">pay_method =
|
||||
#{payMethod},
|
||||
</if>
|
||||
<if test="couponId != null">coupon_id =
|
||||
#{couponId},
|
||||
</if>
|
||||
<if test="zdyUserId != null">zdy_user_id =
|
||||
#{zdyUserId},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="createName != null">create_name =
|
||||
#{createName},
|
||||
</if>
|
||||
<if test="phone != null">phone =
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="payTime != null">pay_time =
|
||||
#{payTime},
|
||||
</if>
|
||||
<if test="refundTime != null">refund_time =
|
||||
#{refundTime},
|
||||
</if>
|
||||
<if test="tradeSession != null">trade_session =
|
||||
#{tradeSession},
|
||||
</if>
|
||||
<if test="refundAmount != null">refund_amount =
|
||||
#{refundAmount},
|
||||
</if>
|
||||
<if test="payEndTime != null">pay_end_time =
|
||||
#{payEndTime},
|
||||
</if>
|
||||
<if test="buyNum != null">buy_num =
|
||||
#{buyNum},
|
||||
</if>
|
||||
<if test="refundBy != null">refund_by =
|
||||
#{refundBy},
|
||||
</if>
|
||||
<if test="refundReason != null">refund_reason =
|
||||
#{refundReason},
|
||||
</if>
|
||||
<if test="refundCode!=null">refund_code =
|
||||
#{refundCode},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
<if test="paymentScene !=null">
|
||||
payment_scene = #{paymentScene},
|
||||
</if>
|
||||
<if test="spotImage !=null">
|
||||
spot_image = #{spotImage},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateOrderStatus">
|
||||
update zdy_scenic_spot_audio_order
|
||||
set status = #{status}
|
||||
where order_code=#{orderCode}
|
||||
</update>
|
||||
<update id="updateOrderStatusById">
|
||||
update zdy_scenic_spot_audio_order
|
||||
set status = #{status}
|
||||
where id=#{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScenicSpotAudioOrderById" parameterType="Long">
|
||||
delete
|
||||
from zdy_scenic_spot_audio_order
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScenicSpotAudioOrderByIds" parameterType="String">
|
||||
delete from zdy_scenic_spot_audio_order where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user