类型映射、空列表允许

This commit is contained in:
attiya 2025-05-14 09:49:39 +08:00
parent f3f7474c25
commit 519f65e443
2 changed files with 4 additions and 9 deletions

View File

@ -18,6 +18,9 @@ public class RspBikeInfo {
*/ */
private String reginId; private String reginId;
/**
* 电量百分比
*/
private Integer soc; private Integer soc;
/** /**
@ -67,10 +70,6 @@ public class RspBikeInfo {
*/ */
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
/**
* 删除状态1已删除
*/
private Integer isDeleted;
/** /**
* 删除时间 * 删除时间

View File

@ -1461,11 +1461,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
query.eq(EBIKE_BIKE_INFO.REGIN_ID.getName(), regionId); query.eq(EBIKE_BIKE_INFO.REGIN_ID.getName(), regionId);
// 执行查询并将结果映射为ResEbikeInfoReginIdDto类型 // 执行查询并将结果映射为ResEbikeInfoReginIdDto类型
List<ResEbikeInfoReginIdDto> resEbikeInfoReginIdDtos = ebikeBikeInfoMapper.selectListByQueryAs(query, ResEbikeInfoReginIdDto.class); List<ResEbikeInfoReginIdDto> resEbikeInfoReginIdDtos = ebikeBikeInfoMapper.selectListByQueryAs(query, ResEbikeInfoReginIdDto.class);
// 返回查询结果
if (resEbikeInfoReginIdDtos.isEmpty()) {
// 如果查询结果为空返回一个提示信息
return JsonResult.failed("未找到相关电动车信息");
}
return JsonResult.success(resEbikeInfoReginIdDtos); return JsonResult.success(resEbikeInfoReginIdDtos);
} }