111
This commit is contained in:
1 parent
81eca8933a
commit
345f906c35
540 files changed
+494222
-90
No files matched your search
@@ -0,0 +1,126 @@
|
||||
<?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.luqj.gis.mapper.GisRegionMapper">
|
||||
<resultMap type="GisRegion" id="GisRegionResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="name" column="NAME" />
|
||||
<result property="parentId" column="PARENT_ID" />
|
||||
<result property="shortName" column="SHORT_NAME" />
|
||||
<result property="type" column="TYPE" />
|
||||
<result property="cityCode" column="CITY_CODE" />
|
||||
<result property="zipCode" column="ZIP_CODE" />
|
||||
<result property="mergerName" column="MERGER_NAME" />
|
||||
<result property="longitude" column="LONGITUDE" />
|
||||
<result property="latitude" column="LATITUDE" />
|
||||
<result property="code" column="CODE" />
|
||||
<result property="isOpen" column="IS_OPEN" />
|
||||
<result property="bigArea" column="BIG_AREA" />
|
||||
<result property="isDefault" column="IS_DEFAULT" />
|
||||
<result property="adCode" column="ad_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGisRegionVo">
|
||||
select ID, NAME, PARENT_ID, SHORT_NAME, TYPE, CITY_CODE, ZIP_CODE, MERGER_NAME, LONGITUDE, LATITUDE, CODE, IS_OPEN, BIG_AREA, IS_DEFAULT, ad_code from gis_region
|
||||
</sql>
|
||||
|
||||
<select id="selectGisRegionList" parameterType="GisRegion" resultMap="GisRegionResult">
|
||||
<include refid="selectGisRegionVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and NAME like concat('%', #{name}, '%')</if>
|
||||
<if test="parentId != null "> and PARENT_ID = #{parentId}</if>
|
||||
<if test="shortName != null and shortName != ''"> and SHORT_NAME like concat('%', #{shortName}, '%')</if>
|
||||
<if test="type != null "> and TYPE = #{type}</if>
|
||||
<if test="cityCode != null and cityCode != ''"> and CITY_CODE = #{cityCode}</if>
|
||||
<if test="zipCode != null and zipCode != ''"> and ZIP_CODE = #{zipCode}</if>
|
||||
<if test="mergerName != null and mergerName != ''"> and MERGER_NAME like concat('%', #{mergerName}, '%')</if>
|
||||
<if test="longitude != null "> and LONGITUDE = #{longitude}</if>
|
||||
<if test="latitude != null "> and LATITUDE = #{latitude}</if>
|
||||
<if test="code != null and code != ''"> and CODE = #{code}</if>
|
||||
<if test="isOpen != null "> and IS_OPEN = #{isOpen}</if>
|
||||
<if test="bigArea != null and bigArea != ''"> and BIG_AREA = #{bigArea}</if>
|
||||
<if test="isDefault != null "> and IS_DEFAULT = #{isDefault}</if>
|
||||
<if test="adCode != null "> and ad_code = #{adCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGisRegionById" parameterType="Long" resultMap="GisRegionResult">
|
||||
<include refid="selectGisRegionVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
<select id="selectUserByTypes" resultMap="GisRegionResult">
|
||||
<include refid="selectGisRegionVo"/>
|
||||
where `type` in
|
||||
<foreach collection="types" item="type" index="index" open="(" close=")" separator=",">
|
||||
#{type}
|
||||
</foreach>
|
||||
</select>
|
||||
<insert id="insertGisRegion" parameterType="GisRegion" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into gis_region
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">NAME,</if>
|
||||
<if test="parentId != null">PARENT_ID,</if>
|
||||
<if test="shortName != null">SHORT_NAME,</if>
|
||||
<if test="type != null">TYPE,</if>
|
||||
<if test="cityCode != null">CITY_CODE,</if>
|
||||
<if test="zipCode != null">ZIP_CODE,</if>
|
||||
<if test="mergerName != null">MERGER_NAME,</if>
|
||||
<if test="longitude != null">LONGITUDE,</if>
|
||||
<if test="latitude != null">LATITUDE,</if>
|
||||
<if test="code != null">CODE,</if>
|
||||
<if test="isOpen != null">IS_OPEN,</if>
|
||||
<if test="bigArea != null">BIG_AREA,</if>
|
||||
<if test="isDefault != null">IS_DEFAULT,</if>
|
||||
<if test="adCode != null">ad_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="shortName != null">#{shortName},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="cityCode != null">#{cityCode},</if>
|
||||
<if test="zipCode != null">#{zipCode},</if>
|
||||
<if test="mergerName != null">#{mergerName},</if>
|
||||
<if test="longitude != null">#{longitude},</if>
|
||||
<if test="latitude != null">#{latitude},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="isOpen != null">#{isOpen},</if>
|
||||
<if test="bigArea != null">#{bigArea},</if>
|
||||
<if test="isDefault != null">#{isDefault},</if>
|
||||
<if test="adCode != null">#{adCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGisRegion" parameterType="GisRegion">
|
||||
update gis_region
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">NAME = #{name},</if>
|
||||
<if test="parentId != null">PARENT_ID = #{parentId},</if>
|
||||
<if test="shortName != null">SHORT_NAME = #{shortName},</if>
|
||||
<if test="type != null">TYPE = #{type},</if>
|
||||
<if test="cityCode != null">CITY_CODE = #{cityCode},</if>
|
||||
<if test="zipCode != null">ZIP_CODE = #{zipCode},</if>
|
||||
<if test="mergerName != null">MERGER_NAME = #{mergerName},</if>
|
||||
<if test="longitude != null">LONGITUDE = #{longitude},</if>
|
||||
<if test="latitude != null">LATITUDE = #{latitude},</if>
|
||||
<if test="code != null">CODE = #{code},</if>
|
||||
<if test="isOpen != null">IS_OPEN = #{isOpen},</if>
|
||||
<if test="bigArea != null">BIG_AREA = #{bigArea},</if>
|
||||
<if test="isDefault != null">IS_DEFAULT = #{isDefault},</if>
|
||||
<if test="adCode != null">ad_code = #{adCode},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGisRegionById" parameterType="Long">
|
||||
delete from gis_region where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGisRegionByIds" parameterType="String">
|
||||
delete from gis_region where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user