package com.moral.api.pojo.dto.cruiser;
|
|
|
import lombok.Data;
|
|
import java.util.Objects;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@Data
|
public class CruiserDTO {
|
|
/**
|
* 数据时间
|
*/
|
private String time;
|
|
/**
|
* 纬度
|
*/
|
@JsonProperty(value = "flylat")
|
private Double flyLat;
|
|
/**
|
* 经度
|
*/
|
@JsonProperty(value = "flylon")
|
private Double flyLon;
|
|
|
|
@Override
|
public boolean equals(Object o) {
|
if (this == o) return true;
|
if (o == null || getClass() != o.getClass()) return false;
|
CruiserDTO cruiser = (CruiserDTO) o;
|
//当type、color 内容都相等的时候,才返回true
|
return Objects.equals(flyLat, cruiser.flyLat) &&
|
Objects.equals(flyLon, cruiser.flyLon);
|
}
|
@Override
|
public int hashCode() {
|
return Objects.hash(flyLat, flyLon);
|
}
|
|
}
|