From 818b15dd582d53baa8226cbc2104c26583b4f3bf Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 12 Apr 2018 13:21:27 +0800
Subject: [PATCH] 地图相关资源
---
src/main/java/com/moral/mapper/DictionaryDataMapper.java | 2 +-
src/main/resources/mapper/MonitorPointMapper.xml | 3 +++
src/main/java/com/moral/mapper/DictionaryMapper.java | 2 +-
src/main/java/com/moral/service/impl/DeviceServiceImpl.java | 4 +++-
src/main/java/com/moral/service/impl/MonitorPointServiceImpl.java | 1 +
5 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/moral/mapper/DictionaryDataMapper.java b/src/main/java/com/moral/mapper/DictionaryDataMapper.java
index 4c5a3c3..038a4be 100644
--- a/src/main/java/com/moral/mapper/DictionaryDataMapper.java
+++ b/src/main/java/com/moral/mapper/DictionaryDataMapper.java
@@ -4,5 +4,5 @@
import com.moral.entity.DictionaryData;
public interface DictionaryDataMapper extends BaseMapper<DictionaryData> {
- DictionaryData selectByPrimaryKey(Integer id);
+// DictionaryData selectByPrimaryKey(Integer id);
}
\ No newline at end of file
diff --git a/src/main/java/com/moral/mapper/DictionaryMapper.java b/src/main/java/com/moral/mapper/DictionaryMapper.java
index 52a8429..6ae4aa0 100644
--- a/src/main/java/com/moral/mapper/DictionaryMapper.java
+++ b/src/main/java/com/moral/mapper/DictionaryMapper.java
@@ -4,5 +4,5 @@
import com.moral.entity.Dictionary;
public interface DictionaryMapper extends BaseMapper<Dictionary> {
- Dictionary selectByPrimaryKey(String dictName);
+// Dictionary selectByPrimaryKey(String dictName);
}
\ No newline at end of file
diff --git a/src/main/java/com/moral/service/impl/DeviceServiceImpl.java b/src/main/java/com/moral/service/impl/DeviceServiceImpl.java
index 74b3571..e9bd2a9 100644
--- a/src/main/java/com/moral/service/impl/DeviceServiceImpl.java
+++ b/src/main/java/com/moral/service/impl/DeviceServiceImpl.java
@@ -211,7 +211,9 @@
if(!StringUtils.isBlank(device.getMac())){
Device simpleDevice = new Device();
simpleDevice.setId(device.getId());
- simpleDevice.setDeviceVersion(device.getDeviceVersion());
+ simpleDevice.setName(device.getName());
+ simpleDevice.setAddress(device.getAddress());
+ simpleDevice.setDeviceVersionId(device.getDeviceVersionId());
simpleDevice.setMac(device.getMac());
simpleDevice.setMonitorPointId(device.getMonitorPointId());
if(device.getMonitorPointId()!=null){
diff --git a/src/main/java/com/moral/service/impl/MonitorPointServiceImpl.java b/src/main/java/com/moral/service/impl/MonitorPointServiceImpl.java
index 5ae279f..3274397 100644
--- a/src/main/java/com/moral/service/impl/MonitorPointServiceImpl.java
+++ b/src/main/java/com/moral/service/impl/MonitorPointServiceImpl.java
@@ -44,6 +44,7 @@
}
@Override
public List<MonitorPoint> queryWithStateByMap(Map<String, Object> params){
+ params.put("isDelete",Constants.IS_DELETE_FALSE);
List<MonitorPoint> monitorPointList = monitorPointMapper.selectByMap(params);
for(MonitorPoint monitorPoint:monitorPointList){
Integer state = getStateFromRedis(monitorPoint.getId());
diff --git a/src/main/resources/mapper/MonitorPointMapper.xml b/src/main/resources/mapper/MonitorPointMapper.xml
index 5e6b2a4..0660abd 100644
--- a/src/main/resources/mapper/MonitorPointMapper.xml
+++ b/src/main/resources/mapper/MonitorPointMapper.xml
@@ -113,6 +113,9 @@
AND mpt.latitude < #{mapBounds.Fe,jdbcType=NUMERIC}
AND mpt.latitude > #{mapBounds.Ke,jdbcType=NUMERIC}
]]>
+ <if test="isDelete != null">
+ AND mpt.is_delete = #{isDelete,jdbcType=VARCHAR}
+ </if>
</where>
</select>
<select id="selectOrganizationIds" parameterType="integer" resultType="integer">
--
Gitblit v1.8.0