From 5fa78e073c5c6269997e7d03b56176b157c7a327 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 16 May 2018 16:21:30 +0800
Subject: [PATCH] 设备删除,更新redis

---
 src/main/resources/mapper/DeviceMapper.xml |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml
index 4905b25..2808a19 100644
--- a/src/main/resources/mapper/DeviceMapper.xml
+++ b/src/main/resources/mapper/DeviceMapper.xml
@@ -177,6 +177,7 @@
 		<if test="devName!=null and ''!=devName">
 			and dev.name like CONCAT('%',#{devName},'%')
 		</if>
+			and dev.is_delete = 0
 		</where>
 	</select>
 	<select id="selectByOrgIdAndMpId" resultMap="BaseResultMap">
@@ -188,6 +189,7 @@
 				mpt.organization_id =  #{orgId}
 			</if>
 			and dev.monitor_point_id = #{mpId}
+			and dev.is_delete = 0
 		</where>
 	</select>
 	<select id="selectByMap" parameterType="java.util.Map" resultMap="BaseResultMap">
@@ -204,6 +206,7 @@
             AND dev.latitude  < #{mapBounds.Fe,jdbcType=NUMERIC}
             AND dev.latitude  > #{mapBounds.Ke,jdbcType=NUMERIC}
      		 ]]>
+			AND dev.is_delete =0
 		</where>
 	</select>
 	<resultMap id="BaseResultWithOrgIdsMap" type="com.moral.entity.Device" extends="BaseResultMap">
@@ -222,6 +225,7 @@
         left join monitor_point  mpt on dev.monitor_point_id = mpt.id
         left join profession  pro on pro.id = dev.profession_id
 		where dev.mac = #{mac,jdbcType=VARCHAR}
+		limit 0,1
 	</select>
 
 	<select id="getDeviceCountByRegion" resultType="java.lang.Integer">

--
Gitblit v1.8.0