类型映射、空列表允许
This commit is contained in:
parent
f3f7474c25
commit
519f65e443
@ -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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除时间
|
* 删除时间
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user