yyy
2026-05-08 d2f2d372e03a81cdf2e44f02f1105cfb32dad88d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.xiaopeng.api.vo.automaticPilot;
 
 
import lombok.Data;
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;
import org.springframework.data.mongodb.core.mapping.Document;
 
import java.io.Serializable;
 
/**
 * 车辆实时位置信息
 */
@Data
@Document(collection = "app_user_position")
@CompoundIndexes({
        @CompoundIndex(name = "appUserId", def = "{'appUserId': 1}"),
        @CompoundIndex(name = "location_index", def = "{'point': '2dsphere'}")
}
)
public class AppUserPosition implements Serializable {
    /**
     * 用户id
     */
    private Long appUserId;
    /**
     * 车辆实时位置信息
     */
    @GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
    private GeoJsonPoint point;
    /**
     * 添加时间
     */
    private Long addTime;
}