fengxiang
2018-05-16 5fa78e073c5c6269997e7d03b56176b157c7a327
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">