提交代码

new-dev
胡锐 2 years ago
parent 4d233c11d6
commit dac0b455a0
  1. 18
      hai-service/src/main/java/com/hai/dao/HighGoodsTypeMapper.java
  2. 28
      hai-service/src/main/java/com/hai/dao/HighGoodsTypeSqlProvider.java
  3. 32
      hai-service/src/main/java/com/hai/entity/HighGoodsType.java
  4. 120
      hai-service/src/main/java/com/hai/entity/HighGoodsTypeExample.java

@ -39,12 +39,14 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt {
int deleteByPrimaryKey(Integer id);
@Insert({
"insert into high_goods_type (title, user_service, ",
"insert into high_goods_type (parent_id, title, ",
"business_type, user_service, ",
"img, created_user_id, ",
"created_time, updated_user_id, ",
"updated_time, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{title,jdbcType=VARCHAR}, #{userService,jdbcType=VARCHAR}, ",
"values (#{parentId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, ",
"#{businessType,jdbcType=INTEGER}, #{userService,jdbcType=VARCHAR}, ",
"#{img,jdbcType=VARCHAR}, #{createdUserId,jdbcType=INTEGER}, ",
"#{createdTime,jdbcType=TIMESTAMP}, #{updatedUserId,jdbcType=INTEGER}, ",
"#{updatedTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
@ -60,7 +62,9 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt {
@SelectProvider(type=HighGoodsTypeSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="parent_id", property="parentId", jdbcType=JdbcType.INTEGER),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="business_type", property="businessType", jdbcType=JdbcType.INTEGER),
@Result(column="user_service", property="userService", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER),
@ -76,14 +80,16 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt {
@Select({
"select",
"id, title, user_service, img, created_user_id, created_time, updated_user_id, ",
"updated_time, `status`, ext_1, ext_2, ext_3",
"id, parent_id, title, business_type, user_service, img, created_user_id, created_time, ",
"updated_user_id, updated_time, `status`, ext_1, ext_2, ext_3",
"from high_goods_type",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="parent_id", property="parentId", jdbcType=JdbcType.INTEGER),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="business_type", property="businessType", jdbcType=JdbcType.INTEGER),
@Result(column="user_service", property="userService", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER),
@ -108,7 +114,9 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt {
@Update({
"update high_goods_type",
"set title = #{title,jdbcType=VARCHAR},",
"set parent_id = #{parentId,jdbcType=INTEGER},",
"title = #{title,jdbcType=VARCHAR},",
"business_type = #{businessType,jdbcType=INTEGER},",
"user_service = #{userService,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},",
"created_user_id = #{createdUserId,jdbcType=INTEGER},",

@ -28,10 +28,18 @@ public class HighGoodsTypeSqlProvider {
SQL sql = new SQL();
sql.INSERT_INTO("high_goods_type");
if (record.getParentId() != null) {
sql.VALUES("parent_id", "#{parentId,jdbcType=INTEGER}");
}
if (record.getTitle() != null) {
sql.VALUES("title", "#{title,jdbcType=VARCHAR}");
}
if (record.getBusinessType() != null) {
sql.VALUES("business_type", "#{businessType,jdbcType=INTEGER}");
}
if (record.getUserService() != null) {
sql.VALUES("user_service", "#{userService,jdbcType=VARCHAR}");
}
@ -82,7 +90,9 @@ public class HighGoodsTypeSqlProvider {
} else {
sql.SELECT("id");
}
sql.SELECT("parent_id");
sql.SELECT("title");
sql.SELECT("business_type");
sql.SELECT("user_service");
sql.SELECT("img");
sql.SELECT("created_user_id");
@ -114,10 +124,18 @@ public class HighGoodsTypeSqlProvider {
sql.SET("id = #{record.id,jdbcType=INTEGER}");
}
if (record.getParentId() != null) {
sql.SET("parent_id = #{record.parentId,jdbcType=INTEGER}");
}
if (record.getTitle() != null) {
sql.SET("title = #{record.title,jdbcType=VARCHAR}");
}
if (record.getBusinessType() != null) {
sql.SET("business_type = #{record.businessType,jdbcType=INTEGER}");
}
if (record.getUserService() != null) {
sql.SET("user_service = #{record.userService,jdbcType=VARCHAR}");
}
@ -167,7 +185,9 @@ public class HighGoodsTypeSqlProvider {
sql.UPDATE("high_goods_type");
sql.SET("id = #{record.id,jdbcType=INTEGER}");
sql.SET("parent_id = #{record.parentId,jdbcType=INTEGER}");
sql.SET("title = #{record.title,jdbcType=VARCHAR}");
sql.SET("business_type = #{record.businessType,jdbcType=INTEGER}");
sql.SET("user_service = #{record.userService,jdbcType=VARCHAR}");
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}");
@ -188,10 +208,18 @@ public class HighGoodsTypeSqlProvider {
SQL sql = new SQL();
sql.UPDATE("high_goods_type");
if (record.getParentId() != null) {
sql.SET("parent_id = #{parentId,jdbcType=INTEGER}");
}
if (record.getTitle() != null) {
sql.SET("title = #{title,jdbcType=VARCHAR}");
}
if (record.getBusinessType() != null) {
sql.SET("business_type = #{businessType,jdbcType=INTEGER}");
}
if (record.getUserService() != null) {
sql.SET("user_service = #{userService,jdbcType=VARCHAR}");
}

@ -18,11 +18,21 @@ public class HighGoodsType implements Serializable {
*/
private Integer id;
/**
* 父类id
*/
private Integer parentId;
/**
* 标题
*/
private String title;
/**
* 业务类型 1第三方会员充值 2优选商品 3实物产品
*/
private Integer businessType;
/**
* 使用业务
*/
@ -83,6 +93,14 @@ public class HighGoodsType implements Serializable {
this.id = id;
}
public Integer getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
public String getTitle() {
return title;
}
@ -91,6 +109,14 @@ public class HighGoodsType implements Serializable {
this.title = title;
}
public Integer getBusinessType() {
return businessType;
}
public void setBusinessType(Integer businessType) {
this.businessType = businessType;
}
public String getUserService() {
return userService;
}
@ -184,7 +210,9 @@ public class HighGoodsType implements Serializable {
}
HighGoodsType other = (HighGoodsType) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getBusinessType() == null ? other.getBusinessType() == null : this.getBusinessType().equals(other.getBusinessType()))
&& (this.getUserService() == null ? other.getUserService() == null : this.getUserService().equals(other.getUserService()))
&& (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
&& (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId()))
@ -202,7 +230,9 @@ public class HighGoodsType implements Serializable {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getBusinessType() == null) ? 0 : getBusinessType().hashCode());
result = prime * result + ((getUserService() == null) ? 0 : getUserService().hashCode());
result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().hashCode());
@ -223,7 +253,9 @@ public class HighGoodsType implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", parentId=").append(parentId);
sb.append(", title=").append(title);
sb.append(", businessType=").append(businessType);
sb.append(", userService=").append(userService);
sb.append(", img=").append(img);
sb.append(", createdUserId=").append(createdUserId);

@ -185,6 +185,66 @@ public class HighGoodsTypeExample {
return (Criteria) this;
}
public Criteria andParentIdIsNull() {
addCriterion("parent_id is null");
return (Criteria) this;
}
public Criteria andParentIdIsNotNull() {
addCriterion("parent_id is not null");
return (Criteria) this;
}
public Criteria andParentIdEqualTo(Integer value) {
addCriterion("parent_id =", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotEqualTo(Integer value) {
addCriterion("parent_id <>", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdGreaterThan(Integer value) {
addCriterion("parent_id >", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdGreaterThanOrEqualTo(Integer value) {
addCriterion("parent_id >=", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdLessThan(Integer value) {
addCriterion("parent_id <", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdLessThanOrEqualTo(Integer value) {
addCriterion("parent_id <=", value, "parentId");
return (Criteria) this;
}
public Criteria andParentIdIn(List<Integer> values) {
addCriterion("parent_id in", values, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotIn(List<Integer> values) {
addCriterion("parent_id not in", values, "parentId");
return (Criteria) this;
}
public Criteria andParentIdBetween(Integer value1, Integer value2) {
addCriterion("parent_id between", value1, value2, "parentId");
return (Criteria) this;
}
public Criteria andParentIdNotBetween(Integer value1, Integer value2) {
addCriterion("parent_id not between", value1, value2, "parentId");
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
@ -255,6 +315,66 @@ public class HighGoodsTypeExample {
return (Criteria) this;
}
public Criteria andBusinessTypeIsNull() {
addCriterion("business_type is null");
return (Criteria) this;
}
public Criteria andBusinessTypeIsNotNull() {
addCriterion("business_type is not null");
return (Criteria) this;
}
public Criteria andBusinessTypeEqualTo(Integer value) {
addCriterion("business_type =", value, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeNotEqualTo(Integer value) {
addCriterion("business_type <>", value, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeGreaterThan(Integer value) {
addCriterion("business_type >", value, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("business_type >=", value, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeLessThan(Integer value) {
addCriterion("business_type <", value, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeLessThanOrEqualTo(Integer value) {
addCriterion("business_type <=", value, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeIn(List<Integer> values) {
addCriterion("business_type in", values, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeNotIn(List<Integer> values) {
addCriterion("business_type not in", values, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeBetween(Integer value1, Integer value2) {
addCriterion("business_type between", value1, value2, "businessType");
return (Criteria) this;
}
public Criteria andBusinessTypeNotBetween(Integer value1, Integer value2) {
addCriterion("business_type not between", value1, value2, "businessType");
return (Criteria) this;
}
public Criteria andUserServiceIsNull() {
addCriterion("user_service is null");
return (Criteria) this;

Loading…
Cancel
Save