From d888e61d8e1cadb765e597cb51792e0396093188 Mon Sep 17 00:00:00 2001 From: HuangXin Date: Tue, 7 Jul 2020 20:28:06 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E4=B8=8D=E5=85=A8=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=E7=9A=84=E7=B1=BB=E6=96=B9=E6=B3=95=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/dispose/dispose/DeviceRouter.java | 10 ++++++++-- .../java/com/dispose/pojo/dto/ProtocolRespDTO.java | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/dispose/dispose/DeviceRouter.java b/src/main/java/com/dispose/dispose/DeviceRouter.java index 1aac2dc8..14949e34 100644 --- a/src/main/java/com/dispose/dispose/DeviceRouter.java +++ b/src/main/java/com/dispose/dispose/DeviceRouter.java @@ -22,6 +22,12 @@ public class DeviceRouter { return devType + "_" + ipAddr; } + /** + * Device router factory dispose entry manager. + * + * @param device the device + * @return the dispose entry manager + */ public static DisposeEntryManager deviceRouterFactory(DisposeDevice device) { String mapKey = getMapKey(device.getType(), device.getIpAddr()); @@ -56,11 +62,11 @@ public class DeviceRouter { } /** - * Device router factory dispose entry manager. + * Gets device router factory. * * @param devType the dev type * @param ipAddr the ip addr - * @return the dispose entry manager + * @return the device router factory */ public static DisposeEntryManager getDeviceRouterFactory(int devType, String ipAddr) { diff --git a/src/main/java/com/dispose/pojo/dto/ProtocolRespDTO.java b/src/main/java/com/dispose/pojo/dto/ProtocolRespDTO.java index 6b3be27a..d8541113 100644 --- a/src/main/java/com/dispose/pojo/dto/ProtocolRespDTO.java +++ b/src/main/java/com/dispose/pojo/dto/ProtocolRespDTO.java @@ -82,6 +82,16 @@ public class ProtocolRespDTO extends BaseProtocolDTO { return result(err, getObjectJson(obj), ConstValue.Protocol.CRYPTO_NONE); } + /** + * Result protocol resp dto. + * + * @param the type parameter + * @param err the err + * @param obj the obj + * @param objType the obj type + * @return the protocol resp dto + * @throws JsonProcessingException the json processing exception + */ public static ProtocolRespDTO result(ErrorCode err, Object obj, Class objType) throws JsonProcessingException { return result(err, getObjectJson(obj, objType), ConstValue.Protocol.CRYPTO_NONE); }