单位增加关联项目code
This commit is contained in:
parent
e0c23c1e2c
commit
ca4caa64f9
@ -91,6 +91,10 @@ ENGINE=InnoDB
|
||||
|
||||
DROP TABLE `user_company_rel`;
|
||||
|
||||
ALTER TABLE `company`
|
||||
ADD COLUMN `project_code` VARCHAR(64) NULL DEFAULT NULL COMMENT '关联项目' AFTER `phone`;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -25,6 +25,11 @@ public class Company implements Serializable {
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 关联项目
|
||||
*/
|
||||
private String projectCode;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ -69,6 +74,14 @@ public class Company implements Serializable {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getProjectCode() {
|
||||
return projectCode;
|
||||
}
|
||||
|
||||
public void setProjectCode(String projectCode) {
|
||||
this.projectCode = projectCode;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
@ -101,6 +114,7 @@ public class Company implements Serializable {
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
|
||||
&& (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
|
||||
&& (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
|
||||
}
|
||||
@ -113,6 +127,7 @@ public class Company implements Serializable {
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
|
||||
result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
|
||||
result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
return result;
|
||||
@ -128,6 +143,7 @@ public class Company implements Serializable {
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", address=").append(address);
|
||||
sb.append(", phone=").append(phone);
|
||||
sb.append(", projectCode=").append(projectCode);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
|
@ -395,6 +395,76 @@ public class CompanyExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeIsNull() {
|
||||
addCriterion("project_code is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeIsNotNull() {
|
||||
addCriterion("project_code is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeEqualTo(String value) {
|
||||
addCriterion("project_code =", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeNotEqualTo(String value) {
|
||||
addCriterion("project_code <>", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeGreaterThan(String value) {
|
||||
addCriterion("project_code >", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_code >=", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeLessThan(String value) {
|
||||
addCriterion("project_code <", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_code <=", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeLike(String value) {
|
||||
addCriterion("project_code like", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeNotLike(String value) {
|
||||
addCriterion("project_code not like", value, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeIn(List<String> values) {
|
||||
addCriterion("project_code in", values, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeNotIn(List<String> values) {
|
||||
addCriterion("project_code not in", values, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeBetween(String value1, String value2) {
|
||||
addCriterion("project_code between", value1, value2, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectCodeNotBetween(String value1, String value2) {
|
||||
addCriterion("project_code not between", value1, value2, "projectCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
@ -30,11 +30,14 @@ public class CompanyVO {
|
||||
/**联系方式*/
|
||||
private String phone = "";
|
||||
|
||||
private String projectCode;
|
||||
|
||||
public CompanyVO(Company entity) {
|
||||
this.id = entity.getId();
|
||||
this.name = entity.getName();
|
||||
this.address = entity.getAddress();
|
||||
this.phone = entity.getPhone();
|
||||
this.projectCode = entity.getProjectCode();
|
||||
}
|
||||
|
||||
public static List<CompanyVO> convert2VOList(List<Company> dataList) {
|
||||
@ -51,6 +54,7 @@ public class CompanyVO {
|
||||
entity.setName(this.name);
|
||||
entity.setAddress(this.address);
|
||||
entity.setPhone(this.phone);
|
||||
entity.setProjectCode(this.projectCode);
|
||||
entity.setCreateTime(LocalDateTime.now());
|
||||
return entity;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="address" jdbcType="VARCHAR" property="address" />
|
||||
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
@ -68,7 +69,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, address, phone, create_time, update_time
|
||||
id, `name`, address, phone, project_code, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.CompanyExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -110,9 +111,11 @@
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.Company" useGeneratedKeys="true">
|
||||
insert into company (`name`, address, phone,
|
||||
create_time, update_time)
|
||||
project_code, create_time, update_time
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
||||
#{projectCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.Company" useGeneratedKeys="true">
|
||||
insert into company
|
||||
@ -126,6 +129,9 @@
|
||||
<if test="phone != null">
|
||||
phone,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
@ -143,6 +149,9 @@
|
||||
<if test="phone != null">
|
||||
#{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
@ -172,6 +181,9 @@
|
||||
<if test="record.phone != null">
|
||||
phone = #{record.phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
@ -189,6 +201,7 @@
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
address = #{record.address,jdbcType=VARCHAR},
|
||||
phone = #{record.phone,jdbcType=VARCHAR},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
@ -207,6 +220,9 @@
|
||||
<if test="phone != null">
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
@ -221,6 +237,7 @@
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
address = #{address,jdbcType=VARCHAR},
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
|
Loading…
Reference in New Issue
Block a user