Просмотр исходного кода

删除终端时删除终端绑定关系

wangchao лет назад: 4
Родитель
Сommit
1d834a772a

+ 7 - 1
ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/impl/DeviceManageDaoImpl.java

@ -117,6 +117,12 @@ public class DeviceManageDaoImpl extends AbstractBizDao implements DeviceManageD
117 117
		// 拼接接口地址
118 118
		String url = IotUrlEnums.deleteDevice.getUrl() + params.getString("deviceId");
119 119
		Map<String, String> map = NorthboundInterfaceUtil.iotGetCallUtil(url);
120
		//根据终端id删除终端关联信息
121
		if (NorthboundInterfaceUtil.resultCode_succeed.equals(map.get("resultCode"))) {
122
			HashMap<String, Object> paramsHashMap = new HashMap<>();
123
			paramsHashMap.put("DEVICE_ID", params.get("deviceId"));
124
			int i = unbindDevice(paramsHashMap);
125
		}
120 126
		return map;
121 127
	}
122 128
@ -168,7 +174,7 @@ public class DeviceManageDaoImpl extends AbstractBizDao implements DeviceManageD
168 174
	}
169 175
170 176
	@Override
171
	public int unbindDevice(Map params, String type) throws Exception {
177
	public int unbindDevice(Map params) throws Exception {
172 178
		HashMap<String, Object> paramsHashMap = new HashMap<>();
173 179
		//删除终端人员关联表
174 180
		paramsHashMap.put("DEVICE_ID", params.get("DEVICE_ID"));

+ 1 - 1
ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/interfaces/DeviceManageDao.java

@ -63,7 +63,7 @@ public interface DeviceManageDao {
63 63
64 64
	int bindDevice(Map params, String type) throws Exception;
65 65
66
	int unbindDevice(Map params, String type) throws Exception;
66
	int unbindDevice(Map params) throws Exception;
67 67
	
68 68
	List<Map<String, Object>> queryCurrentDeviceLocationInfo(JMap params) throws Exception;
69 69
}

+ 1 - 1
ebc-sea-platform/src/main/java/com/ai/ipu/server/service/impl/DeviceManageServiceImpl.java

@ -173,7 +173,7 @@ public class DeviceManageServiceImpl implements DeviceManageService {
173 173
174 174
	@Override
175 175
	public boolean unbindDevice(JMap params) throws Exception {
176
		int num = deviceManageDao.unbindDevice(params, params.getString("type"));
176
		int num = deviceManageDao.unbindDevice(params);
177 177
		return num > 0;
178 178
	}
179 179