refactor(vo): 重构VO类及相关模型,添加Voable接口实现
feat(constant): 添加WebSocket错误码常量 docs(model): 为模型类添加注释 fix(service): 修复ProductUsageService缓存键问题 refactor(converter): 重构字符串转换器,移除EntityStringConverter依赖 feat(tab): 添加ComboBoxUtils工具类,优化下拉框初始化 style: 移除无用导入和字段
This commit is contained in:
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.HibernateProxyUtils;
|
||||
import com.ecep.contract.vo.DeliverySignMethodVo;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -25,7 +26,7 @@ import lombok.ToString;
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "PRODUCT_DELIVERY_SIGN_METHOD", schema = "supplier_ms")
|
||||
public class DeliverySignMethod implements BasedEntity, IdentityEntity , Serializable {
|
||||
public class DeliverySignMethod implements BasedEntity, IdentityEntity , Serializable, Voable<DeliverySignMethodVo> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false)
|
||||
@@ -68,4 +69,17 @@ public class DeliverySignMethod implements BasedEntity, IdentityEntity , Seriali
|
||||
public final int hashCode() {
|
||||
return HibernateProxyUtils.hashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeliverySignMethodVo toVo() {
|
||||
DeliverySignMethodVo vo = new DeliverySignMethodVo();
|
||||
vo.setId(id);
|
||||
vo.setName(name);
|
||||
vo.setCode(code);
|
||||
vo.setSaleTypeId(saleType != null ? saleType.getId() : null);
|
||||
vo.setDescription(description);
|
||||
vo.setActive(false);
|
||||
vo.setCreated(null);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user