为所有点类表映射name属性
This commit is contained in:
@@ -23,6 +23,11 @@ public class XianBridgeBasePointVo {
|
||||
*/
|
||||
private String bridgeName;
|
||||
|
||||
/**
|
||||
* 通用名称字段(用于统一访问)
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@@ -37,17 +42,18 @@ public class XianBridgeBasePointVo {
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
XianBridgeBasePointVo that = (XianBridgeBasePointVo) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(bridgeName, that.bridgeName) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
return Objects.equals(id, that.id) && Objects.equals(bridgeName, that.bridgeName) && Objects.equals(name, that.name) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, bridgeName, lon, lat);
|
||||
return Objects.hash(id, bridgeName, name, lon, lat);
|
||||
}
|
||||
public static XianBridgeBasePointVo entity2Vo(XianBridge entity) {
|
||||
XianBridgeBasePointVo vo = new XianBridgeBasePointVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setBridgeName(entity.getBridgeName());
|
||||
vo.setName(entity.getBridgeName()); // 设置通用name字段
|
||||
vo.setLon(entity.getLon() != null ? entity.getLon().doubleValue() : null);
|
||||
vo.setLat(entity.getLat() != null ? entity.getLat().doubleValue() : null);
|
||||
return vo;
|
||||
|
||||
@@ -22,6 +22,11 @@ public class XianFirefighterBasePointVo {
|
||||
*/
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
* 通用名称字段(用于统一访问)
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 经度
|
||||
@@ -37,6 +42,7 @@ public class XianFirefighterBasePointVo {
|
||||
XianFirefighterBasePointVo vo = new XianFirefighterBasePointVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setTeamName(entity.getTeamName());
|
||||
vo.setName(entity.getTeamName()); // 设置通用name字段
|
||||
vo.setLon(entity.getLon() != null ? entity.getLon().doubleValue() : null);
|
||||
vo.setLat(entity.getLat() != null ? entity.getLat().doubleValue() : null);
|
||||
return vo;
|
||||
@@ -55,11 +61,11 @@ public class XianFirefighterBasePointVo {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
XianFirefighterBasePointVo that = (XianFirefighterBasePointVo) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(teamName, that.teamName) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
return Objects.equals(id, that.id) && Objects.equals(teamName, that.teamName) && Objects.equals(name, that.name) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, teamName,lon, lat);
|
||||
return Objects.hash(id, teamName, name, lon, lat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ public class XianHiddenDangerSpotsBasePointVo {
|
||||
* 灾害点名称
|
||||
*/
|
||||
private String disasterName;
|
||||
|
||||
/**
|
||||
* 通用名称字段(用于统一访问)
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@@ -36,6 +41,7 @@ public class XianHiddenDangerSpotsBasePointVo {
|
||||
XianHiddenDangerSpotsBasePointVo vo = new XianHiddenDangerSpotsBasePointVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setDisasterName(entity.getDisasterName());
|
||||
vo.setName(entity.getDisasterName()); // 设置通用name字段
|
||||
vo.setLon(entity.getLon());
|
||||
vo.setLat(entity.getLat());
|
||||
vo.setDisasterType(entity.getDisasterType());
|
||||
@@ -60,11 +66,11 @@ public class XianHiddenDangerSpotsBasePointVo {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
XianHiddenDangerSpotsBasePointVo that = (XianHiddenDangerSpotsBasePointVo) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(disasterName, that.disasterName) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat) && Objects.equals(disasterType, that.disasterType);
|
||||
return Objects.equals(id, that.id) && Objects.equals(disasterName, that.disasterName) && Objects.equals(name, that.name) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat) && Objects.equals(disasterType, that.disasterType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, disasterName, lon, lat, disasterType);
|
||||
return Objects.hash(id, disasterName, name, lon, lat, disasterType);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,11 @@ public class XianReservoirListBasePointVo {
|
||||
*/
|
||||
private String reservoirName;
|
||||
|
||||
/**
|
||||
* 通用名称字段(用于统一访问)
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@@ -37,6 +42,7 @@ public class XianReservoirListBasePointVo {
|
||||
XianReservoirListBasePointVo vo = new XianReservoirListBasePointVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setReservoirName(entity.getReservoirName());
|
||||
vo.setName(entity.getReservoirName()); // 设置通用name字段
|
||||
vo.setLon(entity.getLon());
|
||||
vo.setLat(entity.getLat());
|
||||
return vo;
|
||||
@@ -55,12 +61,12 @@ public class XianReservoirListBasePointVo {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
XianReservoirListBasePointVo that = (XianReservoirListBasePointVo) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(reservoirName, that.reservoirName)
|
||||
return Objects.equals(id, that.id) && Objects.equals(reservoirName, that.reservoirName) && Objects.equals(name, that.name)
|
||||
&& Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, reservoirName, lon, lat);
|
||||
return Objects.hash(id, reservoirName, name, lon, lat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,11 @@ public class XianRiskSpotsBasePointVo {
|
||||
*/
|
||||
private String riskName;
|
||||
|
||||
/**
|
||||
* 通用名称字段(用于统一访问)
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@@ -33,6 +38,7 @@ public class XianRiskSpotsBasePointVo {
|
||||
XianRiskSpotsBasePointVo vo = new XianRiskSpotsBasePointVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setRiskName(entity.getRiskName());
|
||||
vo.setName(entity.getRiskName()); // 设置通用name字段
|
||||
vo.setLon(entity.getLon());
|
||||
vo.setLat(entity.getLat());
|
||||
return vo;
|
||||
@@ -51,11 +57,11 @@ public class XianRiskSpotsBasePointVo {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
XianRiskSpotsBasePointVo that = (XianRiskSpotsBasePointVo) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(riskName, that.riskName) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
return Objects.equals(id, that.id) && Objects.equals(riskName, that.riskName) && Objects.equals(name, that.name) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, riskName, lon, lat);
|
||||
return Objects.hash(id, riskName, name, lon, lat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,11 @@ public class XianSchoolBasePointVo {
|
||||
*/
|
||||
private String schoolName;
|
||||
|
||||
/**
|
||||
* 通用名称字段(用于统一访问)
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@@ -37,6 +42,7 @@ public class XianSchoolBasePointVo {
|
||||
XianSchoolBasePointVo vo = new XianSchoolBasePointVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setSchoolName(entity.getSchoolName());
|
||||
vo.setName(entity.getSchoolName()); // 设置通用name字段
|
||||
vo.setLon(entity.getLon());
|
||||
vo.setLat(entity.getLat());
|
||||
return vo;
|
||||
@@ -55,11 +61,11 @@ public class XianSchoolBasePointVo {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
XianSchoolBasePointVo that = (XianSchoolBasePointVo) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(schoolName, that.schoolName) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
return Objects.equals(id, that.id) && Objects.equals(schoolName, that.schoolName) && Objects.equals(name, that.name) && Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, schoolName, lon, lat);
|
||||
return Objects.hash(id, schoolName, name, lon, lat);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,11 @@ public class XianSubwayStationsBasePointVo {
|
||||
*/
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 通用名称字段(用于统一访问)
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@@ -37,6 +42,7 @@ public class XianSubwayStationsBasePointVo {
|
||||
XianSubwayStationsBasePointVo vo = new XianSubwayStationsBasePointVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setStationName(entity.getStationName());
|
||||
vo.setName(entity.getStationName()); // 设置通用name字段
|
||||
vo.setLon(entity.getLon());
|
||||
vo.setLat(entity.getLat());
|
||||
return vo;
|
||||
@@ -55,12 +61,12 @@ public class XianSubwayStationsBasePointVo {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
XianSubwayStationsBasePointVo that = (XianSubwayStationsBasePointVo) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(stationName, that.stationName)
|
||||
return Objects.equals(id, that.id) && Objects.equals(stationName, that.stationName) && Objects.equals(name, that.name)
|
||||
&& Objects.equals(lon, that.lon) && Objects.equals(lat, that.lat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, stationName, lon, lat);
|
||||
return Objects.hash(id, stationName, name, lon, lat);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user