Browse Source

back wifi热点管理

jun.zhou 9 years ago
parent
commit
e492cbf33f
1 changed files with 12 additions and 10 deletions
  1. 12 10
      src/main/java/com/cloudcross/ssp/model/mapper/wifi.sql.xml

+ 12 - 10
src/main/java/com/cloudcross/ssp/model/mapper/wifi.sql.xml

@@ -32,8 +32,9 @@
 			t_wifi tw LEFT JOIN t_location tl on tl.location = tw.location
 			t_wifi tw LEFT JOIN t_location tl on tl.location = tw.location
 			LEFT JOIN t_place tp on  tp.id = tw.place_id
 			LEFT JOIN t_place tp on  tp.id = tw.place_id
 			LEFT JOIN t_place_class tpc on tp.id = tpc.place_id
 			LEFT JOIN t_place_class tpc on tp.id = tpc.place_id
-			LEFT JOIN t_place_class_info tpci on tpci.id = tpc.class_id	
-		where tw.status != -1
+			LEFT JOIN t_place_class_info tpci on tpci.id = tpc.class_id
+			LEFT JOIN t_place_operator tpo on tpo.place_id = tp.id		
+		where tw.status != -1 and tpo.operator_id = tw.operator_id
 		<if test="cn != null">
 		<if test="cn != null">
 			and tl.cn = #{cn}
 			and tl.cn = #{cn}
 		</if>
 		</if>
@@ -41,13 +42,13 @@
 			and tl.cn_city = #{cnCity}
 			and tl.cn_city = #{cnCity}
 		</if>
 		</if>
 		<if test="place != null">
 		<if test="place != null">
-			and tw.place = #{place}
+			and tpo.name = #{place}
 		</if>
 		</if>
 		<if test="operatorId != null">
 		<if test="operatorId != null">
 			and tw.operator_id = #{operatorId}
 			and tw.operator_id = #{operatorId}
 		</if>
 		</if>
 		<if test="placeClassId != null">
 		<if test="placeClassId != null">
-			and tpci.name = #{placeClassId}
+			and tpci.id = #{placeClassId}
 		</if>
 		</if>
 		<if test="mac != null">
 		<if test="mac != null">
 			and tw.apmac like #{mac}
 			and tw.apmac like #{mac}
@@ -65,8 +66,8 @@
 			tw.longitude longitude,
 			tw.longitude longitude,
 			tw.latitude latitude,
 			tw.latitude latitude,
 			tw.apmac apmac,
 			tw.apmac apmac,
-			tw.place placeName,
-			tp.name placeClassName,
+			tw.place place,
+			tp.name placeName,
 			tw.updated updated,
 			tw.updated updated,
 			tw.status status,
 			tw.status status,
 			tw.operator_id operatorId
 			tw.operator_id operatorId
@@ -74,8 +75,9 @@
 			t_wifi tw LEFT JOIN t_location tl on tl.location = tw.location
 			t_wifi tw LEFT JOIN t_location tl on tl.location = tw.location
 			LEFT JOIN t_place tp on  tp.id = tw.place_id
 			LEFT JOIN t_place tp on  tp.id = tw.place_id
 			LEFT JOIN t_place_class tpc on tp.id = tpc.place_id
 			LEFT JOIN t_place_class tpc on tp.id = tpc.place_id
-			LEFT JOIN t_place_class_info tpci on tpci.id = tpc.class_id	
-		where tw.status != -1
+			LEFT JOIN t_place_class_info tpci on tpci.id = tpc.class_id
+			LEFT JOIN t_place_operator tpo on tpo.place_id = tp.id	
+		where tw.status != -1 and tpo.operator_id = tw.operator_id
 		<if test="cn != null">
 		<if test="cn != null">
 			and tl.cn = #{cn}
 			and tl.cn = #{cn}
 		</if>
 		</if>
@@ -83,13 +85,13 @@
 			and tl.cn_city = #{cnCity}
 			and tl.cn_city = #{cnCity}
 		</if>
 		</if>
 		<if test="place != null">
 		<if test="place != null">
-			and tw.place = #{place}
+			and tpo.name = #{place}
 		</if>
 		</if>
 		<if test="operatorId != null">
 		<if test="operatorId != null">
 			and tw.operator_id = #{operatorId}
 			and tw.operator_id = #{operatorId}
 		</if>
 		</if>
 		<if test="placeClassId != null">
 		<if test="placeClassId != null">
-			and tpci.name = #{placeClassId}
+			and tpci.id = #{placeClassId}
 		</if>
 		</if>
 		<if test="mac != null">
 		<if test="mac != null">
 			and tw.apmac like #{mac}
 			and tw.apmac like #{mac}