From f511c2eb84573788c85816c6a08e228e20934930 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 19 Dec 2017 22:46:56 +0800
Subject: [PATCH] updated

---
 src/main/resources/mapper/MonitorPointMapper.xml |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/MonitorPointMapper.xml b/src/main/resources/mapper/MonitorPointMapper.xml
index 33258a0..b434327 100644
--- a/src/main/resources/mapper/MonitorPointMapper.xml
+++ b/src/main/resources/mapper/MonitorPointMapper.xml
@@ -6,9 +6,16 @@
 			mp.* 
 		FROM
 			monitor_point mp,
-			area a 
+			area a
+		<if test="cityName != null">
+			,city c 
+		</if>
 		WHERE
 			mp.area_code = a.area_code 
-		AND a.area_name = #{areaName}
+			AND a.area_name = #{areaName}
+		<if test="cityName != null">
+			AND c.city_name = #{cityName}
+			AND mp.city_code = c.city_code
+		</if>
 	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0