车辆详情新增车辆位置
This commit is contained in:
parent
3393089eee
commit
f74ed9f266
@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.locationtech.jts.geom.Polygon;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -103,4 +104,9 @@ public class FeignEbikeUserBikeInfo implements Serializable {
|
||||
*/
|
||||
private Polygon regionPolygon;
|
||||
|
||||
/**
|
||||
* 车辆当前位置
|
||||
*/
|
||||
private Point location;
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package com.cdzy.operations.model.dto;
|
||||
|
||||
import com.cdzy.operations.handler.PointDeserializer;
|
||||
import com.cdzy.operations.handler.PointSerializer;
|
||||
import com.cdzy.operations.handler.PointTypeHandler;
|
||||
import com.cdzy.operations.handler.PolygonDeserializer;
|
||||
import com.cdzy.operations.handler.PolygonSerializer;
|
||||
import com.cdzy.operations.handler.PolygonTypeHandler;
|
||||
@ -10,6 +13,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.locationtech.jts.geom.Polygon;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -112,5 +116,11 @@ public class EbikeUserBikeInfo implements Serializable {
|
||||
@JsonDeserialize(using = PolygonDeserializer.class)
|
||||
private Polygon regionPolygon;
|
||||
|
||||
|
||||
/**
|
||||
* 当前位置
|
||||
*/
|
||||
@Column(typeHandler = PointTypeHandler.class)
|
||||
@JsonSerialize(using = PointSerializer.class)
|
||||
@JsonDeserialize(using = PointDeserializer.class)
|
||||
private Point location;
|
||||
}
|
||||
|
||||
@ -450,6 +450,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
.helmetManagementFee(configurations.getHelmetManagementFee())
|
||||
.soc(soc)
|
||||
.regionPolygon(region.getRegionPolygon())
|
||||
.location(info.getLocation())
|
||||
.build();
|
||||
} else {
|
||||
EbikeUserBikeInfo userBikeInfo = EbikeUserBikeInfo.builder()
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
package com.cdzy.user.model.vo;
|
||||
|
||||
import com.cdzy.user.handler.PointDeserializer;
|
||||
import com.cdzy.user.handler.PointSerializer;
|
||||
import com.cdzy.user.handler.PointTypeHandler;
|
||||
import com.cdzy.user.handler.PolygonDeserializer;
|
||||
import com.cdzy.user.handler.PolygonSerializer;
|
||||
import com.cdzy.user.handler.PolygonTypeHandler;
|
||||
@ -10,6 +13,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
import org.locationtech.jts.geom.Polygon;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -111,4 +115,12 @@ public class EbikeBikeInfoVo implements Serializable {
|
||||
@JsonSerialize(using = PolygonSerializer.class)
|
||||
@JsonDeserialize(using = PolygonDeserializer.class)
|
||||
private Polygon regionPolygon;
|
||||
|
||||
/**
|
||||
* 车辆当前位置
|
||||
*/
|
||||
@Column(typeHandler = PointTypeHandler.class)
|
||||
@JsonSerialize(using = PointSerializer.class)
|
||||
@JsonDeserialize(using = PointDeserializer.class)
|
||||
private Point location;
|
||||
}
|
||||
|
||||
@ -248,6 +248,7 @@ public class EbikeOrderServiceImpl extends ServiceImpl<EbikeOrderMapper, EbikeOr
|
||||
.noParkingZoneFee(source.getNoParkingZoneFee())
|
||||
.helmetManagementFee(source.getHelmetManagementFee())
|
||||
.regionPolygon(source.getRegionPolygon())
|
||||
.location(source.getLocation())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user