|
@@ -17,6 +17,7 @@ import com.zhongshu.card.server.core.domain.devices.permiss.DevicePermiss;
|
|
|
import com.zhongshu.card.server.core.service.base.CommonService;
|
|
import com.zhongshu.card.server.core.service.base.CommonService;
|
|
|
import com.zhongshu.card.server.core.service.user.OperationLogsService;
|
|
import com.zhongshu.card.server.core.service.user.OperationLogsService;
|
|
|
import com.zhongshu.card.server.core.util.CommonUtil;
|
|
import com.zhongshu.card.server.core.util.CommonUtil;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -88,9 +89,11 @@ public class DeviceSyncFromIotService {
|
|
|
|
|
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("lastOnlineTime", param.getLastOnlineTime());
|
|
map.put("lastOnlineTime", param.getLastOnlineTime());
|
|
|
|
|
+ map.put("lastOfflineTime", param.getLastOfflineTime());
|
|
|
map.put("onLineState", CommonUtil.getEnumByName(OnLineState.class, param.getOnLineState()));
|
|
map.put("onLineState", CommonUtil.getEnumByName(OnLineState.class, param.getOnLineState()));
|
|
|
map.put("state", param.getState());
|
|
map.put("state", param.getState());
|
|
|
map.put("lastOnlineTimeStr", DateUtils.paresTime(param.getLastOnlineTime(), DateUtils.FORMAT_LONG));
|
|
map.put("lastOnlineTimeStr", DateUtils.paresTime(param.getLastOnlineTime(), DateUtils.FORMAT_LONG));
|
|
|
|
|
+
|
|
|
commonService.updateData(where, map, DeviceInfo.class.getSimpleName());
|
|
commonService.updateData(where, map, DeviceInfo.class.getSimpleName());
|
|
|
commonService.updateData(where, map, DeviceBind.class.getSimpleName());
|
|
commonService.updateData(where, map, DeviceBind.class.getSimpleName());
|
|
|
|
|
|
|
@@ -109,6 +112,7 @@ public class DeviceSyncFromIotService {
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("lastOnlineTime", param.getLastOnlineTime());
|
|
map.put("lastOnlineTime", param.getLastOnlineTime());
|
|
|
map.put("lastOnlineTimeStr", DateUtils.paresTime(param.getLastOnlineTime(), DateUtils.FORMAT_LONG));
|
|
map.put("lastOnlineTimeStr", DateUtils.paresTime(param.getLastOnlineTime(), DateUtils.FORMAT_LONG));
|
|
|
|
|
+ map.put("lastOfflineTime", param.getLastOfflineTime());
|
|
|
commonService.updateData(where, map, DeviceInfo.class.getSimpleName());
|
|
commonService.updateData(where, map, DeviceInfo.class.getSimpleName());
|
|
|
return ResultContent.buildSuccess();
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
}
|