优化通道同步添加对SN的判断,精简代码

This commit is contained in:
648540858
2022-04-17 19:48:05 +08:00
parent 25102229f6
commit 0dc1807f62
11 changed files with 121 additions and 106 deletions

View File

@@ -172,12 +172,8 @@ public class DeviceQuery {
wvpResult.setData(syncStatus);
return wvpResult;
}
SyncStatus syncStatusReady = new SyncStatus();
deviceService.setChannelSyncReady(deviceId);
cmder.catalogQuery(device, event -> {
String errorMsg = String.format("同步通道失败,错误码: %s, %s", event.statusCode, event.msg);
deviceService.setChannelSyncEnd(deviceId, errorMsg);
});
deviceService.sync(device);
WVPResult<SyncStatus> wvpResult = new WVPResult<>();
wvpResult.setCode(0);
wvpResult.setMsg("开始同步");