liujie
2026-06-09 c96fbe6b0aeb413a17c429133ee6d81d138144b9
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.xiaopeng.api.dto.account;
 
import com.baomidou.mybatisplus.annotation.EnumValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
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 org.springframework.format.annotation.DateTimeFormat;
 
import java.time.LocalDateTime;
 
/**
 * 运维人员查询条件DTO
 *
 * @author mitao
 */
@Data
@ApiModel("运维人员状态")
@Document(collection = "xp_operations_user_position")
@CompoundIndexes({
        @CompoundIndex(name = "idx_status", def = "{'status': 1}"),
        @CompoundIndex(name = "idx_location", def = "{'location': '2dsphere'}")
})
public class XpOperationsUserPositionDTO {
 
    @ApiModelProperty(value = "运维人员id")
    @Id
    private long id;
 
    @ApiModelProperty(value = "经度")
    private double latitude;
 
    @ApiModelProperty(value = "纬度")
    private double longitude;
 
 
    @ApiModelProperty(value = "时间")
    private Long updateTime;
 
    @GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
    private GeoJsonPoint location;
 
    @ApiModelProperty(value = "状态:0在线,1空闲,2上班中")
    private Integer status;
 
    @ApiModelProperty(value = "距离,这个是mongoDB查询时填充")
    private double distance;
 
}