<?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.izouma.awesomeadmin.dao.LandMarkMapper">
    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.LandMark">
        <id column="id" property="id" jdbcType="INTEGER"/>
        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
        <result column="map_name" property="mapName" jdbcType="VARCHAR"/>
        <result column="owned_city_id" property="ownedCityId" jdbcType="INTEGER"/>
        <result column="map_sprite" property="mapSprite" jdbcType="VARCHAR"/>
        <result column="loge_sprite" property="logeSprite" jdbcType="VARCHAR"/>
        <result column="open_describe" property="openDescribe" jdbcType="VARCHAR"/>
        <result column="mark_describe" property="markDescribe" jdbcType="VARCHAR"/>
        <result column="anchor_image_group_name" property="anchorImageGroupName" jdbcType="VARCHAR"/>
        <result column="default_mode" property="defaultMode" jdbcType="INTEGER"/>
        <result column="vuforia_image_group_id" property="vuforiaImageGroupId" jdbcType="INTEGER"/>
        <result column="vuforia_data_name" property="vuforiaDataName" jdbcType="VARCHAR"/>
        <result column="map_info" property="mapInfo" jdbcType="VARCHAR"/>
        <result column="map_width" property="mapWidth" jdbcType="VARCHAR"/>
        <result column="map_height" property="mapHeight" jdbcType="VARCHAR"/>
        <result column="map_rate" property="mapRate" jdbcType="VARCHAR"/>
        <result column="show_in_panel" property="showInPanel" jdbcType="VARCHAR"/>
        <result column="longitude" property="longitude" jdbcType="VARCHAR"/>
        <result column="latitude" property="latitude" jdbcType="VARCHAR"/>
        <result column="remark1" property="remark1" jdbcType="VARCHAR"/>
        <result column="remark2" property="remark2" jdbcType="VARCHAR"/>
        <result column="remark3" property="remark3" jdbcType="VARCHAR"/>
        <result column="front_level_id" property="frontLevelId" jdbcType="VARCHAR"/>
        <result column="type_id" property="typeId" jdbcType="INTEGER"/>
        <result column="keyword" property="keyword" jdbcType="VARCHAR"/>
        <result column="power" property="power" jdbcType="VARCHAR"/>
        <result column="area_map_info" property="areaMapInfo" jdbcType="VARCHAR"/>
        <result column="ad_image" property="adImage" jdbcType="VARCHAR"/>
        <result column="map_angle" property="mapAngle" jdbcType="VARCHAR"/>
        <result column="add_step" property="addStep" jdbcType="INTEGER"/>
        <result column="mark_level" property="markLevel" jdbcType="VARCHAR"/>
        <result column="mark_price" property="markPrice" jdbcType="VARCHAR"/>
        <result column="bus_route" property="busRoute" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        <trim suffixOverrides=",">
            id,

            del_flag,

            update_time,

            update_user,

            create_time,

            create_user,

            map_name,

            owned_city_id,

            map_sprite,

            loge_sprite,

            open_describe,

            mark_describe,

            anchor_image_group_name,

            default_mode,

            vuforia_image_group_id,

            vuforia_data_name,

            map_info,

            map_width,

            map_height,

            map_rate,

            show_in_panel,

            longitude,

            latitude,

            remark1,

            remark2,

            remark3,

            front_level_id,
            type_id,
            keyword,
            power,
            area_map_info,
            ad_image,
            map_angle,
            add_step,
            mark_level,
            mark_price,
            bus_route,

        </trim>
    </sql>
    <sql id="no_map_Column_List">
        <trim suffixOverrides=",">
            id,

            del_flag,

            update_time,

            update_user,

            create_time,

            create_user,

            map_name,

            owned_city_id,

            map_sprite,

            loge_sprite,

            open_describe,

            mark_describe,

            anchor_image_group_name,

            default_mode,

            vuforia_image_group_id,

            vuforia_data_name,


            map_width,

            map_height,

            map_rate,

            show_in_panel,

            longitude,

            latitude,

            remark1,

            remark2,

            remark3,

            front_level_id,
            type_id,
            keyword,
            power,
            ad_image,
            map_angle,
            add_step,
            mark_level,
            mark_price,
            bus_route,

        </trim>
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
        select
        <include refid="Base_Column_List"/>
        from land_mark
        where id = #{id,jdbcType=INTEGER}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
        delete from land_mark
        where id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.LandMark" useGeneratedKeys="true"
            keyProperty="id">
        insert into land_mark
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id!= null">
                id,
            </if>
            <if test="delFlag!= null">
                del_flag,
            </if>
            <if test="updateTime!= null">
                update_time,
            </if>
            <if test="updateUser!= null">
                update_user,
            </if>
            <if test="createTime!= null">
                create_time,
            </if>
            <if test="createUser!= null">
                create_user,
            </if>
            <if test="mapName!= null">
                map_name,
            </if>
            <if test="ownedCityId!= null">
                owned_city_id,
            </if>
            <if test="mapSprite!= null">
                map_sprite,
            </if>
            <if test="logeSprite!= null">
                loge_sprite,
            </if>
            <if test="openDescribe!= null">
                open_describe,
            </if>
            <if test="markDescribe!= null">
                mark_describe,
            </if>
            <if test="anchorImageGroupName!= null">
                anchor_image_group_name,
            </if>
            <if test="defaultMode!= null">
                default_mode,
            </if>
            <if test="vuforiaImageGroupId!= null">
                vuforia_image_group_id,
            </if>
            <if test="vuforiaDataName!= null">
                vuforia_data_name,
            </if>
            <if test="mapInfo!= null">
                map_info,
            </if>
            <if test="mapWidth!= null">
                map_width,
            </if>
            <if test="mapHeight!= null">
                map_height,
            </if>
            <if test="mapRate!= null">
                map_rate,
            </if>
            <if test="showInPanel!= null">
                show_in_panel,
            </if>
            <if test="longitude!= null">
                longitude,
            </if>
            <if test="latitude!= null">
                latitude,
            </if>
            <if test="remark1!= null">
                remark1,
            </if>
            <if test="remark2!= null">
                remark2,
            </if>
            <if test="remark3!= null">
                remark3,
            </if>
            <if test="frontLevelId!= null">
                front_level_id,
            </if>
            <if test="typeId!= null">
                type_id,
            </if>
            <if test="keyword!= null">
                keyword,
            </if>
            <if test="power!= null">
                power,
            </if>
            <if test="areaMapInfo!= null">
                area_map_info,
            </if>
            <if test="adImage!= null">
                ad_image,
            </if>
            <if test="mapAngle!= null">
                map_angle,
            </if>
            <if test="addStep!= null">
                add_step,
            </if>
            <if test="markLevel!= null">
                mark_level,
            </if>
            <if test="markPrice!= null">
                mark_price,
            </if>
            <if test="busRoute!= null">
                bus_route,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=INTEGER},
            </if>
            <if test="delFlag != null">
                #{delFlag,jdbcType=CHAR},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateUser != null">
                #{updateUser,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createUser != null">
                #{createUser,jdbcType=VARCHAR},
            </if>
            <if test="mapName != null">
                #{mapName,jdbcType=VARCHAR},
            </if>
            <if test="ownedCityId != null">
                #{ownedCityId,jdbcType=INTEGER},
            </if>
            <if test="mapSprite != null">
                #{mapSprite,jdbcType=VARCHAR},
            </if>
            <if test="logeSprite != null">
                #{logeSprite,jdbcType=VARCHAR},
            </if>
            <if test="openDescribe != null">
                #{openDescribe,jdbcType=VARCHAR},
            </if>
            <if test="markDescribe != null">
                #{markDescribe,jdbcType=VARCHAR},
            </if>
            <if test="anchorImageGroupName != null">
                #{anchorImageGroupName,jdbcType=VARCHAR},
            </if>
            <if test="defaultMode != null">
                #{defaultMode,jdbcType=INTEGER},
            </if>
            <if test="vuforiaImageGroupId != null">
                #{vuforiaImageGroupId,jdbcType=INTEGER},
            </if>
            <if test="vuforiaDataName != null">
                #{vuforiaDataName,jdbcType=VARCHAR},
            </if>
            <if test="mapInfo != null">
                #{mapInfo,jdbcType=VARCHAR},
            </if>
            <if test="mapWidth != null">
                #{mapWidth,jdbcType=VARCHAR},
            </if>
            <if test="mapHeight != null">
                #{mapHeight,jdbcType=VARCHAR},
            </if>
            <if test="mapRate != null">
                #{mapRate,jdbcType=VARCHAR},
            </if>
            <if test="showInPanel != null">
                #{showInPanel,jdbcType=VARCHAR},
            </if>
            <if test="longitude != null">
                #{longitude,jdbcType=VARCHAR},
            </if>
            <if test="latitude != null">
                #{latitude,jdbcType=VARCHAR},
            </if>
            <if test="remark1 != null">
                #{remark1,jdbcType=VARCHAR},
            </if>
            <if test="remark2 != null">
                #{remark2,jdbcType=VARCHAR},
            </if>
            <if test="remark3 != null">
                #{remark3,jdbcType=VARCHAR},
            </if>
            <if test="frontLevelId != null">
                #{frontLevelId,jdbcType=VARCHAR},
            </if>
            <if test="typeId != null">
                #{typeId},
            </if>
            <if test="keyword != null">
                #{keyword,jdbcType=VARCHAR},
            </if>
            <if test="power != null">
                #{power,jdbcType=VARCHAR},
            </if>
            <if test="areaMapInfo != null">
                #{areaMapInfo,jdbcType=VARCHAR},
            </if>
            <if test="adImage != null">
                #{adImage,jdbcType=VARCHAR},
            </if>
            <if test="mapAngle != null">
                #{mapAngle,jdbcType=VARCHAR},
            </if>
            <if test="addStep != null">
                #{addStep},
            </if>
            <if test="markLevel != null">
                #{markLevel,jdbcType=VARCHAR},
            </if>
            <if test="markPrice != null">
                #{markPrice,jdbcType=VARCHAR},
            </if>
            <if test="busRoute != null">
                #{busRoute,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.LandMark">
        update land_mark
        <set>
            <if test="id != null">
                id= #{id,jdbcType=INTEGER},
            </if>
            <if test="delFlag != null">
                del_flag= #{delFlag,jdbcType=CHAR},
            </if>
            <if test="updateTime != null">
                update_time= #{updateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateUser != null">
                update_user= #{updateUser,jdbcType=VARCHAR},
            </if>
            <if test="createTime != null">
                create_time= #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createUser != null">
                create_user= #{createUser,jdbcType=VARCHAR},
            </if>
            <if test="mapName != null">
                map_name= #{mapName,jdbcType=VARCHAR},
            </if>
            <if test="ownedCityId != null">
                owned_city_id= #{ownedCityId,jdbcType=INTEGER},
            </if>
            <if test="mapSprite != null">
                map_sprite= #{mapSprite,jdbcType=VARCHAR},
            </if>
            <if test="logeSprite != null">
                loge_sprite= #{logeSprite,jdbcType=VARCHAR},
            </if>
            <if test="openDescribe != null">
                open_describe= #{openDescribe,jdbcType=VARCHAR},
            </if>
            <if test="markDescribe != null">
                mark_describe= #{markDescribe,jdbcType=VARCHAR},
            </if>
            <if test="anchorImageGroupName != null">
                anchor_image_group_name= #{anchorImageGroupName,jdbcType=VARCHAR},
            </if>
            <if test="defaultMode != null">
                default_mode= #{defaultMode,jdbcType=INTEGER},
            </if>
            <if test="vuforiaImageGroupId != null">
                vuforia_image_group_id= #{vuforiaImageGroupId,jdbcType=INTEGER},
            </if>
            <if test="vuforiaDataName != null">
                vuforia_data_name= #{vuforiaDataName,jdbcType=VARCHAR},
            </if>
            <if test="mapInfo != null">
                map_info= #{mapInfo,jdbcType=VARCHAR},
            </if>
            <if test="mapWidth != null">
                map_width= #{mapWidth,jdbcType=VARCHAR},
            </if>
            <if test="mapHeight != null">
                map_height= #{mapHeight,jdbcType=VARCHAR},
            </if>
            <if test="mapRate != null">
                map_rate= #{mapRate,jdbcType=VARCHAR},
            </if>
            <if test="showInPanel != null">
                show_in_panel= #{showInPanel,jdbcType=VARCHAR},
            </if>
            <if test="longitude != null">
                longitude= #{longitude,jdbcType=VARCHAR},
            </if>
            <if test="latitude != null">
                latitude= #{latitude,jdbcType=VARCHAR},
            </if>
            <if test="remark1 != null">
                remark1= #{remark1,jdbcType=VARCHAR},
            </if>
            <if test="remark2 != null">
                remark2= #{remark2,jdbcType=VARCHAR},
            </if>
            <if test="remark3 != null">
                remark3= #{remark3,jdbcType=VARCHAR},
            </if>
            <if test="frontLevelId != null">
                front_level_id= #{frontLevelId,jdbcType=VARCHAR},
            </if>
            <if test="typeId != null">
                type_id= #{typeId},
            </if>
            <if test="keyword != null">
                keyword= #{keyword,jdbcType=VARCHAR},
            </if>
            <if test="power != null">
                power= #{power,jdbcType=VARCHAR},
            </if>
            <if test="areaMapInfo != null">
                area_map_info= #{areaMapInfo,jdbcType=VARCHAR},
            </if>
            <if test="adImage != null">
                ad_image = #{adImage,jdbcType=VARCHAR},
            </if>
            <if test="mapAngle != null">
                map_angle = #{mapAngle,jdbcType=VARCHAR},
            </if>
            <if test="addStep != null">
                add_step= #{addStep,jdbcType=INTEGER},
            </if>
            <if test="markLevel != null">
                mark_level = #{markLevel,jdbcType=VARCHAR},
            </if>
            <if test="markPrice != null">
                mark_price = #{markPrice,jdbcType=VARCHAR},
            </if>
            <if test="busRoute != null">
                bus_route = #{busRoute,jdbcType=VARCHAR},
            </if>
        </set>
        where
        <if test="id != null and !&quot;&quot;.equals(id)">
            id = #{id,jdbcType=INTEGER}
        </if>

        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
            id in (${idStr})
        </if>

    </update>
    <select id="queryAllLandMark" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.LandMark">
        select
        <include refid="Base_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
                and id in (${idStr})
            </if>
            <if test="id != null and !&quot;&quot;.equals(id)">
                and id = #{id}
            </if>
            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                and del_flag = #{delFlag}
            </if>
            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                and update_time = #{updateTime}
            </if>
            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                and update_user = #{updateUser}
            </if>
            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                and create_time = #{createTime}
            </if>
            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                and create_user = #{createUser}
            </if>
            <if test="mapName != null and !&quot;&quot;.equals(mapName)">
                and map_name = #{mapName}
            </if>
            <if test="ownedCityId != null and !&quot;&quot;.equals(ownedCityId)">
                and owned_city_id = #{ownedCityId}
            </if>
            <if test="mapSprite != null and !&quot;&quot;.equals(mapSprite)">
                and map_sprite = #{mapSprite}
            </if>
            <if test="logeSprite != null and !&quot;&quot;.equals(logeSprite)">
                and loge_sprite = #{logeSprite}
            </if>
            <if test="openDescribe != null and !&quot;&quot;.equals(openDescribe)">
                and open_describe = #{openDescribe}
            </if>
            <if test="markDescribe != null and !&quot;&quot;.equals(markDescribe)">
                and mark_describe = #{markDescribe}
            </if>
            <if test="anchorImageGroupName != null and !&quot;&quot;.equals(anchorImageGroupName)">
                and anchor_image_group_name = #{anchorImageGroupName}
            </if>
            <if test="defaultMode != null and !&quot;&quot;.equals(defaultMode)">
                and default_mode = #{defaultMode}
            </if>
            <if test="vuforiaImageGroupId != null and !&quot;&quot;.equals(vuforiaImageGroupId)">
                and vuforia_image_group_id = #{vuforiaImageGroupId}
            </if>
            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
                and vuforia_data_name = #{vuforiaDataName}
            </if>
            <if test="mapInfo != null and !&quot;&quot;.equals(mapInfo)">
                and map_info = #{mapInfo}
            </if>
            <if test="mapWidth != null and !&quot;&quot;.equals(mapWidth)">
                and map_width = #{mapWidth}
            </if>
            <if test="mapHeight != null and !&quot;&quot;.equals(mapHeight)">
                and map_height = #{mapHeight}
            </if>
            <if test="mapRate != null and !&quot;&quot;.equals(mapRate)">
                and map_rate = #{mapRate}
            </if>
            <if test="showInPanel != null and !&quot;&quot;.equals(showInPanel)">
                and show_in_panel = #{showInPanel}
            </if>
            <if test="longitude != null and !&quot;&quot;.equals(longitude)">
                and longitude = #{longitude}
            </if>
            <if test="latitude != null and !&quot;&quot;.equals(latitude)">
                and latitude = #{latitude}
            </if>
            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
                and remark1 = #{remark1}
            </if>
            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
                and remark2 = #{remark2}
            </if>
            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
                and remark3 = #{remark3}
            </if>
            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
                and type_id = #{type_id}
            </if>
            <if test="keyword != null and !&quot;&quot;.equals(keyword)">
                and keyword = #{keyword}
            </if>
            <if test="power != null and !&quot;&quot;.equals(power)">
                and power = #{power}
            </if>
            <if test="areaMapInfo != null and !&quot;&quot;.equals(areaMapInfo)">
                and area_map_info = #{areaMapInfo}
            </if>
            <if test="addStep != null and !&quot;&quot;.equals(addStep)">
                and add_step = #{addStep}
            </if>
            <if test="addStepStr != null and !&quot;&quot;.equals(addStepStr)">
                and add_step in (${addStepStr})
            </if>
            <if test="frontLevelId != null and !&quot;&quot;.equals(frontLevelId)">

                and (front_level_id = #{frontLevelId}
                <if test="'0'.toString()==frontLevelId">
                    or (front_level_id is null or front_level_id = '')
                </if>
                )
            </if>
            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                <trim prefix="and (" suffix=")" prefixOverrides="OR">
                    OR map_name LIKE concat('%',#{searchKey},'%')
                    OR owned_city_id LIKE concat('%',#{searchKey},'%')
                    OR map_sprite LIKE concat('%',#{searchKey},'%')
                    OR loge_sprite LIKE concat('%',#{searchKey},'%')
                    OR open_describe LIKE concat('%',#{searchKey},'%')
                    OR mark_describe LIKE concat('%',#{searchKey},'%')
                    OR anchor_image_group_name LIKE concat('%',#{searchKey},'%')
                    OR default_mode LIKE concat('%',#{searchKey},'%')
                    OR vuforia_image_group_id LIKE concat('%',#{searchKey},'%')
                    OR vuforia_data_name LIKE concat('%',#{searchKey},'%')
                    OR map_width LIKE concat('%',#{searchKey},'%')
                    OR map_height LIKE concat('%',#{searchKey},'%')
                    OR map_rate LIKE concat('%',#{searchKey},'%')
                    OR show_in_panel LIKE concat('%',#{searchKey},'%')
                    OR longitude LIKE concat('%',#{searchKey},'%')
                    OR latitude LIKE concat('%',#{searchKey},'%')
                    OR remark1 LIKE concat('%',#{searchKey},'%')
                    OR remark2 LIKE concat('%',#{searchKey},'%')
                    OR remark3 LIKE concat('%',#{searchKey},'%')
                    OR front_level_id LIKE concat('%',#{searchKey},'%')
                    OR keyword LIKE concat('%',#{keyword},'%')
                </trim>
            </if>
            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
                    <choose>
                        <when test="item.indexOf('like') != -1">
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    concat('%',#{itemDetail},'%')
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </when>
                        <otherwise>
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    #{itemDetail}
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </otherwise>
                    </choose>


                </foreach>


            </if>


        </where>
        order by

        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>

        id desc
    </select>
    <select id="queryAllLandMarkNoMap" parameterType="java.util.Map"
            resultType="com.izouma.awesomeadmin.model.LandMark">
        select
        <include refid="no_map_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
                and id in (${idStr})
            </if>
            <if test="id != null and !&quot;&quot;.equals(id)">
                and id = #{id}
            </if>
            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                and del_flag = #{delFlag}
            </if>
            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                and update_time = #{updateTime}
            </if>
            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                and update_user = #{updateUser}
            </if>
            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                and create_time = #{createTime}
            </if>
            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                and create_user = #{createUser}
            </if>
            <if test="mapName != null and !&quot;&quot;.equals(mapName)">
                and map_name = #{mapName}
            </if>
            <if test="ownedCityId != null and !&quot;&quot;.equals(ownedCityId)">
                and owned_city_id = #{ownedCityId}
            </if>
            <if test="mapSprite != null and !&quot;&quot;.equals(mapSprite)">
                and map_sprite = #{mapSprite}
            </if>
            <if test="logeSprite != null and !&quot;&quot;.equals(logeSprite)">
                and loge_sprite = #{logeSprite}
            </if>
            <if test="openDescribe != null and !&quot;&quot;.equals(openDescribe)">
                and open_describe = #{openDescribe}
            </if>
            <if test="markDescribe != null and !&quot;&quot;.equals(markDescribe)">
                and mark_describe = #{markDescribe}
            </if>
            <if test="anchorImageGroupName != null and !&quot;&quot;.equals(anchorImageGroupName)">
                and anchor_image_group_name = #{anchorImageGroupName}
            </if>
            <if test="defaultMode != null and !&quot;&quot;.equals(defaultMode)">
                and default_mode = #{defaultMode}
            </if>
            <if test="vuforiaImageGroupId != null and !&quot;&quot;.equals(vuforiaImageGroupId)">
                and vuforia_image_group_id = #{vuforiaImageGroupId}
            </if>
            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
                and vuforia_data_name = #{vuforiaDataName}
            </if>
            <if test="mapInfo != null and !&quot;&quot;.equals(mapInfo)">
                and map_info = #{mapInfo}
            </if>
            <if test="mapWidth != null and !&quot;&quot;.equals(mapWidth)">
                and map_width = #{mapWidth}
            </if>
            <if test="mapHeight != null and !&quot;&quot;.equals(mapHeight)">
                and map_height = #{mapHeight}
            </if>
            <if test="mapRate != null and !&quot;&quot;.equals(mapRate)">
                and map_rate = #{mapRate}
            </if>
            <if test="showInPanel != null and !&quot;&quot;.equals(showInPanel)">
                and show_in_panel = #{showInPanel}
            </if>
            <if test="longitude != null and !&quot;&quot;.equals(longitude)">
                and longitude = #{longitude}
            </if>
            <if test="latitude != null and !&quot;&quot;.equals(latitude)">
                and latitude = #{latitude}
            </if>
            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
                and remark1 = #{remark1}
            </if>
            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
                and remark2 = #{remark2}
            </if>
            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
                and remark3 = #{remark3}
            </if>
            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
                and type_id = #{type_id}
            </if>
            <if test="keyword != null and !&quot;&quot;.equals(keyword)">
                and keyword = #{keyword}
            </if>
            <if test="power != null and !&quot;&quot;.equals(power)">
                and power = #{power}
            </if>
            <if test="areaMapInfo != null and !&quot;&quot;.equals(areaMapInfo)">
                and area_map_info = #{areaMapInfo}
            </if>
            <if test="addStep != null and !&quot;&quot;.equals(addStep)">
                and add_step = #{addStep}
            </if>
            <if test="addStepStr != null and !&quot;&quot;.equals(addStepStr)">
                and add_step in (${addStepStr})
            </if>
            <if test="frontLevelId != null and !&quot;&quot;.equals(frontLevelId)">

                and (front_level_id = #{frontLevelId}
                <if test="'0'.toString()==frontLevelId">
                    or (front_level_id is null or front_level_id = '')
                </if>
                )
            </if>
            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                <trim prefix="and (" suffix=")" prefixOverrides="OR">
                    OR map_name LIKE concat('%',#{searchKey},'%')
                    OR owned_city_id LIKE concat('%',#{searchKey},'%')
                    OR map_sprite LIKE concat('%',#{searchKey},'%')
                    OR loge_sprite LIKE concat('%',#{searchKey},'%')
                    OR open_describe LIKE concat('%',#{searchKey},'%')
                    OR mark_describe LIKE concat('%',#{searchKey},'%')
                    OR anchor_image_group_name LIKE concat('%',#{searchKey},'%')
                    OR default_mode LIKE concat('%',#{searchKey},'%')
                    OR vuforia_image_group_id LIKE concat('%',#{searchKey},'%')
                    OR vuforia_data_name LIKE concat('%',#{searchKey},'%')
                    OR map_width LIKE concat('%',#{searchKey},'%')
                    OR map_height LIKE concat('%',#{searchKey},'%')
                    OR map_rate LIKE concat('%',#{searchKey},'%')
                    OR show_in_panel LIKE concat('%',#{searchKey},'%')
                    OR longitude LIKE concat('%',#{searchKey},'%')
                    OR latitude LIKE concat('%',#{searchKey},'%')
                    OR remark1 LIKE concat('%',#{searchKey},'%')
                    OR remark2 LIKE concat('%',#{searchKey},'%')
                    OR remark3 LIKE concat('%',#{searchKey},'%')
                    OR front_level_id LIKE concat('%',#{searchKey},'%')
                    OR keyword LIKE concat('%',#{keyword},'%')
                </trim>
            </if>
            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
                    <choose>
                        <when test="item.indexOf('like') != -1">
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    concat('%',#{itemDetail},'%')
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </when>
                        <otherwise>
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    #{itemDetail}
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </otherwise>
                    </choose>


                </foreach>


            </if>


        </where>
        order by

        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>

        id desc
    </select>
    <select id="getNavigationPackageByPage" parameterType="java.util.Map"
            resultMap="NavigationPackageResultMap">
        select
        <include refid="no_map_Column_List"/>,
        #{record.buyFlag} as buy_flag, #{record.userId} as user_id
        from land_mark
        <where>
            and del_flag = 'N'

            and id IN (
            SELECT
            DISTINCT land_mark_id
            FROM
            navigation_package
            WHERE
            del_flag = 'N'
            AND shelf_flag = 'Y'

            <if test="record.buyFlag != null and !&quot;&quot;.equals(record.buyFlag)">
                <choose>
                    <when test="record.buyFlag == 'Y'.toString()">
                        AND id IN (
                        SELECT
                        DISTINCT package_id
                        FROM
                        user_order
                        WHERE
                        del_flag = 'N'
                        AND status_flag = 1
                        AND user_id = #{record.userId}
                        )
                    </when>
                    <otherwise>

                        AND id NOT IN (
                        SELECT
                        DISTINCT package_id
                        FROM
                        user_order
                        WHERE
                        del_flag = 'N'
                        AND status_flag = 1
                        AND user_id = #{record.userId}
                        )
                    </otherwise>
                </choose>
            </if>

            )

            <if test="record.distance != null and !&quot;&quot;.equals(record.distance)">

                <![CDATA[
                   AND ( ACOS(
                SIN((#{record.latKey} * PI()) / 180) * SIN((latitude * PI()) / 180) +
                COS((#{record.latKey} * PI()) / 180) * COS((latitude * PI()) / 180) * COS(
                (#{record.lngKey} * PI()) / 180 - (longitude * PI()) / 180
                )
                ) * 6371.004 )  <= #{record.distance}
                    AND longitude > #{record.lngKey} - 3
                    AND longitude < #{record.lngKey} + 3
                    AND latitude > #{record.latKey} - 3
                    AND latitude < #{record.latKey} + 3
                    ]]>
            </if>


        </where>
        order by

        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>
        id desc

    </select>
    <select id="getNavigationPackageAll" parameterType="java.util.Map"
            resultMap="NavigationPackageResultMap">
        select
        <include refid="no_map_Column_List"/>,
        #{buyFlag} as buy_flag, #{userId} as user_id
        from land_mark
        <where>
            and del_flag = 'N'

            and id IN (
            SELECT
            DISTINCT land_mark_id
            FROM
            navigation_package
            WHERE
            del_flag = 'N'
            AND shelf_flag = 'Y'

            <if test="buyFlag != null and !&quot;&quot;.equals(buyFlag)">
                <choose>
                    <when test="buyFlag == 'Y'.toString()">
                        AND id IN (
                        SELECT
                        DISTINCT package_id
                        FROM
                        user_order
                        WHERE
                        del_flag = 'N'
                        AND status_flag = 1
                        AND user_id = #{userId}
                        )
                    </when>
                    <otherwise>

                        AND id NOT IN (
                        SELECT
                        DISTINCT package_id
                        FROM
                        user_order
                        WHERE
                        del_flag = 'N'
                        AND status_flag = 1
                        AND user_id = #{userId}
                        )
                    </otherwise>
                </choose>
            </if>

            )

            <if test="distance != null and !&quot;&quot;.equals(distance)">

                <![CDATA[
                   AND ( ACOS(
                SIN((#{latKey} * PI()) / 180) * SIN((latitude * PI()) / 180) +
                COS((#{latKey} * PI()) / 180) * COS((latitude * PI()) / 180) * COS(
                (#{lngKey} * PI()) / 180 - (longitude * PI()) / 180
                )
                ) * 6371.004 )  <= #{distance}
                    AND longitude > #{lngKey} - 3
                    AND longitude < #{lngKey} + 3
                    AND latitude > #{latKey} - 3
                    AND latitude < #{latKey} + 3
                    ]]>
            </if>


        </where>
        order by

        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>
        id desc

    </select>
    <select id="queryLandMarkByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.LandMark">
        select
        <include refid="Base_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
                and id in (${record.idStr})
            </if>
            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
                and id = #{record.id}
            </if>
            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
                and del_flag = #{record.delFlag}
            </if>
            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
                and update_time = #{record.updateTime}
            </if>
            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
                and update_user = #{record.updateUser}
            </if>
            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
                and create_time = #{record.createTime}
            </if>
            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
                and create_user = #{record.createUser}
            </if>
            <if test="record.mapName != null and !&quot;&quot;.equals(record.mapName)">
                and map_name = #{record.mapName}
            </if>
            <if test="record.ownedCityId != null and !&quot;&quot;.equals(record.ownedCityId)">
                and owned_city_id = #{record.ownedCityId}
            </if>
            <if test="record.mapSprite != null and !&quot;&quot;.equals(record.mapSprite)">
                and map_sprite = #{record.mapSprite}
            </if>
            <if test="record.logeSprite != null and !&quot;&quot;.equals(record.logeSprite)">
                and loge_sprite = #{record.logeSprite}
            </if>
            <if test="record.openDescribe != null and !&quot;&quot;.equals(record.openDescribe)">
                and open_describe = #{record.openDescribe}
            </if>
            <if test="record.markDescribe != null and !&quot;&quot;.equals(record.markDescribe)">
                and mark_describe = #{record.markDescribe}
            </if>
            <if test="record.anchorImageGroupName != null and !&quot;&quot;.equals(record.anchorImageGroupName)">
                and anchor_image_group_name = #{record.anchorImageGroupName}
            </if>
            <if test="record.defaultMode != null and !&quot;&quot;.equals(record.defaultMode)">
                and default_mode = #{record.defaultMode}
            </if>
            <if test="record.vuforiaImageGroupId != null and !&quot;&quot;.equals(record.vuforiaImageGroupId)">
                and vuforia_image_group_id = #{record.vuforiaImageGroupId}
            </if>
            <if test="record.vuforiaDataName != null and !&quot;&quot;.equals(record.vuforiaDataName)">
                and vuforia_data_name = #{record.vuforiaDataName}
            </if>
            <if test="record.mapInfo != null and !&quot;&quot;.equals(record.mapInfo)">
                and map_info = #{record.mapInfo}
            </if>
            <if test="record.mapWidth != null and !&quot;&quot;.equals(record.mapWidth)">
                and map_width = #{record.mapWidth}
            </if>
            <if test="record.mapHeight != null and !&quot;&quot;.equals(record.mapHeight)">
                and map_height = #{record.mapHeight}
            </if>
            <if test="record.mapRate != null and !&quot;&quot;.equals(record.mapRate)">
                and map_rate = #{record.mapRate}
            </if>
            <if test="record.showInPanel != null and !&quot;&quot;.equals(record.showInPanel)">
                and show_in_panel = #{record.showInPanel}
            </if>
            <if test="record.longitude != null and !&quot;&quot;.equals(record.longitude)">
                and longitude = #{record.longitude}
            </if>
            <if test="record.latitude != null and !&quot;&quot;.equals(record.latitude)">
                and latitude = #{record.latitude}
            </if>
            <if test="record.remark1 != null and !&quot;&quot;.equals(record.remark1)">
                and remark1 = #{record.remark1}
            </if>
            <if test="record.remark2 != null and !&quot;&quot;.equals(record.remark2)">
                and remark2 = #{record.remark2}
            </if>
            <if test="record.remark3 != null and !&quot;&quot;.equals(record.remark3)">
                and remark3 = #{record.remark3}
            </if>
            <if test="record.typeId != null and !&quot;&quot;.equals(record.typeId)">
                and type_id = #{record.typeId}
            </if>
            <if test="record.keyword != null and !&quot;&quot;.equals(record.keyword)">
                and keyword = #{record.keyword}
            </if>
            <if test="record.power != null and !&quot;&quot;.equals(record.power)">
                and power = #{record.power}
            </if>
            <if test="record.areaMapInfo != null and !&quot;&quot;.equals(record.areaMapInfo)">
                and area_map_info = #{record.areaMapInfo}
            </if>
            <if test="record.addStep != null and !&quot;&quot;.equals(record.addStep)">
                and add_step = #{record.addStep}
            </if>

            <if test="record.addStepStr != null and !&quot;&quot;.equals(record.addStepStr)">
                and add_step in (${record.addStepStr})
            </if>

            <if test="record.frontLevelId != null and !&quot;&quot;.equals(record.frontLevelId)">

                and (front_level_id = #{record.frontLevelId}
                <if test="'0'.toString()==record.frontLevelId">
                    or (front_level_id is null or front_level_id = '')
                </if>
                )
            </if>
            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
                <trim prefix="and (" suffix=")" prefixOverrides="OR">
                    OR map_name LIKE concat('%',#{record.searchKey},'%')
                    OR owned_city_id LIKE concat('%',#{record.searchKey},'%')
                    OR map_sprite LIKE concat('%',#{record.searchKey},'%')
                    OR loge_sprite LIKE concat('%',#{record.searchKey},'%')
                    OR open_describe LIKE concat('%',#{record.searchKey},'%')
                    OR mark_describe LIKE concat('%',#{record.searchKey},'%')
                    OR anchor_image_group_name LIKE concat('%',#{record.searchKey},'%')
                    OR default_mode LIKE concat('%',#{record.searchKey},'%')
                    OR vuforia_image_group_id LIKE concat('%',#{record.searchKey},'%')
                    OR vuforia_data_name LIKE concat('%',#{record.searchKey},'%')
                    OR map_info LIKE concat('%',#{record.searchKey},'%')
                    OR map_width LIKE concat('%',#{record.searchKey},'%')
                    OR map_height LIKE concat('%',#{record.searchKey},'%')
                    OR map_rate LIKE concat('%',#{record.searchKey},'%')
                    OR show_in_panel LIKE concat('%',#{record.searchKey},'%')
                    OR longitude LIKE concat('%',#{record.searchKey},'%')
                    OR latitude LIKE concat('%',#{record.searchKey},'%')
                    OR remark1 LIKE concat('%',#{record.searchKey},'%')
                    OR remark2 LIKE concat('%',#{record.searchKey},'%')
                    OR remark3 LIKE concat('%',#{record.searchKey},'%')
                    OR front_level_id LIKE concat('%',#{record.searchKey},'%')
                    OR keyword LIKE concat('%',#{record.keyword},'%')
                </trim>
            </if>

            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
                    <choose>
                        <when test="item.indexOf('like') != -1">
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    concat('%',#{itemDetail},'%')
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </when>
                        <otherwise>
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    #{itemDetail}
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </otherwise>
                    </choose>


                </foreach>


            </if>


            <if test="record.distance != null and !&quot;&quot;.equals(record.distance)">

                <![CDATA[
                   AND ( ACOS(
                SIN((#{record.latKey} * PI()) / 180) * SIN((latitude * PI()) / 180) +
                COS((#{record.latKey} * PI()) / 180) * COS((latitude * PI()) / 180) * COS(
                (#{record.lngKey} * PI()) / 180 - (longitude * PI()) / 180
                )
                ) * 6371.004 )  <= #{record.distance}
                    AND longitude > #{record.lngKey} - 3
                    AND longitude < #{record.lngKey} + 3
                    AND latitude > #{record.latKey} - 3
                    AND latitude < #{record.latKey} + 3
                    ]]>
            </if>


        </where>
        order by

        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>
        id desc
    </select>
    <select id="queryLandMarkNoMapByPage" parameterType="java.util.Map"
            resultType="com.izouma.awesomeadmin.model.LandMark">
        select
        <include refid="no_map_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
                and id in (${record.idStr})
            </if>
            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
                and id = #{record.id}
            </if>
            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
                and del_flag = #{record.delFlag}
            </if>
            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
                and update_time = #{record.updateTime}
            </if>
            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
                and update_user = #{record.updateUser}
            </if>
            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
                and create_time = #{record.createTime}
            </if>
            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
                and create_user = #{record.createUser}
            </if>
            <if test="record.mapName != null and !&quot;&quot;.equals(record.mapName)">
                and map_name = #{record.mapName}
            </if>
            <if test="record.ownedCityId != null and !&quot;&quot;.equals(record.ownedCityId)">
                and owned_city_id = #{record.ownedCityId}
            </if>
            <if test="record.mapSprite != null and !&quot;&quot;.equals(record.mapSprite)">
                and map_sprite = #{record.mapSprite}
            </if>
            <if test="record.logeSprite != null and !&quot;&quot;.equals(record.logeSprite)">
                and loge_sprite = #{record.logeSprite}
            </if>
            <if test="record.openDescribe != null and !&quot;&quot;.equals(record.openDescribe)">
                and open_describe = #{record.openDescribe}
            </if>
            <if test="record.markDescribe != null and !&quot;&quot;.equals(record.markDescribe)">
                and mark_describe = #{record.markDescribe}
            </if>
            <if test="record.anchorImageGroupName != null and !&quot;&quot;.equals(record.anchorImageGroupName)">
                and anchor_image_group_name = #{record.anchorImageGroupName}
            </if>
            <if test="record.defaultMode != null and !&quot;&quot;.equals(record.defaultMode)">
                and default_mode = #{record.defaultMode}
            </if>
            <if test="record.vuforiaImageGroupId != null and !&quot;&quot;.equals(record.vuforiaImageGroupId)">
                and vuforia_image_group_id = #{record.vuforiaImageGroupId}
            </if>
            <if test="record.vuforiaDataName != null and !&quot;&quot;.equals(record.vuforiaDataName)">
                and vuforia_data_name = #{record.vuforiaDataName}
            </if>
            <if test="record.mapInfo != null and !&quot;&quot;.equals(record.mapInfo)">
                and map_info = #{record.mapInfo}
            </if>
            <if test="record.mapWidth != null and !&quot;&quot;.equals(record.mapWidth)">
                and map_width = #{record.mapWidth}
            </if>
            <if test="record.mapHeight != null and !&quot;&quot;.equals(record.mapHeight)">
                and map_height = #{record.mapHeight}
            </if>
            <if test="record.mapRate != null and !&quot;&quot;.equals(record.mapRate)">
                and map_rate = #{record.mapRate}
            </if>
            <if test="record.showInPanel != null and !&quot;&quot;.equals(record.showInPanel)">
                and show_in_panel = #{record.showInPanel}
            </if>
            <if test="record.longitude != null and !&quot;&quot;.equals(record.longitude)">
                and longitude = #{record.longitude}
            </if>
            <if test="record.latitude != null and !&quot;&quot;.equals(record.latitude)">
                and latitude = #{record.latitude}
            </if>
            <if test="record.remark1 != null and !&quot;&quot;.equals(record.remark1)">
                and remark1 = #{record.remark1}
            </if>
            <if test="record.remark2 != null and !&quot;&quot;.equals(record.remark2)">
                and remark2 = #{record.remark2}
            </if>
            <if test="record.remark3 != null and !&quot;&quot;.equals(record.remark3)">
                and remark3 = #{record.remark3}
            </if>
            <if test="record.typeId != null and !&quot;&quot;.equals(record.typeId)">
                and type_id = #{record.typeId}
            </if>
            <if test="record.keyword != null and !&quot;&quot;.equals(record.keyword)">
                and keyword = #{record.keyword}
            </if>
            <if test="record.power != null and !&quot;&quot;.equals(record.power)">
                and power = #{record.power}
            </if>
            <if test="record.areaMapInfo != null and !&quot;&quot;.equals(record.areaMapInfo)">
                and area_map_info = #{record.areaMapInfo}
            </if>
            <if test="record.addStep != null and !&quot;&quot;.equals(record.addStep)">
                and add_step = #{record.addStep}
            </if>

            <if test="record.addStepStr != null and !&quot;&quot;.equals(record.addStepStr)">
                and add_step in (${record.addStepStr})
            </if>

            <if test="record.frontLevelId != null and !&quot;&quot;.equals(record.frontLevelId)">

                and (front_level_id = #{record.frontLevelId}
                <if test="'0'.toString()==record.frontLevelId">
                    or (front_level_id is null or front_level_id = '')
                </if>
                )
            </if>
            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
                <trim prefix="and (" suffix=")" prefixOverrides="OR">
                    OR map_name LIKE concat('%',#{record.searchKey},'%')
                    OR owned_city_id LIKE concat('%',#{record.searchKey},'%')
                    OR map_sprite LIKE concat('%',#{record.searchKey},'%')
                    OR loge_sprite LIKE concat('%',#{record.searchKey},'%')
                    OR open_describe LIKE concat('%',#{record.searchKey},'%')
                    OR mark_describe LIKE concat('%',#{record.searchKey},'%')
                    OR anchor_image_group_name LIKE concat('%',#{record.searchKey},'%')
                    OR default_mode LIKE concat('%',#{record.searchKey},'%')
                    OR vuforia_image_group_id LIKE concat('%',#{record.searchKey},'%')
                    OR vuforia_data_name LIKE concat('%',#{record.searchKey},'%')
                    OR map_info LIKE concat('%',#{record.searchKey},'%')
                    OR map_width LIKE concat('%',#{record.searchKey},'%')
                    OR map_height LIKE concat('%',#{record.searchKey},'%')
                    OR map_rate LIKE concat('%',#{record.searchKey},'%')
                    OR show_in_panel LIKE concat('%',#{record.searchKey},'%')
                    OR longitude LIKE concat('%',#{record.searchKey},'%')
                    OR latitude LIKE concat('%',#{record.searchKey},'%')
                    OR remark1 LIKE concat('%',#{record.searchKey},'%')
                    OR remark2 LIKE concat('%',#{record.searchKey},'%')
                    OR remark3 LIKE concat('%',#{record.searchKey},'%')
                    OR front_level_id LIKE concat('%',#{record.searchKey},'%')
                    OR keyword LIKE concat('%',#{record.keyword},'%')
                </trim>
            </if>

            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
                    <choose>
                        <when test="item.indexOf('like') != -1">
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    concat('%',#{itemDetail},'%')
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </when>
                        <otherwise>
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    #{itemDetail}
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </otherwise>
                    </choose>


                </foreach>


            </if>


            <if test="record.distance != null and !&quot;&quot;.equals(record.distance)">

                <![CDATA[
                   AND ( ACOS(
                SIN((#{record.latKey} * PI()) / 180) * SIN((latitude * PI()) / 180) +
                COS((#{record.latKey} * PI()) / 180) * COS((latitude * PI()) / 180) * COS(
                (#{record.lngKey} * PI()) / 180 - (longitude * PI()) / 180
                )
                ) * 6371.004 )  <= #{record.distance}
                    AND longitude > #{record.lngKey} - 3
                    AND longitude < #{record.lngKey} + 3
                    AND latitude > #{record.latKey} - 3
                    AND latitude < #{record.latKey} + 3
                    ]]>
            </if>


        </where>
        order by

        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>
        id desc
    </select>
    <select id="queryCityLandMarkByPage" parameterType="java.util.Map" resultMap="AllLandMarkResultMap">
        select
        <include refid="Base_Column_List"/>
        , #{record.areaTypeId} as area_type_id
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
                and id in (${record.idStr})
            </if>
            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
                and id = #{record.id}
            </if>
            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
                and del_flag = #{record.delFlag}
            </if>
            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
                and update_time = #{record.updateTime}
            </if>
            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
                and update_user = #{record.updateUser}
            </if>
            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
                and create_time = #{record.createTime}
            </if>
            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
                and create_user = #{record.createUser}
            </if>
            <if test="record.mapName != null and !&quot;&quot;.equals(record.mapName)">
                and map_name = #{record.mapName}
            </if>
            <if test="record.ownedCityId != null and !&quot;&quot;.equals(record.ownedCityId)">
                and owned_city_id = #{record.ownedCityId}
            </if>
            <if test="record.mapSprite != null and !&quot;&quot;.equals(record.mapSprite)">
                and map_sprite = #{record.mapSprite}
            </if>
            <if test="record.logeSprite != null and !&quot;&quot;.equals(record.logeSprite)">
                and loge_sprite = #{record.logeSprite}
            </if>
            <if test="record.openDescribe != null and !&quot;&quot;.equals(record.openDescribe)">
                and open_describe = #{record.openDescribe}
            </if>
            <if test="record.markDescribe != null and !&quot;&quot;.equals(record.markDescribe)">
                and mark_describe = #{record.markDescribe}
            </if>
            <if test="record.anchorImageGroupName != null and !&quot;&quot;.equals(record.anchorImageGroupName)">
                and anchor_image_group_name = #{record.anchorImageGroupName}
            </if>
            <if test="record.defaultMode != null and !&quot;&quot;.equals(record.defaultMode)">
                and default_mode = #{record.defaultMode}
            </if>
            <if test="record.vuforiaImageGroupId != null and !&quot;&quot;.equals(record.vuforiaImageGroupId)">
                and vuforia_image_group_id = #{record.vuforiaImageGroupId}
            </if>
            <if test="record.vuforiaDataName != null and !&quot;&quot;.equals(record.vuforiaDataName)">
                and vuforia_data_name = #{record.vuforiaDataName}
            </if>
            <if test="record.mapInfo != null and !&quot;&quot;.equals(record.mapInfo)">
                and map_info = #{record.mapInfo}
            </if>
            <if test="record.mapWidth != null and !&quot;&quot;.equals(record.mapWidth)">
                and map_width = #{record.mapWidth}
            </if>
            <if test="record.mapHeight != null and !&quot;&quot;.equals(record.mapHeight)">
                and map_height = #{record.mapHeight}
            </if>
            <if test="record.mapRate != null and !&quot;&quot;.equals(record.mapRate)">
                and map_rate = #{record.mapRate}
            </if>
            <if test="record.showInPanel != null and !&quot;&quot;.equals(record.showInPanel)">
                and show_in_panel = #{record.showInPanel}
            </if>
            <if test="record.longitude != null and !&quot;&quot;.equals(record.longitude)">
                and longitude = #{record.longitude}
            </if>
            <if test="record.latitude != null and !&quot;&quot;.equals(record.latitude)">
                and latitude = #{record.latitude}
            </if>
            <if test="record.remark1 != null and !&quot;&quot;.equals(record.remark1)">
                and remark1 = #{record.remark1}
            </if>
            <if test="record.remark2 != null and !&quot;&quot;.equals(record.remark2)">
                and remark2 = #{record.remark2}
            </if>
            <if test="record.remark3 != null and !&quot;&quot;.equals(record.remark3)">
                and remark3 = #{record.remark3}
            </if>
            <if test="record.typeId != null and !&quot;&quot;.equals(record.typeId)">
                and type_id = #{record.typeId}
            </if>
            <if test="record.keyword != null and !&quot;&quot;.equals(record.keyword)">
                and keyword = #{record.keyword}
            </if>
            <if test="record.power != null and !&quot;&quot;.equals(record.power)">
                and power = #{record.power}
            </if>
            <if test="record.areaMapInfo != null and !&quot;&quot;.equals(record.areaMapInfo)">
                and area_map_info = #{record.areaMapInfo}
            </if>
            <if test="record.addStep != null and !&quot;&quot;.equals(record.addStep)">
                and add_step = #{record.addStep}
            </if>

            <if test="record.addStepStr != null and !&quot;&quot;.equals(record.addStepStr)">
                and add_step in (${record.addStepStr})
            </if>

            <if test="record.frontLevelId != null and !&quot;&quot;.equals(record.frontLevelId)">

                and (front_level_id = #{record.frontLevelId}
                <if test="'0'.toString()==record.frontLevelId">
                    or (front_level_id is null or front_level_id = '')
                </if>
                )
            </if>
            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
                <trim prefix="and (" suffix=")" prefixOverrides="OR">
                    OR map_name LIKE concat('%',#{record.searchKey},'%')
                    OR owned_city_id LIKE concat('%',#{record.searchKey},'%')
                    OR map_sprite LIKE concat('%',#{record.searchKey},'%')
                    OR loge_sprite LIKE concat('%',#{record.searchKey},'%')
                    OR open_describe LIKE concat('%',#{record.searchKey},'%')
                    OR mark_describe LIKE concat('%',#{record.searchKey},'%')
                    OR anchor_image_group_name LIKE concat('%',#{record.searchKey},'%')
                    OR default_mode LIKE concat('%',#{record.searchKey},'%')
                    OR vuforia_image_group_id LIKE concat('%',#{record.searchKey},'%')
                    OR vuforia_data_name LIKE concat('%',#{record.searchKey},'%')
                    OR map_width LIKE concat('%',#{record.searchKey},'%')
                    OR map_height LIKE concat('%',#{record.searchKey},'%')
                    OR map_rate LIKE concat('%',#{record.searchKey},'%')
                    OR show_in_panel LIKE concat('%',#{record.searchKey},'%')
                    OR longitude LIKE concat('%',#{record.searchKey},'%')
                    OR latitude LIKE concat('%',#{record.searchKey},'%')
                    OR remark1 LIKE concat('%',#{record.searchKey},'%')
                    OR remark2 LIKE concat('%',#{record.searchKey},'%')
                    OR remark3 LIKE concat('%',#{record.searchKey},'%')
                    OR front_level_id LIKE concat('%',#{record.searchKey},'%')
                    OR keyword LIKE concat('%',#{record.keyword},'%')
                </trim>
            </if>

            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
                    <choose>
                        <when test="item.indexOf('like') != -1">
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    concat('%',#{itemDetail},'%')
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </when>
                        <otherwise>
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    #{itemDetail}
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </otherwise>
                    </choose>


                </foreach>


            </if>


            <if test="record.distance != null and !&quot;&quot;.equals(record.distance)">

                <![CDATA[
                   AND ( ACOS(
                SIN((#{record.latKey} * PI()) / 180) * SIN((latitude * PI()) / 180) +
                COS((#{record.latKey} * PI()) / 180) * COS((latitude * PI()) / 180) * COS(
                (#{record.lngKey} * PI()) / 180 - (longitude * PI()) / 180
                )
                ) * 6371.004 )  <= #{record.distance}
                    AND longitude > #{record.lngKey} - 2
                    AND longitude < #{record.lngKey} + 2
                    AND latitude > #{record.latKey} - 2
                    AND latitude < #{record.latKey} + 2
                    ]]>
            </if>


        </where>
        order by

        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>
        id desc
    </select>
    <select id="queryAllLandMarkChild" parameterType="java.util.Map"
            resultMap="LandMarkChildResultMap">
        select
        <include refid="Base_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
                and id in (${idStr})
            </if>
            <if test="id != null and !&quot;&quot;.equals(id)">
                and id = #{id}
            </if>
            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                and del_flag = #{delFlag}
            </if>
            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                and update_time = #{updateTime}
            </if>
            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                and update_user = #{updateUser}
            </if>
            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                and create_time = #{createTime}
            </if>
            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                and create_user = #{createUser}
            </if>
            <if test="mapName != null and !&quot;&quot;.equals(mapName)">
                and map_name = #{mapName}
            </if>
            <if test="ownedCityId != null and !&quot;&quot;.equals(ownedCityId)">
                and owned_city_id = #{ownedCityId}
            </if>
            <if test="mapSprite != null and !&quot;&quot;.equals(mapSprite)">
                and map_sprite = #{mapSprite}
            </if>
            <if test="logeSprite != null and !&quot;&quot;.equals(logeSprite)">
                and loge_sprite = #{logeSprite}
            </if>
            <if test="openDescribe != null and !&quot;&quot;.equals(openDescribe)">
                and open_describe = #{openDescribe}
            </if>
            <if test="markDescribe != null and !&quot;&quot;.equals(markDescribe)">
                and mark_describe = #{markDescribe}
            </if>
            <if test="anchorImageGroupName != null and !&quot;&quot;.equals(anchorImageGroupName)">
                and anchor_image_group_name = #{anchorImageGroupName}
            </if>
            <if test="defaultMode != null and !&quot;&quot;.equals(defaultMode)">
                and default_mode = #{defaultMode}
            </if>
            <if test="vuforiaImageGroupId != null and !&quot;&quot;.equals(vuforiaImageGroupId)">
                and vuforia_image_group_id = #{vuforiaImageGroupId}
            </if>
            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
                and vuforia_data_name = #{vuforiaDataName}
            </if>
            <if test="mapInfo != null and !&quot;&quot;.equals(mapInfo)">
                and map_info = #{mapInfo}
            </if>
            <if test="mapWidth != null and !&quot;&quot;.equals(mapWidth)">
                and map_width = #{mapWidth}
            </if>
            <if test="mapHeight != null and !&quot;&quot;.equals(mapHeight)">
                and map_height = #{mapHeight}
            </if>
            <if test="mapRate != null and !&quot;&quot;.equals(mapRate)">
                and map_rate = #{mapRate}
            </if>
            <if test="showInPanel != null and !&quot;&quot;.equals(showInPanel)">
                and show_in_panel = #{showInPanel}
            </if>
            <if test="longitude != null and !&quot;&quot;.equals(longitude)">
                and longitude = #{longitude}
            </if>
            <if test="latitude != null and !&quot;&quot;.equals(latitude)">
                and latitude = #{latitude}
            </if>
            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
                and remark1 = #{remark1}
            </if>
            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
                and remark2 = #{remark2}
            </if>
            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
                and remark3 = #{remark3}
            </if>
            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
                and type_id = #{type_id}
            </if>
            <if test="keyword != null and !&quot;&quot;.equals(keyword)">
                and keyword = #{keyword}
            </if>
            <if test="power != null and !&quot;&quot;.equals(power)">
                and power = #{power}
            </if>
            <if test="areaMapInfo != null and !&quot;&quot;.equals(areaMapInfo)">
                and area_map_info = #{areaMapInfo}
            </if>
            <if test="addStep != null and !&quot;&quot;.equals(addStep)">
                and add_step = #{addStep}
            </if>

            <if test="addStepStr != null and !&quot;&quot;.equals(addStepStr)">
                and add_step in (${addStepStr})
            </if>

            <if test="frontLevelId != null and !&quot;&quot;.equals(frontLevelId)">

                and (front_level_id = #{frontLevelId}
                <if test="'0'.toString()==frontLevelId">
                    or (front_level_id is null or front_level_id = '')
                </if>
                )
            </if>
            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                <trim prefix="and (" suffix=")" prefixOverrides="OR">
                    OR map_name LIKE concat('%',#{searchKey},'%')
                    OR owned_city_id LIKE concat('%',#{searchKey},'%')
                    OR map_sprite LIKE concat('%',#{searchKey},'%')
                    OR loge_sprite LIKE concat('%',#{searchKey},'%')
                    OR open_describe LIKE concat('%',#{searchKey},'%')
                    OR mark_describe LIKE concat('%',#{searchKey},'%')
                    OR anchor_image_group_name LIKE concat('%',#{searchKey},'%')
                    OR default_mode LIKE concat('%',#{searchKey},'%')
                    OR vuforia_image_group_id LIKE concat('%',#{searchKey},'%')
                    OR vuforia_data_name LIKE concat('%',#{searchKey},'%')
                    OR map_width LIKE concat('%',#{searchKey},'%')
                    OR map_height LIKE concat('%',#{searchKey},'%')
                    OR map_rate LIKE concat('%',#{searchKey},'%')
                    OR show_in_panel LIKE concat('%',#{searchKey},'%')
                    OR longitude LIKE concat('%',#{searchKey},'%')
                    OR latitude LIKE concat('%',#{searchKey},'%')
                    OR remark1 LIKE concat('%',#{searchKey},'%')
                    OR remark2 LIKE concat('%',#{searchKey},'%')
                    OR remark3 LIKE concat('%',#{searchKey},'%')
                    OR front_level_id LIKE concat('%',#{searchKey},'%')
                    OR keyword LIKE concat('%',#{keyword},'%')
                </trim>
            </if>
            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
                    <choose>
                        <when test="item.indexOf('like') != -1">
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    concat('%',#{itemDetail},'%')
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </when>
                        <otherwise>
                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                                <if test="detailIndex == 3">
                                    #{itemDetail}
                                </if>

                                <if test="detailIndex &lt; 3">
                                    ${itemDetail}
                                </if>

                            </foreach>
                        </otherwise>
                    </choose>


                </foreach>


            </if>
        </where>
        order by

        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">


            <trim suffixOverrides=",">
                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                        ${itemDetail}
                    </foreach>
                </foreach>
            </trim>
            ,
        </if>

        id desc
    </select>
    <select id="queryLandMark" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.LandMark">
        select
        <include refid="Base_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="id != null and !&quot;&quot;.equals(id)">
                and id = #{id}
            </if>
            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                and del_flag = #{delFlag}
            </if>
            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                and update_time = #{updateTime}
            </if>
            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                and update_user = #{updateUser}
            </if>
            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                and create_time = #{createTime}
            </if>
            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                and create_user = #{createUser}
            </if>
            <if test="mapName != null and !&quot;&quot;.equals(mapName)">
                and map_name = #{mapName}
            </if>
            <if test="ownedCityId != null and !&quot;&quot;.equals(ownedCityId)">
                and owned_city_id = #{ownedCityId}
            </if>
            <if test="mapSprite != null and !&quot;&quot;.equals(mapSprite)">
                and map_sprite = #{mapSprite}
            </if>
            <if test="logeSprite != null and !&quot;&quot;.equals(logeSprite)">
                and loge_sprite = #{logeSprite}
            </if>
            <if test="openDescribe != null and !&quot;&quot;.equals(openDescribe)">
                and open_describe = #{openDescribe}
            </if>
            <if test="markDescribe != null and !&quot;&quot;.equals(markDescribe)">
                and mark_describe = #{markDescribe}
            </if>
            <if test="anchorImageGroupName != null and !&quot;&quot;.equals(anchorImageGroupName)">
                and anchor_image_group_name = #{anchorImageGroupName}
            </if>
            <if test="defaultMode != null and !&quot;&quot;.equals(defaultMode)">
                and default_mode = #{defaultMode}
            </if>
            <if test="vuforiaImageGroupId != null and !&quot;&quot;.equals(vuforiaImageGroupId)">
                and vuforia_image_group_id = #{vuforiaImageGroupId}
            </if>
            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
                and vuforia_data_name = #{vuforiaDataName}
            </if>
            <if test="mapInfo != null and !&quot;&quot;.equals(mapInfo)">
                and map_info = #{mapInfo}
            </if>
            <if test="mapWidth != null and !&quot;&quot;.equals(mapWidth)">
                and map_width = #{mapWidth}
            </if>
            <if test="mapHeight != null and !&quot;&quot;.equals(mapHeight)">
                and map_height = #{mapHeight}
            </if>
            <if test="mapRate != null and !&quot;&quot;.equals(mapRate)">
                and map_rate = #{mapRate}
            </if>
            <if test="showInPanel != null and !&quot;&quot;.equals(showInPanel)">
                and show_in_panel = #{showInPanel}
            </if>
            <if test="longitude != null and !&quot;&quot;.equals(longitude)">
                and longitude = #{longitude}
            </if>
            <if test="latitude != null and !&quot;&quot;.equals(latitude)">
                and latitude = #{latitude}
            </if>
            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
                and remark1 = #{remark1}
            </if>
            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
                and remark2 = #{remark2}
            </if>
            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
                and remark3 = #{remark3}
            </if>
            <if test="frontLevelId != null and !&quot;&quot;.equals(frontLevelId)">
                and front_level_id = #{frontLevelId}
            </if>

            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
                and type_id = #{type_id}
            </if>
            <if test="keyword != null and !&quot;&quot;.equals(keyword)">
                and keyword = #{keyword}
            </if>
            <if test="power != null and !&quot;&quot;.equals(power)">
                and power = #{power}
            </if>
            <if test="areaMapInfo != null and !&quot;&quot;.equals(areaMapInfo)">
                and area_map_info = #{areaMapInfo}
            </if>

            <if test="addStep != null and !&quot;&quot;.equals(addStep)">
                and add_step = #{addStep}
            </if>

            <if test="addStepStr != null and !&quot;&quot;.equals(addStepStr)">
                and add_step in (${addStepStr})
            </if>

        </where>
        LIMIT 1
    </select>

    <select id="queryLandMarkNoMap" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.LandMark">
        select
        <include refid="no_map_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="id != null and !&quot;&quot;.equals(id)">
                and id = #{id}
            </if>
            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                and del_flag = #{delFlag}
            </if>
            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                and update_time = #{updateTime}
            </if>
            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                and update_user = #{updateUser}
            </if>
            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                and create_time = #{createTime}
            </if>
            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                and create_user = #{createUser}
            </if>
            <if test="mapName != null and !&quot;&quot;.equals(mapName)">
                and map_name = #{mapName}
            </if>
            <if test="ownedCityId != null and !&quot;&quot;.equals(ownedCityId)">
                and owned_city_id = #{ownedCityId}
            </if>
            <if test="mapSprite != null and !&quot;&quot;.equals(mapSprite)">
                and map_sprite = #{mapSprite}
            </if>
            <if test="logeSprite != null and !&quot;&quot;.equals(logeSprite)">
                and loge_sprite = #{logeSprite}
            </if>
            <if test="openDescribe != null and !&quot;&quot;.equals(openDescribe)">
                and open_describe = #{openDescribe}
            </if>
            <if test="markDescribe != null and !&quot;&quot;.equals(markDescribe)">
                and mark_describe = #{markDescribe}
            </if>
            <if test="anchorImageGroupName != null and !&quot;&quot;.equals(anchorImageGroupName)">
                and anchor_image_group_name = #{anchorImageGroupName}
            </if>
            <if test="defaultMode != null and !&quot;&quot;.equals(defaultMode)">
                and default_mode = #{defaultMode}
            </if>
            <if test="vuforiaImageGroupId != null and !&quot;&quot;.equals(vuforiaImageGroupId)">
                and vuforia_image_group_id = #{vuforiaImageGroupId}
            </if>
            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
                and vuforia_data_name = #{vuforiaDataName}
            </if>
            <if test="mapInfo != null and !&quot;&quot;.equals(mapInfo)">
                and map_info = #{mapInfo}
            </if>
            <if test="mapWidth != null and !&quot;&quot;.equals(mapWidth)">
                and map_width = #{mapWidth}
            </if>
            <if test="mapHeight != null and !&quot;&quot;.equals(mapHeight)">
                and map_height = #{mapHeight}
            </if>
            <if test="mapRate != null and !&quot;&quot;.equals(mapRate)">
                and map_rate = #{mapRate}
            </if>
            <if test="showInPanel != null and !&quot;&quot;.equals(showInPanel)">
                and show_in_panel = #{showInPanel}
            </if>
            <if test="longitude != null and !&quot;&quot;.equals(longitude)">
                and longitude = #{longitude}
            </if>
            <if test="latitude != null and !&quot;&quot;.equals(latitude)">
                and latitude = #{latitude}
            </if>
            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
                and remark1 = #{remark1}
            </if>
            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
                and remark2 = #{remark2}
            </if>
            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
                and remark3 = #{remark3}
            </if>
            <if test="frontLevelId != null and !&quot;&quot;.equals(frontLevelId)">
                and front_level_id = #{frontLevelId}
            </if>

            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
                and type_id = #{type_id}
            </if>
            <if test="keyword != null and !&quot;&quot;.equals(keyword)">
                and keyword = #{keyword}
            </if>
            <if test="power != null and !&quot;&quot;.equals(power)">
                and power = #{power}
            </if>
            <if test="areaMapInfo != null and !&quot;&quot;.equals(areaMapInfo)">
                and area_map_info = #{areaMapInfo}
            </if>

            <if test="addStep != null and !&quot;&quot;.equals(addStep)">
                and add_step = #{addStep}
            </if>

            <if test="addStepStr != null and !&quot;&quot;.equals(addStepStr)">
                and add_step in (${addStepStr})
            </if>

        </where>
        LIMIT 1
    </select>

    <select id="queryLandMarkMapInfo" parameterType="java.util.Map" resultMap="MapInfoResultMap">
        select
        <include refid="Base_Column_List"/>, 'Y' as land_mark_flag
        from land_mark
        <where>
            and del_flag = 'N'
            <if test="id != null and !&quot;&quot;.equals(id)">
                and id = #{id}
            </if>
            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                and del_flag = #{delFlag}
            </if>
            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                and update_time = #{updateTime}
            </if>
            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                and update_user = #{updateUser}
            </if>
            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                and create_time = #{createTime}
            </if>
            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                and create_user = #{createUser}
            </if>
            <if test="mapName != null and !&quot;&quot;.equals(mapName)">
                and map_name = #{mapName}
            </if>
            <if test="ownedCityId != null and !&quot;&quot;.equals(ownedCityId)">
                and owned_city_id = #{ownedCityId}
            </if>
            <if test="mapSprite != null and !&quot;&quot;.equals(mapSprite)">
                and map_sprite = #{mapSprite}
            </if>
            <if test="logeSprite != null and !&quot;&quot;.equals(logeSprite)">
                and loge_sprite = #{logeSprite}
            </if>
            <if test="openDescribe != null and !&quot;&quot;.equals(openDescribe)">
                and open_describe = #{openDescribe}
            </if>
            <if test="markDescribe != null and !&quot;&quot;.equals(markDescribe)">
                and mark_describe = #{markDescribe}
            </if>
            <if test="anchorImageGroupName != null and !&quot;&quot;.equals(anchorImageGroupName)">
                and anchor_image_group_name = #{anchorImageGroupName}
            </if>
            <if test="defaultMode != null and !&quot;&quot;.equals(defaultMode)">
                and default_mode = #{defaultMode}
            </if>
            <if test="vuforiaImageGroupId != null and !&quot;&quot;.equals(vuforiaImageGroupId)">
                and vuforia_image_group_id = #{vuforiaImageGroupId}
            </if>
            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
                and vuforia_data_name = #{vuforiaDataName}
            </if>
            <if test="mapInfo != null and !&quot;&quot;.equals(mapInfo)">
                and map_info = #{mapInfo}
            </if>
            <if test="mapWidth != null and !&quot;&quot;.equals(mapWidth)">
                and map_width = #{mapWidth}
            </if>
            <if test="mapHeight != null and !&quot;&quot;.equals(mapHeight)">
                and map_height = #{mapHeight}
            </if>
            <if test="mapRate != null and !&quot;&quot;.equals(mapRate)">
                and map_rate = #{mapRate}
            </if>
            <if test="showInPanel != null and !&quot;&quot;.equals(showInPanel)">
                and show_in_panel = #{showInPanel}
            </if>
            <if test="longitude != null and !&quot;&quot;.equals(longitude)">
                and longitude = #{longitude}
            </if>
            <if test="latitude != null and !&quot;&quot;.equals(latitude)">
                and latitude = #{latitude}
            </if>
            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
                and remark1 = #{remark1}
            </if>
            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
                and remark2 = #{remark2}
            </if>
            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
                and remark3 = #{remark3}
            </if>
            <if test="frontLevelId != null and !&quot;&quot;.equals(frontLevelId)">
                and front_level_id = #{frontLevelId}
            </if>

            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
                and type_id = #{type_id}
            </if>
            <if test="keyword != null and !&quot;&quot;.equals(keyword)">
                and keyword = #{keyword}
            </if>
            <if test="power != null and !&quot;&quot;.equals(power)">
                and power = #{power}
            </if>
            <if test="areaMapInfo != null and !&quot;&quot;.equals(areaMapInfo)">
                and area_map_info = #{areaMapInfo}
            </if>

            <if test="addStep != null and !&quot;&quot;.equals(addStep)">
                and add_step = #{addStep}
            </if>

            <if test="addStepStr != null and !&quot;&quot;.equals(addStepStr)">
                and add_step in (${addStepStr})
            </if>

        </where>
        LIMIT 1
    </select>
    <update id="delete">
        UPDATE land_mark SET del_flag = 'Y'
        where
        <if test="id != null and !&quot;&quot;.equals(id)">
            id = #{id,jdbcType=INTEGER}
        </if>

        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
            id in (${idStr})
        </if>
    </update>
    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.LandMark">
        select
        <include refid="Base_Column_List"/>
        from land_mark
        <where>
            and del_flag = 'N'
        </where>
        order by id desc
    </select>


    <resultMap id="MapInfoResultMap" type="com.izouma.awesomeadmin.model.LandMark" extends="BaseResultMap">

        <association property="vuforiaImageGroup" javaType="com.izouma.awesomeadmin.model.VuforiaImageGroup"
                     select="com.izouma.awesomeadmin.dao.VuforiaImageGroupMapper.queryVuforiaImageGroup"
                     column="{id = vuforia_image_group_id}">
        </association>

        <collection property="vuforiaImageInfoList" ofType="com.izouma.awesomeadmin.model.VuforiaImageInfo"
                    select="com.izouma.awesomeadmin.dao.VuforiaImageInfoMapper.queryAllVuforiaImageInfo"
                    column="{landMarkId = id}">
        </collection>
        <collection property="aimPlaceContentList" ofType="com.izouma.awesomeadmin.model.AimPlaceContent"
                    select="com.izouma.awesomeadmin.dao.AimPlaceContentMapper.queryAllAimPlaceContent"
                    column="{ownedLandMarkId = id}">
        </collection>
        <collection property="aimPlacePositionList" ofType="com.izouma.awesomeadmin.model.AimPlacePosition"
                    select="com.izouma.awesomeadmin.dao.AimPlacePositionMapper.queryAllAimPlacePosition"
                    column="{ownedLandMarkId = id}">
        </collection>
        <collection property="areaInfoList" ofType="com.izouma.awesomeadmin.model.AreaInfo"
                    select="com.izouma.awesomeadmin.dao.AreaInfoMapper.queryAllAreaInfoAllInfo"
                    column="{landmarkId = id}">
        </collection>

        <collection property="thingInfoList" ofType="com.izouma.awesomeadmin.model.ThingInfo"
                    select="com.izouma.awesomeadmin.dao.ThingInfoMapper.queryAllThingInfoAllInfo"
                    column="{landmarkId = id, landMarkFlag = land_mark_flag }">
        </collection>


    </resultMap>

    <resultMap id="AllLandMarkResultMap" type="com.izouma.awesomeadmin.model.LandMark" extends="BaseResultMap">

        <collection property="areaInfoList" ofType="com.izouma.awesomeadmin.model.AreaInfo"
                    select="com.izouma.awesomeadmin.dao.AreaInfoMapper.queryAllAreaInfo"
                    column="{landmarkId = id , areaType = area_type_id}">
        </collection>

    </resultMap>

    <resultMap id="LandMarkChildResultMap" type="com.izouma.awesomeadmin.model.LandMark" extends="BaseResultMap">


        <collection property="landMarkChildList" ofType="com.izouma.awesomeadmin.model.LandMark"
                    select="com.izouma.awesomeadmin.dao.LandMarkMapper.queryAllLandMarkChild"
                    column="{frontLevelId = id}">
        </collection>
    </resultMap>

    <resultMap id="NavigationPackageResultMap" type="com.izouma.awesomeadmin.model.LandMark" extends="BaseResultMap">


        <collection property="navigationPackageList" ofType="com.izouma.awesomeadmin.model.NavigationPackage"
                    select="com.izouma.awesomeadmin.dao.NavigationPackageMapper.queryAllNavigationPackageForLankMark"
                    column="{landMarkId = id, buyFlag=buy_flag, userId = user_id}">
        </collection>
    </resultMap>

</mapper>

