|
@@ -3,7 +3,7 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.bd.mapper.BdFenceInfoMapper">
|
|
<mapper namespace="com.ruoyi.bd.mapper.BdFenceInfoMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="BdFenceInfo" id="BdFenceInfoResult">
|
|
<resultMap type="BdFenceInfo" id="BdFenceInfoResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="defenceName" column="defence_name" />
|
|
<result property="defenceName" column="defence_name" />
|
|
@@ -22,11 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectBdFenceInfoList" parameterType="BdFenceInfo" resultMap="BdFenceInfoResult">
|
|
<select id="selectBdFenceInfoList" parameterType="BdFenceInfo" resultMap="BdFenceInfoResult">
|
|
<include refid="selectBdFenceInfoVo"/>
|
|
<include refid="selectBdFenceInfoVo"/>
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="defenceName != null and defenceName != ''"> and defence_name like concat('%', #{defenceName}, '%')</if>
|
|
<if test="defenceName != null and defenceName != ''"> and defence_name like concat('%', #{defenceName}, '%')</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectBdFenceInfoById" parameterType="Long" resultMap="BdFenceInfoResult">
|
|
<select id="selectBdFenceInfoById" parameterType="Long" resultMap="BdFenceInfoResult">
|
|
<include refid="selectBdFenceInfoVo"/>
|
|
<include refid="selectBdFenceInfoVo"/>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="defenceName != null">#{defenceName},</if>
|
|
<if test="defenceName != null">#{defenceName},</if>
|
|
- <if test="poly != null">#{poly},</if>
|
|
|
|
|
|
+ <if test="poly != null">ST_GeomFromText(#{poly}),</if>
|
|
<if test="centerLng != null">#{centerLng},</if>
|
|
<if test="centerLng != null">#{centerLng},</if>
|
|
<if test="centerLat != null">#{centerLat},</if>
|
|
<if test="centerLat != null">#{centerLat},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
update bd_fence_info
|
|
update bd_fence_info
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="defenceName != null">defence_name = #{defenceName},</if>
|
|
<if test="defenceName != null">defence_name = #{defenceName},</if>
|
|
- <if test="poly != null">poly = #{poly},</if>
|
|
|
|
|
|
+ <if test="poly != null">poly = ST_GeomFromText(#{poly}),</if>
|
|
<if test="centerLng != null">center_lng = #{centerLng},</if>
|
|
<if test="centerLng != null">center_lng = #{centerLng},</if>
|
|
<if test="centerLat != null">center_lat = #{centerLat},</if>
|
|
<if test="centerLat != null">center_lat = #{centerLat},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
@@ -76,9 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteBdFenceInfoByIds" parameterType="String">
|
|
<delete id="deleteBdFenceInfoByIds" parameterType="String">
|
|
- delete from bd_fence_info where id in
|
|
|
|
|
|
+ delete from bd_fence_info where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|