Compare commits

..

No commits in common. "77489ee59d6ac24f51170745ddf34800bc925947" and "fac44580d8b0daa26b0aaa280ef55998fb9c6982" have entirely different histories.

2 changed files with 28 additions and 31 deletions

View File

@ -72,14 +72,10 @@ public class EbikeCoreController {
EbikeEcuInfo ebikeEcuInfo = ecuInfoService.getById(ecuId); EbikeEcuInfo ebikeEcuInfo = ecuInfoService.getById(ecuId);
boolean online = EmqxApiClient.isClientOnline(ebikeEcuInfo.getEcuSn()); boolean online = EmqxApiClient.isClientOnline(ebikeEcuInfo.getEcuSn());
CoreResult result = online ? CoreResult.online() : CoreResult.offline(); CoreResult result = online ? CoreResult.online() : CoreResult.offline();
if (bikeId != null) {
saveLog(bikeId, "设备是否在线", "1"); saveLog(bikeId, "设备是否在线", "1");
}
return JsonResult.success(result); return JsonResult.success(result);
} catch (Exception e) { } catch (Exception e) {
if (bikeId != null) { saveLog(bikeId, "设备是否在线", "0");
saveLog(bikeId, "设备是否在线", "1");
}
throw e; throw e;
} }
} }

View File

@ -35,6 +35,7 @@ public class EbikeOperationController {
*/ */
@GetMapping("page") @GetMapping("page")
public JsonResult<?> page(PageParam pageParam) { public JsonResult<?> page(PageParam pageParam) {
//TODO添加筛选条件过滤运营状态
QueryWrapper queryWrapper = QueryWrapper.create() QueryWrapper queryWrapper = QueryWrapper.create()
.where(EBIKE_BIKE_INFO.STATE.eq(1)); .where(EBIKE_BIKE_INFO.STATE.eq(1));
Page<EbikeBikeInfo> page = bikeInfoService.page(pageParam.getPage(), queryWrapper); Page<EbikeBikeInfo> page = bikeInfoService.page(pageParam.getPage(), queryWrapper);