Compare commits

..

2 Commits

Author SHA1 Message Date
77489ee59d Merge remote-tracking branch 'origin/main' 2025-05-22 14:14:59 +08:00
441ddfc2a8 代码检查 2025-05-22 14:14:37 +08:00
2 changed files with 31 additions and 28 deletions

View File

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

View File

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