袁野 2 weeks ago
parent d23e69320c
commit 3037191b44
  1. 36
      service/src/main/java/com/hfkj/dao/EnServiceCompanyDeviceMapper.java
  2. 14
      service/src/main/java/com/hfkj/dao/EnServiceCompanyDeviceSqlProvider.java
  3. 16
      service/src/main/java/com/hfkj/entity/EnServiceCompanyDevice.java
  4. 60
      service/src/main/java/com/hfkj/entity/EnServiceCompanyDeviceExample.java

@ -39,18 +39,20 @@ public interface EnServiceCompanyDeviceMapper extends EnServiceCompanyDeviceMapp
int deleteByPrimaryKey(Integer id);
@Insert({
"insert into en_service_company_device (device_no, device_type, ",
"credentials_img, `status`, ",
"create_user, create_user_name, ",
"create_time, update_user, ",
"update_user_name, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{deviceNo,jdbcType=VARCHAR}, #{deviceType,jdbcType=INTEGER}, ",
"#{credentialsImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{createUser,jdbcType=BIGINT}, #{createUserName,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=BIGINT}, ",
"#{updateUserName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"insert into en_service_company_device (company_id, device_no, ",
"device_type, credentials_img, ",
"`status`, create_user, ",
"create_user_name, create_time, ",
"update_user, update_user_name, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{deviceNo,jdbcType=VARCHAR}, ",
"#{deviceType,jdbcType=INTEGER}, #{credentialsImg,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createUser,jdbcType=BIGINT}, ",
"#{createUserName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateUser,jdbcType=BIGINT}, #{updateUserName,jdbcType=VARCHAR}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(EnServiceCompanyDevice record);
@ -62,6 +64,7 @@ public interface EnServiceCompanyDeviceMapper extends EnServiceCompanyDeviceMapp
@SelectProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="device_no", property="deviceNo", jdbcType=JdbcType.VARCHAR),
@Result(column="device_type", property="deviceType", jdbcType=JdbcType.INTEGER),
@Result(column="credentials_img", property="credentialsImg", jdbcType=JdbcType.VARCHAR),
@ -80,13 +83,15 @@ public interface EnServiceCompanyDeviceMapper extends EnServiceCompanyDeviceMapp
@Select({
"select",
"id, device_no, device_type, credentials_img, `status`, create_user, create_user_name, ",
"create_time, update_user, update_user_name, update_time, ext_1, ext_2, ext_3",
"id, company_id, device_no, device_type, credentials_img, `status`, create_user, ",
"create_user_name, create_time, update_user, update_user_name, update_time, ext_1, ",
"ext_2, ext_3",
"from en_service_company_device",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="device_no", property="deviceNo", jdbcType=JdbcType.VARCHAR),
@Result(column="device_type", property="deviceType", jdbcType=JdbcType.INTEGER),
@Result(column="credentials_img", property="credentialsImg", jdbcType=JdbcType.VARCHAR),
@ -114,7 +119,8 @@ public interface EnServiceCompanyDeviceMapper extends EnServiceCompanyDeviceMapp
@Update({
"update en_service_company_device",
"set device_no = #{deviceNo,jdbcType=VARCHAR},",
"set company_id = #{companyId,jdbcType=BIGINT},",
"device_no = #{deviceNo,jdbcType=VARCHAR},",
"device_type = #{deviceType,jdbcType=INTEGER},",
"credentials_img = #{credentialsImg,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",

@ -28,6 +28,10 @@ public class EnServiceCompanyDeviceSqlProvider {
SQL sql = new SQL();
sql.INSERT_INTO("en_service_company_device");
if (record.getCompanyId() != null) {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
}
if (record.getDeviceNo() != null) {
sql.VALUES("device_no", "#{deviceNo,jdbcType=VARCHAR}");
}
@ -90,6 +94,7 @@ public class EnServiceCompanyDeviceSqlProvider {
} else {
sql.SELECT("id");
}
sql.SELECT("company_id");
sql.SELECT("device_no");
sql.SELECT("device_type");
sql.SELECT("credentials_img");
@ -124,6 +129,10 @@ public class EnServiceCompanyDeviceSqlProvider {
sql.SET("id = #{record.id,jdbcType=INTEGER}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
}
if (record.getDeviceNo() != null) {
sql.SET("device_no = #{record.deviceNo,jdbcType=VARCHAR}");
}
@ -185,6 +194,7 @@ public class EnServiceCompanyDeviceSqlProvider {
sql.UPDATE("en_service_company_device");
sql.SET("id = #{record.id,jdbcType=INTEGER}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("device_no = #{record.deviceNo,jdbcType=VARCHAR}");
sql.SET("device_type = #{record.deviceType,jdbcType=INTEGER}");
sql.SET("credentials_img = #{record.credentialsImg,jdbcType=VARCHAR}");
@ -208,6 +218,10 @@ public class EnServiceCompanyDeviceSqlProvider {
SQL sql = new SQL();
sql.UPDATE("en_service_company_device");
if (record.getCompanyId() != null) {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
}
if (record.getDeviceNo() != null) {
sql.SET("device_no = #{deviceNo,jdbcType=VARCHAR}");
}

@ -18,6 +18,11 @@ public class EnServiceCompanyDevice implements Serializable {
*/
private Integer id;
/**
* 公司Id
*/
private Long companyId;
/**
* 设备编号
*/
@ -93,6 +98,14 @@ public class EnServiceCompanyDevice implements Serializable {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getDeviceNo() {
return deviceNo;
}
@ -210,6 +223,7 @@ public class EnServiceCompanyDevice implements Serializable {
}
EnServiceCompanyDevice other = (EnServiceCompanyDevice) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getDeviceNo() == null ? other.getDeviceNo() == null : this.getDeviceNo().equals(other.getDeviceNo()))
&& (this.getDeviceType() == null ? other.getDeviceType() == null : this.getDeviceType().equals(other.getDeviceType()))
&& (this.getCredentialsImg() == null ? other.getCredentialsImg() == null : this.getCredentialsImg().equals(other.getCredentialsImg()))
@ -230,6 +244,7 @@ public class EnServiceCompanyDevice implements Serializable {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getDeviceNo() == null) ? 0 : getDeviceNo().hashCode());
result = prime * result + ((getDeviceType() == null) ? 0 : getDeviceType().hashCode());
result = prime * result + ((getCredentialsImg() == null) ? 0 : getCredentialsImg().hashCode());
@ -253,6 +268,7 @@ public class EnServiceCompanyDevice implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId);
sb.append(", deviceNo=").append(deviceNo);
sb.append(", deviceType=").append(deviceType);
sb.append(", credentialsImg=").append(credentialsImg);

@ -185,6 +185,66 @@ public class EnServiceCompanyDeviceExample {
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Long value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Long value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Long value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Long value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Long> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Long> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Long value1, Long value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andDeviceNoIsNull() {
addCriterion("device_no is null");
return (Criteria) this;

Loading…
Cancel
Save