修复 检查重复数据 的漏洞

This commit is contained in:
liuchengqian 2023-01-06 19:32:34 +08:00
parent 4e37081075
commit ba5a47efff

View File

@ -159,29 +159,7 @@ public class FirePointServiceImpl implements FirePointService {
*/ */
private boolean checkDuplicatedData(FirePointEntity firePointEntity) { private boolean checkDuplicatedData(FirePointEntity firePointEntity) {
List<FirePointEntity> duplicatedDataList = firePointDao.findDuplicatedData(firePointEntity.getLongitude(), firePointEntity.getLatitude(), firePointEntity.getStreetCode(), firePointEntity.getSatelliteTime(), firePointEntity.getSatelliteType(), firePointEntity.getLandType()); List<FirePointEntity> duplicatedDataList = firePointDao.findDuplicatedData(firePointEntity.getLongitude(), firePointEntity.getLatitude(), firePointEntity.getStreetCode(), firePointEntity.getSatelliteTime(), firePointEntity.getSatelliteType(), firePointEntity.getLandType());
return duplicatedDataList != null && duplicatedDataList.size() > 1; return duplicatedDataList != null && duplicatedDataList.size() > 0;
}
/**
* 检查重复数据
*
* @param shanDongFirePoint 待入库实体类
* @return true-是重复数据拒绝入库false-不是重复数据可以入库
*/
private boolean checkDuplicatedDataX(ShanDongFirePointEntity shanDongFirePoint) {
List<FirePointEntity> duplicatedDataList = firePointDao.findDuplicatedData(shanDongFirePoint.getLongitude(), shanDongFirePoint.getLatitude(), shanDongFirePoint.getStreetCode(), shanDongFirePoint.getSatelliteTime(), shanDongFirePoint.getSatelliteType(), shanDongFirePoint.getLandType());
return duplicatedDataList != null && duplicatedDataList.size() > 1;
}
/**
* 检查重复数据
*
* @param shanDongFirePoint 待入库实体类
* @return true-是重复数据拒绝入库false-不是重复数据可以入库
*/
private boolean checkDuplicatedData(ShanDongFirePointEntity shanDongFirePoint) {
List<ShanDongFirePointEntity> duplicatedDataList = shanDongFirePointDao.findDuplicatedData(shanDongFirePoint.getLongitude(), shanDongFirePoint.getLatitude(), shanDongFirePoint.getStreetCode(), shanDongFirePoint.getSatelliteTime(), shanDongFirePoint.getSatelliteType(), shanDongFirePoint.getLandType());
return duplicatedDataList != null && duplicatedDataList.size() > 1;
} }
/** /**