equals方法
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()){
return false;
}
ResultDto that = (ResultDto) o;
if(policyId == null){
if(that.policyId==null){
return policyNumber.equals(that.policyNumber);
}else {
return false;
}
}
return policyId.equals(that.policyId);
}
hashCode方法
@Override
public int hashCode() {
return Objects.hash(billingAccountNumber, policyNumber, policyEffectiveDate, transactionDate, transactionType, transactionSubtype, billingAmount, transactionStatus, currency);
}