From e384609b41fe6434de81cfbb1663a501ad9fbc75 Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Fri, 04 Jun 2021 11:05:55 +0800
Subject: [PATCH] 站点判断数字型字段为空时,变为null;站点、因子查询更改为按照更新时间排序;菜单判断url,是否已存在

---
 screen-manage/src/main/resources/mapper/MonitorPointMapper.xml |   42 ++++++++++++++++++++++++++++++++++++------
 1 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/screen-manage/src/main/resources/mapper/MonitorPointMapper.xml b/screen-manage/src/main/resources/mapper/MonitorPointMapper.xml
index 44233f3..0a714b3 100644
--- a/screen-manage/src/main/resources/mapper/MonitorPointMapper.xml
+++ b/screen-manage/src/main/resources/mapper/MonitorPointMapper.xml
@@ -30,25 +30,55 @@
                 name = #{name},
             </if>
             <if test="longitude != null">
-                longitude = #{longitude},
+                <if test="longitude == ''">
+                    longitude = null,
+                </if>
+                <if test="longitude != ''">
+                    longitude = #{longitude},
+                </if>
             </if>
             <if test="latitude != null">
-                latitude = #{latitude},
+                <if test="latitude == ''">
+                    latitude = null,
+                </if>
+                <if test="latitude != ''">
+                    latitude = #{latitude},
+                </if>
             </if>
             <if test="province_code != null">
-                province_code = #{province_code},
+                <if test="province_code == ''">
+                    province_code = null,
+                </if>
+                <if test="province_code != ''">
+                    province_code = #{province_code},
+                </if>
             </if>
             <if test="city_code != null">
-                city_code = #{city_code},
+                <if test="city_code == ''">
+                    city_code = null,
+                </if>
+                <if test="city_code != ''">
+                    city_code = #{city_code},
+                </if>
             </if>
             <if test="area_code != null">
-                area_code = #{area_code},
+                <if test="area_code == ''">
+                    area_code = null,
+                </if>
+                <if test="area_code != ''">
+                    area_code = #{area_code},
+                </if>
             </if>
             <if test="address != null">
                 address = #{address},
             </if>
             <if test="organization_id != null">
-                organization_id = #{organization_id},
+                <if test="organization_id == ''">
+                    organization_id = null,
+                </if>
+                <if test="organization_id != ''">
+                    organization_id = #{organization_id},
+                </if>
             </if>
             <if test="desc != null">
                 `desc` = #{desc},

--
Gitblit v1.8.0