车辆列表获取
This commit is contained in:
parent
31a26362c6
commit
f920c36edc
@ -23,7 +23,7 @@ public class PGpointSerializer extends JsonSerializer<PGpoint> {
|
||||
gen.writeStartObject();
|
||||
gen.writeStringField("type","point");
|
||||
gen.writeNumberField("longitude",point.x);
|
||||
gen.writeNumberField("latitude",point.x);
|
||||
gen.writeNumberField("latitude",point.y);
|
||||
// gen.writeArrayFieldStart("coordinates");
|
||||
// gen.writeNumber(point.x);
|
||||
// gen.writeNumber(point.y);
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
package com.cdzy.user.model.vo;
|
||||
|
||||
import com.cdzy.user.handler.PGpointDeserializer;
|
||||
import com.cdzy.user.handler.PGpointSerializer;
|
||||
import com.cdzy.user.handler.PGpointTypeHandler;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.postgresql.geometric.PGpoint;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类。
|
||||
*
|
||||
* @author attiya
|
||||
* @since 2025-10-21
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EbikeBikeRadiusVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户所在坐标
|
||||
*/
|
||||
@Column(typeHandler = PGpointTypeHandler.class)
|
||||
@JsonSerialize(using = PGpointSerializer.class)
|
||||
@JsonDeserialize(using = PGpointDeserializer.class)
|
||||
@NotNull(message = "用户所在坐标不能为空")
|
||||
private PGpoint point;
|
||||
|
||||
/**
|
||||
* 用户所在坐标
|
||||
*/
|
||||
@NotNull(message = "半径不能为空")
|
||||
private Float radius;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user