parent
a0a6696781
commit
02d6ac5a96
@ -0,0 +1,130 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnDeviceCompanyRel; |
||||||
|
import com.hfkj.entity.EnDeviceCompanyRelExample; |
||||||
|
import java.util.List; |
||||||
|
import org.apache.ibatis.annotations.Delete; |
||||||
|
import org.apache.ibatis.annotations.DeleteProvider; |
||||||
|
import org.apache.ibatis.annotations.Insert; |
||||||
|
import org.apache.ibatis.annotations.InsertProvider; |
||||||
|
import org.apache.ibatis.annotations.Options; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.apache.ibatis.annotations.Result; |
||||||
|
import org.apache.ibatis.annotations.Results; |
||||||
|
import org.apache.ibatis.annotations.Select; |
||||||
|
import org.apache.ibatis.annotations.SelectProvider; |
||||||
|
import org.apache.ibatis.annotations.Update; |
||||||
|
import org.apache.ibatis.annotations.UpdateProvider; |
||||||
|
import org.apache.ibatis.type.JdbcType; |
||||||
|
import org.springframework.stereotype.Repository; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成,请勿修改!!! |
||||||
|
* 如果需要扩展请在其父类进行扩展 |
||||||
|
* |
||||||
|
**/ |
||||||
|
@Repository |
||||||
|
public interface EnDeviceCompanyRelMapper extends EnDeviceCompanyRelMapperExt { |
||||||
|
@SelectProvider(type=EnDeviceCompanyRelSqlProvider.class, method="countByExample") |
||||||
|
long countByExample(EnDeviceCompanyRelExample example); |
||||||
|
|
||||||
|
@DeleteProvider(type=EnDeviceCompanyRelSqlProvider.class, method="deleteByExample") |
||||||
|
int deleteByExample(EnDeviceCompanyRelExample example); |
||||||
|
|
||||||
|
@Delete({ |
||||||
|
"delete from en_device_company_rel", |
||||||
|
"where id = #{id,jdbcType=INTEGER}" |
||||||
|
}) |
||||||
|
int deleteByPrimaryKey(Integer id); |
||||||
|
|
||||||
|
@Insert({ |
||||||
|
"insert into en_device_company_rel (device_id, company_id, ", |
||||||
|
"`status`, create_user, ", |
||||||
|
"create_user_name, create_time, ", |
||||||
|
"update_user, update_user_name, ", |
||||||
|
"update_time, ext_1, ", |
||||||
|
"ext_2, ext_3)", |
||||||
|
"values (#{deviceId,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, ", |
||||||
|
"#{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(EnDeviceCompanyRel record); |
||||||
|
|
||||||
|
@InsertProvider(type=EnDeviceCompanyRelSqlProvider.class, method="insertSelective") |
||||||
|
@Options(useGeneratedKeys=true,keyProperty="id") |
||||||
|
int insertSelective(EnDeviceCompanyRel record); |
||||||
|
|
||||||
|
@SelectProvider(type=EnDeviceCompanyRelSqlProvider.class, method="selectByExample") |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||||
|
@Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
List<EnDeviceCompanyRel> selectByExample(EnDeviceCompanyRelExample example); |
||||||
|
|
||||||
|
@Select({ |
||||||
|
"select", |
||||||
|
"id, device_id, company_id, `status`, create_user, create_user_name, create_time, ", |
||||||
|
"update_user, update_user_name, update_time, ext_1, ext_2, ext_3", |
||||||
|
"from en_device_company_rel", |
||||||
|
"where id = #{id,jdbcType=INTEGER}" |
||||||
|
}) |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||||
|
@Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
EnDeviceCompanyRel selectByPrimaryKey(Integer id); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnDeviceCompanyRelSqlProvider.class, method="updateByExampleSelective") |
||||||
|
int updateByExampleSelective(@Param("record") EnDeviceCompanyRel record, @Param("example") EnDeviceCompanyRelExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnDeviceCompanyRelSqlProvider.class, method="updateByExample") |
||||||
|
int updateByExample(@Param("record") EnDeviceCompanyRel record, @Param("example") EnDeviceCompanyRelExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnDeviceCompanyRelSqlProvider.class, method="updateByPrimaryKeySelective") |
||||||
|
int updateByPrimaryKeySelective(EnDeviceCompanyRel record); |
||||||
|
|
||||||
|
@Update({ |
||||||
|
"update en_device_company_rel", |
||||||
|
"set device_id = #{deviceId,jdbcType=BIGINT},", |
||||||
|
"company_id = #{companyId,jdbcType=BIGINT},", |
||||||
|
"`status` = #{status,jdbcType=INTEGER},", |
||||||
|
"create_user = #{createUser,jdbcType=BIGINT},", |
||||||
|
"create_user_name = #{createUserName,jdbcType=VARCHAR},", |
||||||
|
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||||
|
"update_user = #{updateUser,jdbcType=BIGINT},", |
||||||
|
"update_user_name = #{updateUserName,jdbcType=VARCHAR},", |
||||||
|
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||||
|
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||||
|
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||||
|
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||||
|
"where id = #{id,jdbcType=INTEGER}" |
||||||
|
}) |
||||||
|
int updateByPrimaryKey(EnDeviceCompanyRel record); |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
/** |
||||||
|
* mapper扩展类 |
||||||
|
*/ |
||||||
|
public interface EnDeviceCompanyRelMapperExt { |
||||||
|
} |
@ -0,0 +1,346 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnDeviceCompanyRel; |
||||||
|
import com.hfkj.entity.EnDeviceCompanyRelExample.Criteria; |
||||||
|
import com.hfkj.entity.EnDeviceCompanyRelExample.Criterion; |
||||||
|
import com.hfkj.entity.EnDeviceCompanyRelExample; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import org.apache.ibatis.jdbc.SQL; |
||||||
|
|
||||||
|
public class EnDeviceCompanyRelSqlProvider { |
||||||
|
|
||||||
|
public String countByExample(EnDeviceCompanyRelExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.SELECT("count(*)").FROM("en_device_company_rel"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String deleteByExample(EnDeviceCompanyRelExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.DELETE_FROM("en_device_company_rel"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String insertSelective(EnDeviceCompanyRel record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.INSERT_INTO("en_device_company_rel"); |
||||||
|
|
||||||
|
if (record.getDeviceId() != null) { |
||||||
|
sql.VALUES("device_id", "#{deviceId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCompanyId() != null) { |
||||||
|
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.VALUES("create_user", "#{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.VALUES("create_user_name", "#{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.VALUES("update_user", "#{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.VALUES("update_user_name", "#{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String selectByExample(EnDeviceCompanyRelExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
if (example != null && example.isDistinct()) { |
||||||
|
sql.SELECT_DISTINCT("id"); |
||||||
|
} else { |
||||||
|
sql.SELECT("id"); |
||||||
|
} |
||||||
|
sql.SELECT("device_id"); |
||||||
|
sql.SELECT("company_id"); |
||||||
|
sql.SELECT("`status`"); |
||||||
|
sql.SELECT("create_user"); |
||||||
|
sql.SELECT("create_user_name"); |
||||||
|
sql.SELECT("create_time"); |
||||||
|
sql.SELECT("update_user"); |
||||||
|
sql.SELECT("update_user_name"); |
||||||
|
sql.SELECT("update_time"); |
||||||
|
sql.SELECT("ext_1"); |
||||||
|
sql.SELECT("ext_2"); |
||||||
|
sql.SELECT("ext_3"); |
||||||
|
sql.FROM("en_device_company_rel"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
|
||||||
|
if (example != null && example.getOrderByClause() != null) { |
||||||
|
sql.ORDER_BY(example.getOrderByClause()); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||||
|
EnDeviceCompanyRel record = (EnDeviceCompanyRel) parameter.get("record"); |
||||||
|
EnDeviceCompanyRelExample example = (EnDeviceCompanyRelExample) parameter.get("example"); |
||||||
|
|
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_device_company_rel"); |
||||||
|
|
||||||
|
if (record.getId() != null) { |
||||||
|
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getDeviceId() != null) { |
||||||
|
sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCompanyId() != null) { |
||||||
|
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExample(Map<String, Object> parameter) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_device_company_rel"); |
||||||
|
|
||||||
|
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||||
|
sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); |
||||||
|
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
|
||||||
|
EnDeviceCompanyRelExample example = (EnDeviceCompanyRelExample) parameter.get("example"); |
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByPrimaryKeySelective(EnDeviceCompanyRel record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_device_company_rel"); |
||||||
|
|
||||||
|
if (record.getDeviceId() != null) { |
||||||
|
sql.SET("device_id = #{deviceId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCompanyId() != null) { |
||||||
|
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
sql.WHERE("id = #{id,jdbcType=INTEGER}"); |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
protected void applyWhere(SQL sql, EnDeviceCompanyRelExample example, boolean includeExamplePhrase) { |
||||||
|
if (example == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
String parmPhrase1; |
||||||
|
String parmPhrase1_th; |
||||||
|
String parmPhrase2; |
||||||
|
String parmPhrase2_th; |
||||||
|
String parmPhrase3; |
||||||
|
String parmPhrase3_th; |
||||||
|
if (includeExamplePhrase) { |
||||||
|
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} else { |
||||||
|
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} |
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||||
|
boolean firstCriteria = true; |
||||||
|
for (int i = 0; i < oredCriteria.size(); i++) { |
||||||
|
Criteria criteria = oredCriteria.get(i); |
||||||
|
if (criteria.isValid()) { |
||||||
|
if (firstCriteria) { |
||||||
|
firstCriteria = false; |
||||||
|
} else { |
||||||
|
sb.append(" or "); |
||||||
|
} |
||||||
|
|
||||||
|
sb.append('('); |
||||||
|
List<Criterion> criterions = criteria.getAllCriteria(); |
||||||
|
boolean firstCriterion = true; |
||||||
|
for (int j = 0; j < criterions.size(); j++) { |
||||||
|
Criterion criterion = criterions.get(j); |
||||||
|
if (firstCriterion) { |
||||||
|
firstCriterion = false; |
||||||
|
} else { |
||||||
|
sb.append(" and "); |
||||||
|
} |
||||||
|
|
||||||
|
if (criterion.isNoValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
} else if (criterion.isSingleValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isBetweenValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isListValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
sb.append(" ("); |
||||||
|
List<?> listItems = (List<?>) criterion.getValue(); |
||||||
|
boolean comma = false; |
||||||
|
for (int k = 0; k < listItems.size(); k++) { |
||||||
|
if (comma) { |
||||||
|
sb.append(", "); |
||||||
|
} else { |
||||||
|
comma = true; |
||||||
|
} |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase3, i, j, k)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (sb.length() > 0) { |
||||||
|
sql.WHERE(sb.toString()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,130 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnSerCompanySgRel; |
||||||
|
import com.hfkj.entity.EnSerCompanySgRelExample; |
||||||
|
import java.util.List; |
||||||
|
import org.apache.ibatis.annotations.Delete; |
||||||
|
import org.apache.ibatis.annotations.DeleteProvider; |
||||||
|
import org.apache.ibatis.annotations.Insert; |
||||||
|
import org.apache.ibatis.annotations.InsertProvider; |
||||||
|
import org.apache.ibatis.annotations.Options; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.apache.ibatis.annotations.Result; |
||||||
|
import org.apache.ibatis.annotations.Results; |
||||||
|
import org.apache.ibatis.annotations.Select; |
||||||
|
import org.apache.ibatis.annotations.SelectProvider; |
||||||
|
import org.apache.ibatis.annotations.Update; |
||||||
|
import org.apache.ibatis.annotations.UpdateProvider; |
||||||
|
import org.apache.ibatis.type.JdbcType; |
||||||
|
import org.springframework.stereotype.Repository; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成,请勿修改!!! |
||||||
|
* 如果需要扩展请在其父类进行扩展 |
||||||
|
* |
||||||
|
**/ |
||||||
|
@Repository |
||||||
|
public interface EnSerCompanySgRelMapper extends EnSerCompanySgRelMapperExt { |
||||||
|
@SelectProvider(type=EnSerCompanySgRelSqlProvider.class, method="countByExample") |
||||||
|
long countByExample(EnSerCompanySgRelExample example); |
||||||
|
|
||||||
|
@DeleteProvider(type=EnSerCompanySgRelSqlProvider.class, method="deleteByExample") |
||||||
|
int deleteByExample(EnSerCompanySgRelExample example); |
||||||
|
|
||||||
|
@Delete({ |
||||||
|
"delete from en_ser_company_sg_rel", |
||||||
|
"where id = #{id,jdbcType=BIGINT}" |
||||||
|
}) |
||||||
|
int deleteByPrimaryKey(Long id); |
||||||
|
|
||||||
|
@Insert({ |
||||||
|
"insert into en_ser_company_sg_rel (company_id, segment_id, ", |
||||||
|
"`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}, #{segmentId,jdbcType=BIGINT}, ", |
||||||
|
"#{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(EnSerCompanySgRel record); |
||||||
|
|
||||||
|
@InsertProvider(type=EnSerCompanySgRelSqlProvider.class, method="insertSelective") |
||||||
|
@Options(useGeneratedKeys=true,keyProperty="id") |
||||||
|
int insertSelective(EnSerCompanySgRel record); |
||||||
|
|
||||||
|
@SelectProvider(type=EnSerCompanySgRelSqlProvider.class, method="selectByExample") |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||||
|
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="segment_id", property="segmentId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
List<EnSerCompanySgRel> selectByExample(EnSerCompanySgRelExample example); |
||||||
|
|
||||||
|
@Select({ |
||||||
|
"select", |
||||||
|
"id, company_id, segment_id, `status`, create_user, create_user_name, create_time, ", |
||||||
|
"update_user, update_user_name, update_time, ext_1, ext_2, ext_3", |
||||||
|
"from en_ser_company_sg_rel", |
||||||
|
"where id = #{id,jdbcType=BIGINT}" |
||||||
|
}) |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||||
|
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="segment_id", property="segmentId", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
EnSerCompanySgRel selectByPrimaryKey(Long id); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnSerCompanySgRelSqlProvider.class, method="updateByExampleSelective") |
||||||
|
int updateByExampleSelective(@Param("record") EnSerCompanySgRel record, @Param("example") EnSerCompanySgRelExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnSerCompanySgRelSqlProvider.class, method="updateByExample") |
||||||
|
int updateByExample(@Param("record") EnSerCompanySgRel record, @Param("example") EnSerCompanySgRelExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnSerCompanySgRelSqlProvider.class, method="updateByPrimaryKeySelective") |
||||||
|
int updateByPrimaryKeySelective(EnSerCompanySgRel record); |
||||||
|
|
||||||
|
@Update({ |
||||||
|
"update en_ser_company_sg_rel", |
||||||
|
"set company_id = #{companyId,jdbcType=BIGINT},", |
||||||
|
"segment_id = #{segmentId,jdbcType=BIGINT},", |
||||||
|
"`status` = #{status,jdbcType=INTEGER},", |
||||||
|
"create_user = #{createUser,jdbcType=BIGINT},", |
||||||
|
"create_user_name = #{createUserName,jdbcType=VARCHAR},", |
||||||
|
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||||
|
"update_user = #{updateUser,jdbcType=BIGINT},", |
||||||
|
"update_user_name = #{updateUserName,jdbcType=VARCHAR},", |
||||||
|
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||||
|
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||||
|
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||||
|
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||||
|
"where id = #{id,jdbcType=BIGINT}" |
||||||
|
}) |
||||||
|
int updateByPrimaryKey(EnSerCompanySgRel record); |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
/** |
||||||
|
* mapper扩展类 |
||||||
|
*/ |
||||||
|
public interface EnSerCompanySgRelMapperExt { |
||||||
|
} |
@ -0,0 +1,346 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnSerCompanySgRel; |
||||||
|
import com.hfkj.entity.EnSerCompanySgRelExample.Criteria; |
||||||
|
import com.hfkj.entity.EnSerCompanySgRelExample.Criterion; |
||||||
|
import com.hfkj.entity.EnSerCompanySgRelExample; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import org.apache.ibatis.jdbc.SQL; |
||||||
|
|
||||||
|
public class EnSerCompanySgRelSqlProvider { |
||||||
|
|
||||||
|
public String countByExample(EnSerCompanySgRelExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.SELECT("count(*)").FROM("en_ser_company_sg_rel"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String deleteByExample(EnSerCompanySgRelExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.DELETE_FROM("en_ser_company_sg_rel"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String insertSelective(EnSerCompanySgRel record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.INSERT_INTO("en_ser_company_sg_rel"); |
||||||
|
|
||||||
|
if (record.getCompanyId() != null) { |
||||||
|
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getSegmentId() != null) { |
||||||
|
sql.VALUES("segment_id", "#{segmentId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.VALUES("create_user", "#{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.VALUES("create_user_name", "#{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.VALUES("update_user", "#{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.VALUES("update_user_name", "#{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String selectByExample(EnSerCompanySgRelExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
if (example != null && example.isDistinct()) { |
||||||
|
sql.SELECT_DISTINCT("id"); |
||||||
|
} else { |
||||||
|
sql.SELECT("id"); |
||||||
|
} |
||||||
|
sql.SELECT("company_id"); |
||||||
|
sql.SELECT("segment_id"); |
||||||
|
sql.SELECT("`status`"); |
||||||
|
sql.SELECT("create_user"); |
||||||
|
sql.SELECT("create_user_name"); |
||||||
|
sql.SELECT("create_time"); |
||||||
|
sql.SELECT("update_user"); |
||||||
|
sql.SELECT("update_user_name"); |
||||||
|
sql.SELECT("update_time"); |
||||||
|
sql.SELECT("ext_1"); |
||||||
|
sql.SELECT("ext_2"); |
||||||
|
sql.SELECT("ext_3"); |
||||||
|
sql.FROM("en_ser_company_sg_rel"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
|
||||||
|
if (example != null && example.getOrderByClause() != null) { |
||||||
|
sql.ORDER_BY(example.getOrderByClause()); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||||
|
EnSerCompanySgRel record = (EnSerCompanySgRel) parameter.get("record"); |
||||||
|
EnSerCompanySgRelExample example = (EnSerCompanySgRelExample) parameter.get("example"); |
||||||
|
|
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_ser_company_sg_rel"); |
||||||
|
|
||||||
|
if (record.getId() != null) { |
||||||
|
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCompanyId() != null) { |
||||||
|
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getSegmentId() != null) { |
||||||
|
sql.SET("segment_id = #{record.segmentId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExample(Map<String, Object> parameter) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_ser_company_sg_rel"); |
||||||
|
|
||||||
|
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||||
|
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); |
||||||
|
sql.SET("segment_id = #{record.segmentId,jdbcType=BIGINT}"); |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
|
||||||
|
EnSerCompanySgRelExample example = (EnSerCompanySgRelExample) parameter.get("example"); |
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByPrimaryKeySelective(EnSerCompanySgRel record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_ser_company_sg_rel"); |
||||||
|
|
||||||
|
if (record.getCompanyId() != null) { |
||||||
|
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getSegmentId() != null) { |
||||||
|
sql.SET("segment_id = #{segmentId,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
protected void applyWhere(SQL sql, EnSerCompanySgRelExample example, boolean includeExamplePhrase) { |
||||||
|
if (example == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
String parmPhrase1; |
||||||
|
String parmPhrase1_th; |
||||||
|
String parmPhrase2; |
||||||
|
String parmPhrase2_th; |
||||||
|
String parmPhrase3; |
||||||
|
String parmPhrase3_th; |
||||||
|
if (includeExamplePhrase) { |
||||||
|
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} else { |
||||||
|
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} |
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||||
|
boolean firstCriteria = true; |
||||||
|
for (int i = 0; i < oredCriteria.size(); i++) { |
||||||
|
Criteria criteria = oredCriteria.get(i); |
||||||
|
if (criteria.isValid()) { |
||||||
|
if (firstCriteria) { |
||||||
|
firstCriteria = false; |
||||||
|
} else { |
||||||
|
sb.append(" or "); |
||||||
|
} |
||||||
|
|
||||||
|
sb.append('('); |
||||||
|
List<Criterion> criterions = criteria.getAllCriteria(); |
||||||
|
boolean firstCriterion = true; |
||||||
|
for (int j = 0; j < criterions.size(); j++) { |
||||||
|
Criterion criterion = criterions.get(j); |
||||||
|
if (firstCriterion) { |
||||||
|
firstCriterion = false; |
||||||
|
} else { |
||||||
|
sb.append(" and "); |
||||||
|
} |
||||||
|
|
||||||
|
if (criterion.isNoValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
} else if (criterion.isSingleValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isBetweenValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isListValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
sb.append(" ("); |
||||||
|
List<?> listItems = (List<?>) criterion.getValue(); |
||||||
|
boolean comma = false; |
||||||
|
for (int k = 0; k < listItems.size(); k++) { |
||||||
|
if (comma) { |
||||||
|
sb.append(", "); |
||||||
|
} else { |
||||||
|
comma = true; |
||||||
|
} |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase3, i, j, k)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (sb.length() > 0) { |
||||||
|
sql.WHERE(sb.toString()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,133 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnServiceCompanyDevice; |
||||||
|
import com.hfkj.entity.EnServiceCompanyDeviceExample; |
||||||
|
import java.util.List; |
||||||
|
import org.apache.ibatis.annotations.Delete; |
||||||
|
import org.apache.ibatis.annotations.DeleteProvider; |
||||||
|
import org.apache.ibatis.annotations.Insert; |
||||||
|
import org.apache.ibatis.annotations.InsertProvider; |
||||||
|
import org.apache.ibatis.annotations.Options; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.apache.ibatis.annotations.Result; |
||||||
|
import org.apache.ibatis.annotations.Results; |
||||||
|
import org.apache.ibatis.annotations.Select; |
||||||
|
import org.apache.ibatis.annotations.SelectProvider; |
||||||
|
import org.apache.ibatis.annotations.Update; |
||||||
|
import org.apache.ibatis.annotations.UpdateProvider; |
||||||
|
import org.apache.ibatis.type.JdbcType; |
||||||
|
import org.springframework.stereotype.Repository; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成,请勿修改!!! |
||||||
|
* 如果需要扩展请在其父类进行扩展 |
||||||
|
* |
||||||
|
**/ |
||||||
|
@Repository |
||||||
|
public interface EnServiceCompanyDeviceMapper extends EnServiceCompanyDeviceMapperExt { |
||||||
|
@SelectProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="countByExample") |
||||||
|
long countByExample(EnServiceCompanyDeviceExample example); |
||||||
|
|
||||||
|
@DeleteProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="deleteByExample") |
||||||
|
int deleteByExample(EnServiceCompanyDeviceExample example); |
||||||
|
|
||||||
|
@Delete({ |
||||||
|
"delete from en_service_company_device", |
||||||
|
"where id = #{id,jdbcType=INTEGER}" |
||||||
|
}) |
||||||
|
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})" |
||||||
|
}) |
||||||
|
@Options(useGeneratedKeys=true,keyProperty="id") |
||||||
|
int insert(EnServiceCompanyDevice record); |
||||||
|
|
||||||
|
@InsertProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="insertSelective") |
||||||
|
@Options(useGeneratedKeys=true,keyProperty="id") |
||||||
|
int insertSelective(EnServiceCompanyDevice record); |
||||||
|
|
||||||
|
@SelectProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="selectByExample") |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||||
|
@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), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
List<EnServiceCompanyDevice> selectByExample(EnServiceCompanyDeviceExample example); |
||||||
|
|
||||||
|
@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", |
||||||
|
"from en_service_company_device", |
||||||
|
"where id = #{id,jdbcType=INTEGER}" |
||||||
|
}) |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), |
||||||
|
@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), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
EnServiceCompanyDevice selectByPrimaryKey(Integer id); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="updateByExampleSelective") |
||||||
|
int updateByExampleSelective(@Param("record") EnServiceCompanyDevice record, @Param("example") EnServiceCompanyDeviceExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="updateByExample") |
||||||
|
int updateByExample(@Param("record") EnServiceCompanyDevice record, @Param("example") EnServiceCompanyDeviceExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnServiceCompanyDeviceSqlProvider.class, method="updateByPrimaryKeySelective") |
||||||
|
int updateByPrimaryKeySelective(EnServiceCompanyDevice record); |
||||||
|
|
||||||
|
@Update({ |
||||||
|
"update en_service_company_device", |
||||||
|
"set device_no = #{deviceNo,jdbcType=VARCHAR},", |
||||||
|
"device_type = #{deviceType,jdbcType=INTEGER},", |
||||||
|
"credentials_img = #{credentialsImg,jdbcType=VARCHAR},", |
||||||
|
"`status` = #{status,jdbcType=INTEGER},", |
||||||
|
"create_user = #{createUser,jdbcType=BIGINT},", |
||||||
|
"create_user_name = #{createUserName,jdbcType=VARCHAR},", |
||||||
|
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||||
|
"update_user = #{updateUser,jdbcType=BIGINT},", |
||||||
|
"update_user_name = #{updateUserName,jdbcType=VARCHAR},", |
||||||
|
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||||
|
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||||
|
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||||
|
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||||
|
"where id = #{id,jdbcType=INTEGER}" |
||||||
|
}) |
||||||
|
int updateByPrimaryKey(EnServiceCompanyDevice record); |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
/** |
||||||
|
* mapper扩展类 |
||||||
|
*/ |
||||||
|
public interface EnServiceCompanyDeviceMapperExt { |
||||||
|
} |
@ -0,0 +1,360 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnServiceCompanyDevice; |
||||||
|
import com.hfkj.entity.EnServiceCompanyDeviceExample.Criteria; |
||||||
|
import com.hfkj.entity.EnServiceCompanyDeviceExample.Criterion; |
||||||
|
import com.hfkj.entity.EnServiceCompanyDeviceExample; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import org.apache.ibatis.jdbc.SQL; |
||||||
|
|
||||||
|
public class EnServiceCompanyDeviceSqlProvider { |
||||||
|
|
||||||
|
public String countByExample(EnServiceCompanyDeviceExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.SELECT("count(*)").FROM("en_service_company_device"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String deleteByExample(EnServiceCompanyDeviceExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.DELETE_FROM("en_service_company_device"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String insertSelective(EnServiceCompanyDevice record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.INSERT_INTO("en_service_company_device"); |
||||||
|
|
||||||
|
if (record.getDeviceNo() != null) { |
||||||
|
sql.VALUES("device_no", "#{deviceNo,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getDeviceType() != null) { |
||||||
|
sql.VALUES("device_type", "#{deviceType,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCredentialsImg() != null) { |
||||||
|
sql.VALUES("credentials_img", "#{credentialsImg,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.VALUES("create_user", "#{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.VALUES("create_user_name", "#{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.VALUES("update_user", "#{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.VALUES("update_user_name", "#{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String selectByExample(EnServiceCompanyDeviceExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
if (example != null && example.isDistinct()) { |
||||||
|
sql.SELECT_DISTINCT("id"); |
||||||
|
} else { |
||||||
|
sql.SELECT("id"); |
||||||
|
} |
||||||
|
sql.SELECT("device_no"); |
||||||
|
sql.SELECT("device_type"); |
||||||
|
sql.SELECT("credentials_img"); |
||||||
|
sql.SELECT("`status`"); |
||||||
|
sql.SELECT("create_user"); |
||||||
|
sql.SELECT("create_user_name"); |
||||||
|
sql.SELECT("create_time"); |
||||||
|
sql.SELECT("update_user"); |
||||||
|
sql.SELECT("update_user_name"); |
||||||
|
sql.SELECT("update_time"); |
||||||
|
sql.SELECT("ext_1"); |
||||||
|
sql.SELECT("ext_2"); |
||||||
|
sql.SELECT("ext_3"); |
||||||
|
sql.FROM("en_service_company_device"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
|
||||||
|
if (example != null && example.getOrderByClause() != null) { |
||||||
|
sql.ORDER_BY(example.getOrderByClause()); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||||
|
EnServiceCompanyDevice record = (EnServiceCompanyDevice) parameter.get("record"); |
||||||
|
EnServiceCompanyDeviceExample example = (EnServiceCompanyDeviceExample) parameter.get("example"); |
||||||
|
|
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_service_company_device"); |
||||||
|
|
||||||
|
if (record.getId() != null) { |
||||||
|
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getDeviceNo() != null) { |
||||||
|
sql.SET("device_no = #{record.deviceNo,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getDeviceType() != null) { |
||||||
|
sql.SET("device_type = #{record.deviceType,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCredentialsImg() != null) { |
||||||
|
sql.SET("credentials_img = #{record.credentialsImg,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExample(Map<String, Object> parameter) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_service_company_device"); |
||||||
|
|
||||||
|
sql.SET("id = #{record.id,jdbcType=INTEGER}"); |
||||||
|
sql.SET("device_no = #{record.deviceNo,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("device_type = #{record.deviceType,jdbcType=INTEGER}"); |
||||||
|
sql.SET("credentials_img = #{record.credentialsImg,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
|
||||||
|
EnServiceCompanyDeviceExample example = (EnServiceCompanyDeviceExample) parameter.get("example"); |
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByPrimaryKeySelective(EnServiceCompanyDevice record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_service_company_device"); |
||||||
|
|
||||||
|
if (record.getDeviceNo() != null) { |
||||||
|
sql.SET("device_no = #{deviceNo,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getDeviceType() != null) { |
||||||
|
sql.SET("device_type = #{deviceType,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCredentialsImg() != null) { |
||||||
|
sql.SET("credentials_img = #{credentialsImg,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
sql.WHERE("id = #{id,jdbcType=INTEGER}"); |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
protected void applyWhere(SQL sql, EnServiceCompanyDeviceExample example, boolean includeExamplePhrase) { |
||||||
|
if (example == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
String parmPhrase1; |
||||||
|
String parmPhrase1_th; |
||||||
|
String parmPhrase2; |
||||||
|
String parmPhrase2_th; |
||||||
|
String parmPhrase3; |
||||||
|
String parmPhrase3_th; |
||||||
|
if (includeExamplePhrase) { |
||||||
|
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} else { |
||||||
|
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} |
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||||
|
boolean firstCriteria = true; |
||||||
|
for (int i = 0; i < oredCriteria.size(); i++) { |
||||||
|
Criteria criteria = oredCriteria.get(i); |
||||||
|
if (criteria.isValid()) { |
||||||
|
if (firstCriteria) { |
||||||
|
firstCriteria = false; |
||||||
|
} else { |
||||||
|
sb.append(" or "); |
||||||
|
} |
||||||
|
|
||||||
|
sb.append('('); |
||||||
|
List<Criterion> criterions = criteria.getAllCriteria(); |
||||||
|
boolean firstCriterion = true; |
||||||
|
for (int j = 0; j < criterions.size(); j++) { |
||||||
|
Criterion criterion = criterions.get(j); |
||||||
|
if (firstCriterion) { |
||||||
|
firstCriterion = false; |
||||||
|
} else { |
||||||
|
sb.append(" and "); |
||||||
|
} |
||||||
|
|
||||||
|
if (criterion.isNoValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
} else if (criterion.isSingleValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isBetweenValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isListValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
sb.append(" ("); |
||||||
|
List<?> listItems = (List<?>) criterion.getValue(); |
||||||
|
boolean comma = false; |
||||||
|
for (int k = 0; k < listItems.size(); k++) { |
||||||
|
if (comma) { |
||||||
|
sb.append(", "); |
||||||
|
} else { |
||||||
|
comma = true; |
||||||
|
} |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase3, i, j, k)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (sb.length() > 0) { |
||||||
|
sql.WHERE(sb.toString()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,125 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnServiceCompany; |
||||||
|
import com.hfkj.entity.EnServiceCompanyExample; |
||||||
|
import java.util.List; |
||||||
|
import org.apache.ibatis.annotations.Delete; |
||||||
|
import org.apache.ibatis.annotations.DeleteProvider; |
||||||
|
import org.apache.ibatis.annotations.Insert; |
||||||
|
import org.apache.ibatis.annotations.InsertProvider; |
||||||
|
import org.apache.ibatis.annotations.Options; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.apache.ibatis.annotations.Result; |
||||||
|
import org.apache.ibatis.annotations.Results; |
||||||
|
import org.apache.ibatis.annotations.Select; |
||||||
|
import org.apache.ibatis.annotations.SelectProvider; |
||||||
|
import org.apache.ibatis.annotations.Update; |
||||||
|
import org.apache.ibatis.annotations.UpdateProvider; |
||||||
|
import org.apache.ibatis.type.JdbcType; |
||||||
|
import org.springframework.stereotype.Repository; |
||||||
|
|
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成,请勿修改!!! |
||||||
|
* 如果需要扩展请在其父类进行扩展 |
||||||
|
* |
||||||
|
**/ |
||||||
|
@Repository |
||||||
|
public interface EnServiceCompanyMapper extends EnServiceCompanyMapperExt { |
||||||
|
@SelectProvider(type=EnServiceCompanySqlProvider.class, method="countByExample") |
||||||
|
long countByExample(EnServiceCompanyExample example); |
||||||
|
|
||||||
|
@DeleteProvider(type=EnServiceCompanySqlProvider.class, method="deleteByExample") |
||||||
|
int deleteByExample(EnServiceCompanyExample example); |
||||||
|
|
||||||
|
@Delete({ |
||||||
|
"delete from en_service_company", |
||||||
|
"where id = #{id,jdbcType=BIGINT}" |
||||||
|
}) |
||||||
|
int deleteByPrimaryKey(Long id); |
||||||
|
|
||||||
|
@Insert({ |
||||||
|
"insert into en_service_company (`name`, `status`, ", |
||||||
|
"create_user, create_user_name, ", |
||||||
|
"create_time, update_user, ", |
||||||
|
"update_user_name, update_time, ", |
||||||
|
"ext_1, ext_2, ext_3)", |
||||||
|
"values (#{name,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(EnServiceCompany record); |
||||||
|
|
||||||
|
@InsertProvider(type=EnServiceCompanySqlProvider.class, method="insertSelective") |
||||||
|
@Options(useGeneratedKeys=true,keyProperty="id") |
||||||
|
int insertSelective(EnServiceCompany record); |
||||||
|
|
||||||
|
@SelectProvider(type=EnServiceCompanySqlProvider.class, method="selectByExample") |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||||
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
List<EnServiceCompany> selectByExample(EnServiceCompanyExample example); |
||||||
|
|
||||||
|
@Select({ |
||||||
|
"select", |
||||||
|
"id, `name`, `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", |
||||||
|
"where id = #{id,jdbcType=BIGINT}" |
||||||
|
}) |
||||||
|
@Results({ |
||||||
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||||
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||||
|
@Result(column="create_user", property="createUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="update_user", property="updateUser", jdbcType=JdbcType.BIGINT), |
||||||
|
@Result(column="update_user_name", property="updateUserName", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||||
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||||
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||||
|
}) |
||||||
|
EnServiceCompany selectByPrimaryKey(Long id); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnServiceCompanySqlProvider.class, method="updateByExampleSelective") |
||||||
|
int updateByExampleSelective(@Param("record") EnServiceCompany record, @Param("example") EnServiceCompanyExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnServiceCompanySqlProvider.class, method="updateByExample") |
||||||
|
int updateByExample(@Param("record") EnServiceCompany record, @Param("example") EnServiceCompanyExample example); |
||||||
|
|
||||||
|
@UpdateProvider(type=EnServiceCompanySqlProvider.class, method="updateByPrimaryKeySelective") |
||||||
|
int updateByPrimaryKeySelective(EnServiceCompany record); |
||||||
|
|
||||||
|
@Update({ |
||||||
|
"update en_service_company", |
||||||
|
"set `name` = #{name,jdbcType=VARCHAR},", |
||||||
|
"`status` = #{status,jdbcType=INTEGER},", |
||||||
|
"create_user = #{createUser,jdbcType=BIGINT},", |
||||||
|
"create_user_name = #{createUserName,jdbcType=VARCHAR},", |
||||||
|
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||||
|
"update_user = #{updateUser,jdbcType=BIGINT},", |
||||||
|
"update_user_name = #{updateUserName,jdbcType=VARCHAR},", |
||||||
|
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||||
|
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||||
|
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||||
|
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||||
|
"where id = #{id,jdbcType=BIGINT}" |
||||||
|
}) |
||||||
|
int updateByPrimaryKey(EnServiceCompany record); |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
/** |
||||||
|
* mapper扩展类 |
||||||
|
*/ |
||||||
|
public interface EnServiceCompanyMapperExt { |
||||||
|
} |
@ -0,0 +1,332 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
import com.hfkj.entity.EnServiceCompany; |
||||||
|
import com.hfkj.entity.EnServiceCompanyExample.Criteria; |
||||||
|
import com.hfkj.entity.EnServiceCompanyExample.Criterion; |
||||||
|
import com.hfkj.entity.EnServiceCompanyExample; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
import org.apache.ibatis.jdbc.SQL; |
||||||
|
|
||||||
|
public class EnServiceCompanySqlProvider { |
||||||
|
|
||||||
|
public String countByExample(EnServiceCompanyExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.SELECT("count(*)").FROM("en_service_company"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String deleteByExample(EnServiceCompanyExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.DELETE_FROM("en_service_company"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String insertSelective(EnServiceCompany record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.INSERT_INTO("en_service_company"); |
||||||
|
|
||||||
|
if (record.getName() != null) { |
||||||
|
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.VALUES("create_user", "#{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.VALUES("create_user_name", "#{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.VALUES("update_user", "#{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.VALUES("update_user_name", "#{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String selectByExample(EnServiceCompanyExample example) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
if (example != null && example.isDistinct()) { |
||||||
|
sql.SELECT_DISTINCT("id"); |
||||||
|
} else { |
||||||
|
sql.SELECT("id"); |
||||||
|
} |
||||||
|
sql.SELECT("`name`"); |
||||||
|
sql.SELECT("`status`"); |
||||||
|
sql.SELECT("create_user"); |
||||||
|
sql.SELECT("create_user_name"); |
||||||
|
sql.SELECT("create_time"); |
||||||
|
sql.SELECT("update_user"); |
||||||
|
sql.SELECT("update_user_name"); |
||||||
|
sql.SELECT("update_time"); |
||||||
|
sql.SELECT("ext_1"); |
||||||
|
sql.SELECT("ext_2"); |
||||||
|
sql.SELECT("ext_3"); |
||||||
|
sql.FROM("en_service_company"); |
||||||
|
applyWhere(sql, example, false); |
||||||
|
|
||||||
|
if (example != null && example.getOrderByClause() != null) { |
||||||
|
sql.ORDER_BY(example.getOrderByClause()); |
||||||
|
} |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||||
|
EnServiceCompany record = (EnServiceCompany) parameter.get("record"); |
||||||
|
EnServiceCompanyExample example = (EnServiceCompanyExample) parameter.get("example"); |
||||||
|
|
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_service_company"); |
||||||
|
|
||||||
|
if (record.getId() != null) { |
||||||
|
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getName() != null) { |
||||||
|
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByExample(Map<String, Object> parameter) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_service_company"); |
||||||
|
|
||||||
|
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||||
|
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||||
|
sql.SET("create_user = #{record.createUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("update_user = #{record.updateUser,jdbcType=BIGINT}"); |
||||||
|
sql.SET("update_user_name = #{record.updateUserName,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||||
|
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||||
|
|
||||||
|
EnServiceCompanyExample example = (EnServiceCompanyExample) parameter.get("example"); |
||||||
|
applyWhere(sql, example, true); |
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
public String updateByPrimaryKeySelective(EnServiceCompany record) { |
||||||
|
SQL sql = new SQL(); |
||||||
|
sql.UPDATE("en_service_company"); |
||||||
|
|
||||||
|
if (record.getName() != null) { |
||||||
|
sql.SET("`name` = #{name,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getStatus() != null) { |
||||||
|
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUser() != null) { |
||||||
|
sql.SET("create_user = #{createUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateUserName() != null) { |
||||||
|
sql.SET("create_user_name = #{createUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getCreateTime() != null) { |
||||||
|
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUser() != null) { |
||||||
|
sql.SET("update_user = #{updateUser,jdbcType=BIGINT}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateUserName() != null) { |
||||||
|
sql.SET("update_user_name = #{updateUserName,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getUpdateTime() != null) { |
||||||
|
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt1() != null) { |
||||||
|
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt2() != null) { |
||||||
|
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
if (record.getExt3() != null) { |
||||||
|
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||||
|
} |
||||||
|
|
||||||
|
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||||
|
|
||||||
|
return sql.toString(); |
||||||
|
} |
||||||
|
|
||||||
|
protected void applyWhere(SQL sql, EnServiceCompanyExample example, boolean includeExamplePhrase) { |
||||||
|
if (example == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
String parmPhrase1; |
||||||
|
String parmPhrase1_th; |
||||||
|
String parmPhrase2; |
||||||
|
String parmPhrase2_th; |
||||||
|
String parmPhrase3; |
||||||
|
String parmPhrase3_th; |
||||||
|
if (includeExamplePhrase) { |
||||||
|
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} else { |
||||||
|
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||||
|
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||||
|
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||||
|
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||||
|
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||||
|
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||||
|
} |
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||||
|
boolean firstCriteria = true; |
||||||
|
for (int i = 0; i < oredCriteria.size(); i++) { |
||||||
|
Criteria criteria = oredCriteria.get(i); |
||||||
|
if (criteria.isValid()) { |
||||||
|
if (firstCriteria) { |
||||||
|
firstCriteria = false; |
||||||
|
} else { |
||||||
|
sb.append(" or "); |
||||||
|
} |
||||||
|
|
||||||
|
sb.append('('); |
||||||
|
List<Criterion> criterions = criteria.getAllCriteria(); |
||||||
|
boolean firstCriterion = true; |
||||||
|
for (int j = 0; j < criterions.size(); j++) { |
||||||
|
Criterion criterion = criterions.get(j); |
||||||
|
if (firstCriterion) { |
||||||
|
firstCriterion = false; |
||||||
|
} else { |
||||||
|
sb.append(" and "); |
||||||
|
} |
||||||
|
|
||||||
|
if (criterion.isNoValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
} else if (criterion.isSingleValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isBetweenValue()) { |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} else if (criterion.isListValue()) { |
||||||
|
sb.append(criterion.getCondition()); |
||||||
|
sb.append(" ("); |
||||||
|
List<?> listItems = (List<?>) criterion.getValue(); |
||||||
|
boolean comma = false; |
||||||
|
for (int k = 0; k < listItems.size(); k++) { |
||||||
|
if (comma) { |
||||||
|
sb.append(", "); |
||||||
|
} else { |
||||||
|
comma = true; |
||||||
|
} |
||||||
|
if (criterion.getTypeHandler() == null) { |
||||||
|
sb.append(String.format(parmPhrase3, i, j, k)); |
||||||
|
} else { |
||||||
|
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
sb.append(')'); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (sb.length() > 0) { |
||||||
|
sql.WHERE(sb.toString()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,257 @@ |
|||||||
|
package com.hfkj.entity; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* en_device_company_rel |
||||||
|
* @author |
||||||
|
*/ |
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成 |
||||||
|
* |
||||||
|
**/ |
||||||
|
public class EnDeviceCompanyRel implements Serializable { |
||||||
|
/** |
||||||
|
* 主键 |
||||||
|
*/ |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备ID |
||||||
|
*/ |
||||||
|
private Long deviceId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 公司ID |
||||||
|
*/ |
||||||
|
private Long companyId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态 |
||||||
|
*/ |
||||||
|
private Integer status; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
private Long createUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人名称 |
||||||
|
*/ |
||||||
|
private String createUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建时间 |
||||||
|
*/ |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人 |
||||||
|
*/ |
||||||
|
private Long updateUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人名称 |
||||||
|
*/ |
||||||
|
private String updateUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新时间 |
||||||
|
*/ |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_1 |
||||||
|
*/ |
||||||
|
private String ext1; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_2 |
||||||
|
*/ |
||||||
|
private String ext2; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_3 |
||||||
|
*/ |
||||||
|
private String ext3; |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
public Integer getId() { |
||||||
|
return id; |
||||||
|
} |
||||||
|
|
||||||
|
public void setId(Integer id) { |
||||||
|
this.id = id; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getDeviceId() { |
||||||
|
return deviceId; |
||||||
|
} |
||||||
|
|
||||||
|
public void setDeviceId(Long deviceId) { |
||||||
|
this.deviceId = deviceId; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getCompanyId() { |
||||||
|
return companyId; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCompanyId(Long companyId) { |
||||||
|
this.companyId = companyId; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getStatus() { |
||||||
|
return status; |
||||||
|
} |
||||||
|
|
||||||
|
public void setStatus(Integer status) { |
||||||
|
this.status = status; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getCreateUser() { |
||||||
|
return createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUser(Long createUser) { |
||||||
|
this.createUser = createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getCreateUserName() { |
||||||
|
return createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUserName(String createUserName) { |
||||||
|
this.createUserName = createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getCreateTime() { |
||||||
|
return createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) { |
||||||
|
this.createTime = createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getUpdateUser() { |
||||||
|
return updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUser(Long updateUser) { |
||||||
|
this.updateUser = updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getUpdateUserName() { |
||||||
|
return updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUserName(String updateUserName) { |
||||||
|
this.updateUserName = updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getUpdateTime() { |
||||||
|
return updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) { |
||||||
|
this.updateTime = updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt1() { |
||||||
|
return ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt1(String ext1) { |
||||||
|
this.ext1 = ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt2() { |
||||||
|
return ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt2(String ext2) { |
||||||
|
this.ext2 = ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt3() { |
||||||
|
return ext3; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt3(String ext3) { |
||||||
|
this.ext3 = ext3; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean equals(Object that) { |
||||||
|
if (this == that) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
if (that == null) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
if (getClass() != that.getClass()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
EnDeviceCompanyRel other = (EnDeviceCompanyRel) that; |
||||||
|
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||||
|
&& (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId())) |
||||||
|
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) |
||||||
|
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||||
|
&& (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser())) |
||||||
|
&& (this.getCreateUserName() == null ? other.getCreateUserName() == null : this.getCreateUserName().equals(other.getCreateUserName())) |
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||||
|
&& (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser())) |
||||||
|
&& (this.getUpdateUserName() == null ? other.getUpdateUserName() == null : this.getUpdateUserName().equals(other.getUpdateUserName())) |
||||||
|
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||||
|
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||||
|
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||||
|
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int hashCode() { |
||||||
|
final int prime = 31; |
||||||
|
int result = 1; |
||||||
|
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||||
|
result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode()); |
||||||
|
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); |
||||||
|
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||||
|
result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode()); |
||||||
|
result = prime * result + ((getCreateUserName() == null) ? 0 : getCreateUserName().hashCode()); |
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUserName() == null) ? 0 : getUpdateUserName().hashCode()); |
||||||
|
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||||
|
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||||
|
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||||
|
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||||
|
return result; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
sb.append(getClass().getSimpleName()); |
||||||
|
sb.append(" ["); |
||||||
|
sb.append("Hash = ").append(hashCode()); |
||||||
|
sb.append(", id=").append(id); |
||||||
|
sb.append(", deviceId=").append(deviceId); |
||||||
|
sb.append(", companyId=").append(companyId); |
||||||
|
sb.append(", status=").append(status); |
||||||
|
sb.append(", createUser=").append(createUser); |
||||||
|
sb.append(", createUserName=").append(createUserName); |
||||||
|
sb.append(", createTime=").append(createTime); |
||||||
|
sb.append(", updateUser=").append(updateUser); |
||||||
|
sb.append(", updateUserName=").append(updateUserName); |
||||||
|
sb.append(", updateTime=").append(updateTime); |
||||||
|
sb.append(", ext1=").append(ext1); |
||||||
|
sb.append(", ext2=").append(ext2); |
||||||
|
sb.append(", ext3=").append(ext3); |
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||||
|
sb.append("]"); |
||||||
|
return sb.toString(); |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,257 @@ |
|||||||
|
package com.hfkj.entity; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* en_ser_company_sg_rel |
||||||
|
* @author |
||||||
|
*/ |
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成 |
||||||
|
* |
||||||
|
**/ |
||||||
|
public class EnSerCompanySgRel implements Serializable { |
||||||
|
/** |
||||||
|
* 主键 |
||||||
|
*/ |
||||||
|
private Long id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 公司ID |
||||||
|
*/ |
||||||
|
private Long companyId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 项目ID |
||||||
|
*/ |
||||||
|
private Long segmentId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态 |
||||||
|
*/ |
||||||
|
private Integer status; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
private Long createUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人名称 |
||||||
|
*/ |
||||||
|
private String createUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建时间 |
||||||
|
*/ |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人 |
||||||
|
*/ |
||||||
|
private Long updateUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人名称 |
||||||
|
*/ |
||||||
|
private String updateUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新时间 |
||||||
|
*/ |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_1 |
||||||
|
*/ |
||||||
|
private String ext1; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_2 |
||||||
|
*/ |
||||||
|
private String ext2; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_3 |
||||||
|
*/ |
||||||
|
private String ext3; |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
public Long getId() { |
||||||
|
return id; |
||||||
|
} |
||||||
|
|
||||||
|
public void setId(Long id) { |
||||||
|
this.id = id; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getCompanyId() { |
||||||
|
return companyId; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCompanyId(Long companyId) { |
||||||
|
this.companyId = companyId; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getSegmentId() { |
||||||
|
return segmentId; |
||||||
|
} |
||||||
|
|
||||||
|
public void setSegmentId(Long segmentId) { |
||||||
|
this.segmentId = segmentId; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getStatus() { |
||||||
|
return status; |
||||||
|
} |
||||||
|
|
||||||
|
public void setStatus(Integer status) { |
||||||
|
this.status = status; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getCreateUser() { |
||||||
|
return createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUser(Long createUser) { |
||||||
|
this.createUser = createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getCreateUserName() { |
||||||
|
return createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUserName(String createUserName) { |
||||||
|
this.createUserName = createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getCreateTime() { |
||||||
|
return createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) { |
||||||
|
this.createTime = createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getUpdateUser() { |
||||||
|
return updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUser(Long updateUser) { |
||||||
|
this.updateUser = updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getUpdateUserName() { |
||||||
|
return updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUserName(String updateUserName) { |
||||||
|
this.updateUserName = updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getUpdateTime() { |
||||||
|
return updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) { |
||||||
|
this.updateTime = updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt1() { |
||||||
|
return ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt1(String ext1) { |
||||||
|
this.ext1 = ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt2() { |
||||||
|
return ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt2(String ext2) { |
||||||
|
this.ext2 = ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt3() { |
||||||
|
return ext3; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt3(String ext3) { |
||||||
|
this.ext3 = ext3; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean equals(Object that) { |
||||||
|
if (this == that) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
if (that == null) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
if (getClass() != that.getClass()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
EnSerCompanySgRel other = (EnSerCompanySgRel) 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.getSegmentId() == null ? other.getSegmentId() == null : this.getSegmentId().equals(other.getSegmentId())) |
||||||
|
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||||
|
&& (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser())) |
||||||
|
&& (this.getCreateUserName() == null ? other.getCreateUserName() == null : this.getCreateUserName().equals(other.getCreateUserName())) |
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||||
|
&& (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser())) |
||||||
|
&& (this.getUpdateUserName() == null ? other.getUpdateUserName() == null : this.getUpdateUserName().equals(other.getUpdateUserName())) |
||||||
|
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||||
|
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||||
|
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||||
|
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int hashCode() { |
||||||
|
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 + ((getSegmentId() == null) ? 0 : getSegmentId().hashCode()); |
||||||
|
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||||
|
result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode()); |
||||||
|
result = prime * result + ((getCreateUserName() == null) ? 0 : getCreateUserName().hashCode()); |
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUserName() == null) ? 0 : getUpdateUserName().hashCode()); |
||||||
|
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||||
|
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||||
|
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||||
|
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||||
|
return result; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
sb.append(getClass().getSimpleName()); |
||||||
|
sb.append(" ["); |
||||||
|
sb.append("Hash = ").append(hashCode()); |
||||||
|
sb.append(", id=").append(id); |
||||||
|
sb.append(", companyId=").append(companyId); |
||||||
|
sb.append(", segmentId=").append(segmentId); |
||||||
|
sb.append(", status=").append(status); |
||||||
|
sb.append(", createUser=").append(createUser); |
||||||
|
sb.append(", createUserName=").append(createUserName); |
||||||
|
sb.append(", createTime=").append(createTime); |
||||||
|
sb.append(", updateUser=").append(updateUser); |
||||||
|
sb.append(", updateUserName=").append(updateUserName); |
||||||
|
sb.append(", updateTime=").append(updateTime); |
||||||
|
sb.append(", ext1=").append(ext1); |
||||||
|
sb.append(", ext2=").append(ext2); |
||||||
|
sb.append(", ext3=").append(ext3); |
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||||
|
sb.append("]"); |
||||||
|
return sb.toString(); |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,241 @@ |
|||||||
|
package com.hfkj.entity; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* en_service_company |
||||||
|
* @author |
||||||
|
*/ |
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成 |
||||||
|
* |
||||||
|
**/ |
||||||
|
public class EnServiceCompany implements Serializable { |
||||||
|
/** |
||||||
|
* 主键 |
||||||
|
*/ |
||||||
|
private Long id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 公司名称 |
||||||
|
*/ |
||||||
|
private String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态 1:正常 0 删除 |
||||||
|
*/ |
||||||
|
private Integer status; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
private Long createUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人名称 |
||||||
|
*/ |
||||||
|
private String createUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建时间 |
||||||
|
*/ |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人 |
||||||
|
*/ |
||||||
|
private Long updateUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人名称 |
||||||
|
*/ |
||||||
|
private String updateUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新时间 |
||||||
|
*/ |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_1 |
||||||
|
*/ |
||||||
|
private String ext1; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_2 |
||||||
|
*/ |
||||||
|
private String ext2; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_3 |
||||||
|
*/ |
||||||
|
private String ext3; |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
public Long getId() { |
||||||
|
return id; |
||||||
|
} |
||||||
|
|
||||||
|
public void setId(Long id) { |
||||||
|
this.id = id; |
||||||
|
} |
||||||
|
|
||||||
|
public String getName() { |
||||||
|
return name; |
||||||
|
} |
||||||
|
|
||||||
|
public void setName(String name) { |
||||||
|
this.name = name; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getStatus() { |
||||||
|
return status; |
||||||
|
} |
||||||
|
|
||||||
|
public void setStatus(Integer status) { |
||||||
|
this.status = status; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getCreateUser() { |
||||||
|
return createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUser(Long createUser) { |
||||||
|
this.createUser = createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getCreateUserName() { |
||||||
|
return createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUserName(String createUserName) { |
||||||
|
this.createUserName = createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getCreateTime() { |
||||||
|
return createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) { |
||||||
|
this.createTime = createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getUpdateUser() { |
||||||
|
return updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUser(Long updateUser) { |
||||||
|
this.updateUser = updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getUpdateUserName() { |
||||||
|
return updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUserName(String updateUserName) { |
||||||
|
this.updateUserName = updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getUpdateTime() { |
||||||
|
return updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) { |
||||||
|
this.updateTime = updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt1() { |
||||||
|
return ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt1(String ext1) { |
||||||
|
this.ext1 = ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt2() { |
||||||
|
return ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt2(String ext2) { |
||||||
|
this.ext2 = ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt3() { |
||||||
|
return ext3; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt3(String ext3) { |
||||||
|
this.ext3 = ext3; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean equals(Object that) { |
||||||
|
if (this == that) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
if (that == null) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
if (getClass() != that.getClass()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
EnServiceCompany other = (EnServiceCompany) that; |
||||||
|
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||||
|
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) |
||||||
|
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||||
|
&& (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser())) |
||||||
|
&& (this.getCreateUserName() == null ? other.getCreateUserName() == null : this.getCreateUserName().equals(other.getCreateUserName())) |
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||||
|
&& (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser())) |
||||||
|
&& (this.getUpdateUserName() == null ? other.getUpdateUserName() == null : this.getUpdateUserName().equals(other.getUpdateUserName())) |
||||||
|
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||||
|
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||||
|
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||||
|
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int hashCode() { |
||||||
|
final int prime = 31; |
||||||
|
int result = 1; |
||||||
|
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||||
|
result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); |
||||||
|
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||||
|
result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode()); |
||||||
|
result = prime * result + ((getCreateUserName() == null) ? 0 : getCreateUserName().hashCode()); |
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUserName() == null) ? 0 : getUpdateUserName().hashCode()); |
||||||
|
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||||
|
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||||
|
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||||
|
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||||
|
return result; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
sb.append(getClass().getSimpleName()); |
||||||
|
sb.append(" ["); |
||||||
|
sb.append("Hash = ").append(hashCode()); |
||||||
|
sb.append(", id=").append(id); |
||||||
|
sb.append(", name=").append(name); |
||||||
|
sb.append(", status=").append(status); |
||||||
|
sb.append(", createUser=").append(createUser); |
||||||
|
sb.append(", createUserName=").append(createUserName); |
||||||
|
sb.append(", createTime=").append(createTime); |
||||||
|
sb.append(", updateUser=").append(updateUser); |
||||||
|
sb.append(", updateUserName=").append(updateUserName); |
||||||
|
sb.append(", updateTime=").append(updateTime); |
||||||
|
sb.append(", ext1=").append(ext1); |
||||||
|
sb.append(", ext2=").append(ext2); |
||||||
|
sb.append(", ext3=").append(ext3); |
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||||
|
sb.append("]"); |
||||||
|
return sb.toString(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,273 @@ |
|||||||
|
package com.hfkj.entity; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* en_service_company_device |
||||||
|
* @author |
||||||
|
*/ |
||||||
|
/** |
||||||
|
* |
||||||
|
* 代码由工具生成 |
||||||
|
* |
||||||
|
**/ |
||||||
|
public class EnServiceCompanyDevice implements Serializable { |
||||||
|
/** |
||||||
|
* 主键 |
||||||
|
*/ |
||||||
|
private Integer id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备编号 |
||||||
|
*/ |
||||||
|
private String deviceNo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备类型:1车辆 2:其他 |
||||||
|
*/ |
||||||
|
private Integer deviceType; |
||||||
|
|
||||||
|
/** |
||||||
|
* 相关资质文件 |
||||||
|
*/ |
||||||
|
private String credentialsImg; |
||||||
|
|
||||||
|
/** |
||||||
|
* 状态1:正常 0 删除 |
||||||
|
*/ |
||||||
|
private Integer status; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
private Long createUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人名称 |
||||||
|
*/ |
||||||
|
private String createUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建时间 |
||||||
|
*/ |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人 |
||||||
|
*/ |
||||||
|
private Long updateUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人名称 |
||||||
|
*/ |
||||||
|
private String updateUserName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新时间 |
||||||
|
*/ |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_1 |
||||||
|
*/ |
||||||
|
private String ext1; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_2 |
||||||
|
*/ |
||||||
|
private String ext2; |
||||||
|
|
||||||
|
/** |
||||||
|
* ext_3 |
||||||
|
*/ |
||||||
|
private String ext3; |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
public Integer getId() { |
||||||
|
return id; |
||||||
|
} |
||||||
|
|
||||||
|
public void setId(Integer id) { |
||||||
|
this.id = id; |
||||||
|
} |
||||||
|
|
||||||
|
public String getDeviceNo() { |
||||||
|
return deviceNo; |
||||||
|
} |
||||||
|
|
||||||
|
public void setDeviceNo(String deviceNo) { |
||||||
|
this.deviceNo = deviceNo; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getDeviceType() { |
||||||
|
return deviceType; |
||||||
|
} |
||||||
|
|
||||||
|
public void setDeviceType(Integer deviceType) { |
||||||
|
this.deviceType = deviceType; |
||||||
|
} |
||||||
|
|
||||||
|
public String getCredentialsImg() { |
||||||
|
return credentialsImg; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCredentialsImg(String credentialsImg) { |
||||||
|
this.credentialsImg = credentialsImg; |
||||||
|
} |
||||||
|
|
||||||
|
public Integer getStatus() { |
||||||
|
return status; |
||||||
|
} |
||||||
|
|
||||||
|
public void setStatus(Integer status) { |
||||||
|
this.status = status; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getCreateUser() { |
||||||
|
return createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUser(Long createUser) { |
||||||
|
this.createUser = createUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getCreateUserName() { |
||||||
|
return createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateUserName(String createUserName) { |
||||||
|
this.createUserName = createUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getCreateTime() { |
||||||
|
return createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) { |
||||||
|
this.createTime = createTime; |
||||||
|
} |
||||||
|
|
||||||
|
public Long getUpdateUser() { |
||||||
|
return updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUser(Long updateUser) { |
||||||
|
this.updateUser = updateUser; |
||||||
|
} |
||||||
|
|
||||||
|
public String getUpdateUserName() { |
||||||
|
return updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateUserName(String updateUserName) { |
||||||
|
this.updateUserName = updateUserName; |
||||||
|
} |
||||||
|
|
||||||
|
public Date getUpdateTime() { |
||||||
|
return updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) { |
||||||
|
this.updateTime = updateTime; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt1() { |
||||||
|
return ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt1(String ext1) { |
||||||
|
this.ext1 = ext1; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt2() { |
||||||
|
return ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt2(String ext2) { |
||||||
|
this.ext2 = ext2; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExt3() { |
||||||
|
return ext3; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExt3(String ext3) { |
||||||
|
this.ext3 = ext3; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean equals(Object that) { |
||||||
|
if (this == that) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
if (that == null) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
if (getClass() != that.getClass()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
EnServiceCompanyDevice other = (EnServiceCompanyDevice) that; |
||||||
|
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||||
|
&& (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())) |
||||||
|
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||||
|
&& (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser())) |
||||||
|
&& (this.getCreateUserName() == null ? other.getCreateUserName() == null : this.getCreateUserName().equals(other.getCreateUserName())) |
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||||
|
&& (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser())) |
||||||
|
&& (this.getUpdateUserName() == null ? other.getUpdateUserName() == null : this.getUpdateUserName().equals(other.getUpdateUserName())) |
||||||
|
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||||
|
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||||
|
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||||
|
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int hashCode() { |
||||||
|
final int prime = 31; |
||||||
|
int result = 1; |
||||||
|
result = prime * result + ((getId() == null) ? 0 : getId().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()); |
||||||
|
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||||
|
result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode()); |
||||||
|
result = prime * result + ((getCreateUserName() == null) ? 0 : getCreateUserName().hashCode()); |
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode()); |
||||||
|
result = prime * result + ((getUpdateUserName() == null) ? 0 : getUpdateUserName().hashCode()); |
||||||
|
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||||
|
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||||
|
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||||
|
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||||
|
return result; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
StringBuilder sb = new StringBuilder(); |
||||||
|
sb.append(getClass().getSimpleName()); |
||||||
|
sb.append(" ["); |
||||||
|
sb.append("Hash = ").append(hashCode()); |
||||||
|
sb.append(", id=").append(id); |
||||||
|
sb.append(", deviceNo=").append(deviceNo); |
||||||
|
sb.append(", deviceType=").append(deviceType); |
||||||
|
sb.append(", credentialsImg=").append(credentialsImg); |
||||||
|
sb.append(", status=").append(status); |
||||||
|
sb.append(", createUser=").append(createUser); |
||||||
|
sb.append(", createUserName=").append(createUserName); |
||||||
|
sb.append(", createTime=").append(createTime); |
||||||
|
sb.append(", updateUser=").append(updateUser); |
||||||
|
sb.append(", updateUserName=").append(updateUserName); |
||||||
|
sb.append(", updateTime=").append(updateTime); |
||||||
|
sb.append(", ext1=").append(ext1); |
||||||
|
sb.append(", ext2=").append(ext2); |
||||||
|
sb.append(", ext3=").append(ext3); |
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||||
|
sb.append("]"); |
||||||
|
return sb.toString(); |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue