toString模板
    equals模板

    1. @Override
    2. public boolean equals(Object obj) {
    3. if (obj == null) {
    4. return false;
    5. }
    6. // 是否属于同一类型
    7. if (!(obj instanceof ApplicationAttachInfo)) {
    8. return false;
    9. }
    10. // 强转成同一类型
    11. ApplicationAttachInfo aa = (ApplicationAttachInfo) obj;
    12. // 属性是否相等
    13. if (this.attrName != null && this.attrName.equals(aa.getAttrName())) {
    14. return this.attrValue != null && this.attrValue.equals(aa.getAttrValue());
    15. }
    16. return false;
    17. }
    1. @Override
    2. public String toString() {
    3. return "ApplyRiskAuditDTO{" +
    4. "applicationOrigin='" + applicationOrigin + '\'' +
    5. ", auditorID='" + auditorID + '\'' +
    6. ", auditorName='" + auditorName + '\'' +
    7. ", riskRemark='" + riskRemark + '\'' +
    8. ", auditFeedback='" + auditFeedback + '\'' +
    9. ", merchantBusinessType=" + merchantBusinessType +
    10. ", passedPiTypeList=" + passedPiTypeList +
    11. ", rejectedPiTypeList=" + rejectedPiTypeList +
    12. ", applicationID=" + applicationID +
    13. ", auditResult=" + auditResult +
    14. ", merchantIndustryId=" + merchantIndustryId +
    15. ", merchantNO='" + merchantNO + '\'' +
    16. ", industryLimitQuotas='" + industryLimitQuotas + '\'' +
    17. ", jdThirdIndustryCode='" + jdThirdIndustryCode + '\'' +
    18. ", jdThirdIndustryName='" + jdThirdIndustryName + '\'' +
    19. ", riskLevel=" + riskLevel +
    20. ", applicationReviewInfo=" + applicationReviewInfo +
    21. ", innerMerchantNo='" + innerMerchantNo + '\'' +
    22. ", productId=" + productId +
    23. '}';
    24. }
    1. public int hashCode() {
    2. int PRIME = true;
    3. int result = 1;
    4. int result = result * 59 + (this.isSuccess() ? 79 : 97);
    5. Object $code = this.getCode();
    6. result = result * 59 + ($code == null ? 43 : $code.hashCode());
    7. Object $message = this.getMessage();
    8. result = result * 59 + ($message == null ? 43 : $message.hashCode());
    9. Object $data = this.getData();
    10. result = result * 59 + ($data == null ? 43 : $data.hashCode());
    11. return result;
    12. }