Commit 5b2859f6 authored by AfirSraftGarrier's avatar AfirSraftGarrier

修改连接测试

parent efaf7dd9
......@@ -67,18 +67,22 @@ public class AuthManager {
public boolean auth(String appId, String sn, String sign) {
if (!allApply.containsKey(appId)) {
log.info("no valid appId...");
return false;
}
if (!deviceManager.getContainSn(sn)) {
log.info("no this sn...");
return false;
}
DeviceVo device = deviceManager.getDevice(sn);
// 未绑定
if (device.getSnBind() == null) {
log.info("bind sn null...");
return false;
}
int deviceId = device.getDeviceId();
if (deviceBlackMap.containsKey(deviceId)) {
log.info("in black...");
return false;
}
Apply apply = allApply.get(appId);
......@@ -88,6 +92,7 @@ public class AuthManager {
if (CommonUtil.toUpperCaseByEnglish(sign).equals(CommonUtil.toUpperCaseByEnglish(valSHA1))) {
return true;
} else {
log.info("sign no valid:" + input);
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