Commit 5b2859f6 authored by AfirSraftGarrier's avatar AfirSraftGarrier

修改连接测试

parent efaf7dd9
...@@ -67,18 +67,22 @@ public class AuthManager { ...@@ -67,18 +67,22 @@ public class AuthManager {
public boolean auth(String appId, String sn, String sign) { public boolean auth(String appId, String sn, String sign) {
if (!allApply.containsKey(appId)) { if (!allApply.containsKey(appId)) {
log.info("no valid appId...");
return false; return false;
} }
if (!deviceManager.getContainSn(sn)) { if (!deviceManager.getContainSn(sn)) {
log.info("no this sn...");
return false; return false;
} }
DeviceVo device = deviceManager.getDevice(sn); DeviceVo device = deviceManager.getDevice(sn);
// 未绑定 // 未绑定
if (device.getSnBind() == null) { if (device.getSnBind() == null) {
log.info("bind sn null...");
return false; return false;
} }
int deviceId = device.getDeviceId(); int deviceId = device.getDeviceId();
if (deviceBlackMap.containsKey(deviceId)) { if (deviceBlackMap.containsKey(deviceId)) {
log.info("in black...");
return false; return false;
} }
Apply apply = allApply.get(appId); Apply apply = allApply.get(appId);
...@@ -88,6 +92,7 @@ public class AuthManager { ...@@ -88,6 +92,7 @@ public class AuthManager {
if (CommonUtil.toUpperCaseByEnglish(sign).equals(CommonUtil.toUpperCaseByEnglish(valSHA1))) { if (CommonUtil.toUpperCaseByEnglish(sign).equals(CommonUtil.toUpperCaseByEnglish(valSHA1))) {
return true; return true;
} else { } else {
log.info("sign no valid:" + input);
return false; return false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment