feat: 添加日志配置和Logback依赖
refactor: 重构实体类equals和hashCode方法 fix: 修复WebSocketService消息发送逻辑 style: 格式化代码和优化导入 docs: 更新JacksonConfig日期序列化格式 test: 添加CompanyFilePathTableCell测试类 chore: 清理无用代码和注释
This commit is contained in:
@@ -2,6 +2,9 @@ package com.ecep.contract.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -27,7 +30,7 @@ import lombok.ToString;
|
||||
}, uniqueConstraints = {
|
||||
|
||||
})
|
||||
@ToString(exclude = {"company", "contract"})
|
||||
@ToString(exclude = { "company", "contract" })
|
||||
public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@@ -54,4 +57,22 @@ public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Seri
|
||||
contact.getPhone() +
|
||||
contact.getEmail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object object) {
|
||||
if (this == object)
|
||||
return true;
|
||||
if (object == null)
|
||||
return false;
|
||||
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||
return false;
|
||||
}
|
||||
CompanyContract that = (CompanyContract) object;
|
||||
return getId() != null && Objects.equals(getId(), that.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user