|
@@ -14,6 +14,12 @@
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
<result property="fullName" column="full_name" />
|
|
|
+ <result property="longitude" column="longitude_" />
|
|
|
+ <result property="latitude" column="latitude_" />
|
|
|
+ <result property="radius" column="radius_" />
|
|
|
+ <result property="sortNo" column="sort_no" />
|
|
|
+ <result property="parentName" column="parent_name" />
|
|
|
+
|
|
|
</resultMap>
|
|
|
<insert id="insert" parameterType="com.jpsoft.bus.modules.base.entity.RegionInfo">
|
|
|
<!--
|
|
@@ -23,7 +29,8 @@
|
|
|
-->
|
|
|
<![CDATA[
|
|
|
insert into base_region_info
|
|
|
- (id_,name_,parent_id,remark_,create_by,create_time,update_by,update_time,del_flag,full_name)
|
|
|
+ (id_,name_,parent_id,remark_,create_by,create_time,update_by,update_time,del_flag,full_name,
|
|
|
+ longitude_,latitude_,radius_,sort_no)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType=VARCHAR}
|
|
@@ -36,6 +43,10 @@
|
|
|
,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
,#{delFlag,jdbcType= NUMERIC }
|
|
|
,#{fullName,jdbcType=VARCHAR}
|
|
|
+,#{longitude,jdbcType=DOUBLE}
|
|
|
+,#{latitude,jdbcType=DOUBLE}
|
|
|
+,#{radius,jdbcType= NUMERIC }
|
|
|
+,#{sortNo,jdbcType= NUMERIC }
|
|
|
)
|
|
|
]]>
|
|
|
</insert>
|
|
@@ -72,6 +83,18 @@
|
|
|
<if test="fullName!=null">
|
|
|
full_name=#{fullName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="longitude!=null">
|
|
|
+ longitude_=#{longitude,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="latitude!=null">
|
|
|
+ latitude_=#{latitude,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="radius!=null">
|
|
|
+ radius_=#{radius,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="sortNo!=null">
|
|
|
+ sort_no=#{sortNo,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id_=#{id}
|
|
|
</update>
|
|
@@ -86,12 +109,20 @@
|
|
|
</select>
|
|
|
<select id="search" parameterType="hashmap" resultMap="RegionInfoMap">
|
|
|
<![CDATA[
|
|
|
- select * from base_region_info
|
|
|
+ SELECT
|
|
|
+ a.*,
|
|
|
+ b.name_ AS parent_name
|
|
|
+ FROM
|
|
|
+ base_region_info a
|
|
|
+ LEFT JOIN base_region_info b ON a.parent_id = b.id_
|
|
|
]]>
|
|
|
<where>
|
|
|
- and del_flag = 0
|
|
|
+ and a.del_flag = 0
|
|
|
<if test="searchParams.id != null">
|
|
|
- and ID_ like #{searchParams.id}
|
|
|
+ and a.ID_ like #{searchParams.id}
|
|
|
+ </if>
|
|
|
+ <if test="searchParams.name != null">
|
|
|
+ and a.name_ like #{searchParams.name}
|
|
|
</if>
|
|
|
</where>
|
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|