查询站点和组树状列表接口按行政区过滤逻辑,行政区接口逻辑完善等

This commit is contained in:
mi9688
2024-10-28 18:01:46 +08:00
parent 3b51726b58
commit 5b2ea1f01b
14 changed files with 152 additions and 43 deletions

View File

@ -18,10 +18,13 @@
<result property="spaceValue" column="space_value" />
<result property="dataDevices" column="data_devices" />
<result property="videoDevices" column="video_devices" />
<result property="typeId" column="type_id" />
<result property="areaCode" column="area_code" />
<result property="fullAreaCode" column="full_area_code" />
</resultMap>
<sql id="selectGSitesVo">
select id, name, icon, type, create_by, create_time, update_time, update_by, space, project_id, space_value, data_devices, video_devices from g_sites
select id, name, icon, type, create_by, create_time, update_time, update_by, space, project_id, space_value, data_devices, video_devices, type_id, area_code, full_area_code from g_sites
</sql>
<select id="selectGSitesList" parameterType="GSites" resultMap="GSitesResult">
@ -35,6 +38,9 @@
<if test="spaceValue != null and spaceValue != ''"> and space_value = #{spaceValue}</if>
<if test="dataDevices != null and dataDevices != ''"> and data_devices = #{dataDevices}</if>
<if test="videoDevices != null and videoDevices != ''"> and video_devices = #{videoDevices}</if>
<if test="typeId != null "> and type_id = #{typeId}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="fullAreaCode != null and fullAreaCode != ''"> and full_area_code = #{fullAreaCode}</if>
</where>
</select>
@ -58,6 +64,9 @@
<if test="spaceValue != null">space_value,</if>
<if test="dataDevices != null">data_devices,</if>
<if test="videoDevices != null">video_devices,</if>
<if test="typeId != null">type_id,</if>
<if test="areaCode != null">area_code,</if>
<if test="fullAreaCode != null">full_area_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
@ -72,6 +81,9 @@
<if test="spaceValue != null">#{spaceValue},</if>
<if test="dataDevices != null">#{dataDevices},</if>
<if test="videoDevices != null">#{videoDevices},</if>
<if test="typeId != null">#{typeId},</if>
<if test="areaCode != null">#{areaCode},</if>
<if test="fullAreaCode != null">#{fullAreaCode},</if>
</trim>
</insert>
@ -90,6 +102,9 @@
<if test="spaceValue != null">space_value = #{spaceValue},</if>
<if test="dataDevices != null">data_devices = #{dataDevices},</if>
<if test="videoDevices != null">video_devices = #{videoDevices},</if>
<if test="typeId != null">type_id = #{typeId},</if>
<if test="areaCode != null">area_code = #{areaCode},</if>
<if test="fullAreaCode != null">full_area_code = #{fullAreaCode},</if>
</trim>
where id = #{id}
</update>