|
|
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
|
|
|
@@ -63,26 +64,36 @@ public class CustomerInfoVo {
|
|
|
@ApiModelProperty(value = "同投保人")
|
|
|
private boolean insuranceHolder;
|
|
|
|
|
|
- public boolean contrastInfo(CustomerInfoVo customerInfoVo){
|
|
|
- if(!this.name.equals(customerInfoVo.getName()))
|
|
|
+ public boolean contrastInfo(CustomerInfoVo customerInfoVo) {
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.name, customerInfoVo.getName())) {
|
|
|
return false;
|
|
|
- if(!this.identifyNumber.equals(customerInfoVo.getIdentifyNumber()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.identifyNumber, customerInfoVo.getIdentifyNumber())) {
|
|
|
return false;
|
|
|
- if(!this.identifyType.equals(customerInfoVo.getIdentifyType()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.identifyType, customerInfoVo.getIdentifyType())) {
|
|
|
return false;
|
|
|
- if(!this.addr.equals(customerInfoVo.getAddr()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.addr, customerInfoVo.getAddr())) {
|
|
|
return false;
|
|
|
- if(!this.age.equals(customerInfoVo.getAge()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.age, customerInfoVo.getAge())) {
|
|
|
return false;
|
|
|
- if(!this.gender.equals(customerInfoVo.getGender()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.gender, customerInfoVo.getGender())) {
|
|
|
return false;
|
|
|
- if(!this.mobile.equals(customerInfoVo.getMobile()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.mobile, customerInfoVo.getMobile())) {
|
|
|
return false;
|
|
|
- if(!this.identifyValidDate.equals(customerInfoVo.getIdentifyValidDate()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.identifyValidDate, customerInfoVo.getIdentifyValidDate())) {
|
|
|
return false;
|
|
|
- if(!this.identifyValidEndDate.equals(customerInfoVo.getIdentifyValidEndDate()))
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.nullSafeEquals(this.identifyValidEndDate, customerInfoVo.getIdentifyValidEndDate())) {
|
|
|
return false;
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|