From 7486f185f3a48b75f163a99ecd7546b525018dd0 Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Thu, 17 May 2018 10:03:48 +0800 Subject: [PATCH] 行业 优化 --- src/main/resources/mapper/DeviceMapper.xml | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml index 4905b25..be3deb8 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"> @@ -276,6 +280,9 @@ <if test="areaCode != null"> AND mp.area_code = #{areaCode} </if> + <if test="monitorPointId != null"> + AND mp.id = #{monitorPointId} + </if> ) <if test="professionId != null"> AND d.profession_id = #{professionId} -- Gitblit v1.8.0