Commit 7280845c by 刘鑫

feat(代码对照表): 代码对照表, 主要存储品牌、产品、服务技能代码对照关系

1 parent ee9364cf
package com.dituhui.pea.order.dao;
import com.dituhui.pea.order.entity.TypeCodeCheckTableEntity;
import org.springframework.data.jpa.repository.JpaRepository;
public interface TableCodeCheckDao extends JpaRepository<TypeCodeCheckTableEntity, Integer> {
TypeCodeCheckTableEntity findByTypeAndCode(String type, String code);
}
package com.dituhui.pea.order.entity;
import lombok.Getter;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;
import java.util.Objects;
@Getter
@Entity
@Table(name = "type_code_check_table")
public class TypeCodeCheckTableEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Id
@Column(name = "id")
private Integer id;
@Basic
@Column(name = "type")
private String type;
@Basic
@Column(name = "name")
private String name;
@Basic
@Column(name = "code")
private String code;
@Basic
@Column(name = "create_time")
private Timestamp createTime;
@Basic
@Column(name = "update_time")
private Timestamp updateTime;
public void setId(int id) {
this.id = id;
}
public void setType(String type) {
this.type = type;
}
public void setName(String name) {
this.name = name;
}
public void setCode(String code) {
this.code = code;
}
public void setCreateTime(Timestamp createTime) {
this.createTime = createTime;
}
public void setUpdateTime(Timestamp updateTime) {
this.updateTime = updateTime;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TypeCodeCheckTableEntity that = (TypeCodeCheckTableEntity) o;
return id == that.id && Objects.equals(type, that.type) && Objects.equals(name, that.name) && Objects.equals(code, that.code) && Objects.equals(createTime, that.createTime) && Objects.equals(updateTime, that.updateTime);
}
@Override
public int hashCode() {
return Objects.hash(id, type, name, code, createTime, updateTime);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!