Merge remote-tracking branch 'origin/api-dev' into api-dev

袁野 2 years ago
commit 9c40c8845b
  1. 33
      hai-service/src/main/java/com/hai/dao/ApiMemberProductMapper.java
  2. 14
      hai-service/src/main/java/com/hai/dao/ApiMemberProductSqlProvider.java
  3. 16
      hai-service/src/main/java/com/hai/entity/ApiMemberProduct.java
  4. 70
      hai-service/src/main/java/com/hai/entity/ApiMemberProductExample.java

@ -39,18 +39,20 @@ public interface ApiMemberProductMapper extends ApiMemberProductMapperExt {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into api_member_product (type_id, brand_id, ", "insert into api_member_product (`name`, type_id, ",
"price, product_id, ", "brand_id, price, ",
"sort, operator_id, ", "product_id, sort, ",
"operator_name, create_time, ", "operator_id, operator_name, ",
"update_time, `status`, ", "create_time, update_time, ",
"ext_1, ext_2, ext_3)", "`status`, ext_1, ext_2, ",
"values (#{typeId,jdbcType=INTEGER}, #{brandId,jdbcType=INTEGER}, ", "ext_3)",
"#{price,jdbcType=DECIMAL}, #{productId,jdbcType=BIGINT}, ", "values (#{name,jdbcType=VARCHAR}, #{typeId,jdbcType=INTEGER}, ",
"#{sort,jdbcType=INTEGER}, #{operatorId,jdbcType=BIGINT}, ", "#{brandId,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ",
"#{operatorName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{productId,jdbcType=BIGINT}, #{sort,jdbcType=INTEGER}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(ApiMemberProduct record); int insert(ApiMemberProduct record);
@ -62,6 +64,7 @@ public interface ApiMemberProductMapper extends ApiMemberProductMapperExt {
@SelectProvider(type=ApiMemberProductSqlProvider.class, method="selectByExample") @SelectProvider(type=ApiMemberProductSqlProvider.class, method="selectByExample")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="type_id", property="typeId", jdbcType=JdbcType.INTEGER), @Result(column="type_id", property="typeId", jdbcType=JdbcType.INTEGER),
@Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER), @Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@ -80,13 +83,14 @@ public interface ApiMemberProductMapper extends ApiMemberProductMapperExt {
@Select({ @Select({
"select", "select",
"id, type_id, brand_id, price, product_id, sort, operator_id, operator_name, ", "id, `name`, type_id, brand_id, price, product_id, sort, operator_id, operator_name, ",
"create_time, update_time, `status`, ext_1, ext_2, ext_3", "create_time, update_time, `status`, ext_1, ext_2, ext_3",
"from api_member_product", "from api_member_product",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="type_id", property="typeId", jdbcType=JdbcType.INTEGER), @Result(column="type_id", property="typeId", jdbcType=JdbcType.INTEGER),
@Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER), @Result(column="brand_id", property="brandId", jdbcType=JdbcType.INTEGER),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@ -114,7 +118,8 @@ public interface ApiMemberProductMapper extends ApiMemberProductMapperExt {
@Update({ @Update({
"update api_member_product", "update api_member_product",
"set type_id = #{typeId,jdbcType=INTEGER},", "set `name` = #{name,jdbcType=VARCHAR},",
"type_id = #{typeId,jdbcType=INTEGER},",
"brand_id = #{brandId,jdbcType=INTEGER},", "brand_id = #{brandId,jdbcType=INTEGER},",
"price = #{price,jdbcType=DECIMAL},", "price = #{price,jdbcType=DECIMAL},",
"product_id = #{productId,jdbcType=BIGINT},", "product_id = #{productId,jdbcType=BIGINT},",

@ -28,6 +28,10 @@ public class ApiMemberProductSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.INSERT_INTO("api_member_product"); sql.INSERT_INTO("api_member_product");
if (record.getName() != null) {
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}");
}
if (record.getTypeId() != null) { if (record.getTypeId() != null) {
sql.VALUES("type_id", "#{typeId,jdbcType=INTEGER}"); sql.VALUES("type_id", "#{typeId,jdbcType=INTEGER}");
} }
@ -90,6 +94,7 @@ public class ApiMemberProductSqlProvider {
} else { } else {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("`name`");
sql.SELECT("type_id"); sql.SELECT("type_id");
sql.SELECT("brand_id"); sql.SELECT("brand_id");
sql.SELECT("price"); sql.SELECT("price");
@ -124,6 +129,10 @@ public class ApiMemberProductSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
} }
if (record.getName() != null) {
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
}
if (record.getTypeId() != null) { if (record.getTypeId() != null) {
sql.SET("type_id = #{record.typeId,jdbcType=INTEGER}"); sql.SET("type_id = #{record.typeId,jdbcType=INTEGER}");
} }
@ -185,6 +194,7 @@ public class ApiMemberProductSqlProvider {
sql.UPDATE("api_member_product"); sql.UPDATE("api_member_product");
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("type_id = #{record.typeId,jdbcType=INTEGER}"); sql.SET("type_id = #{record.typeId,jdbcType=INTEGER}");
sql.SET("brand_id = #{record.brandId,jdbcType=INTEGER}"); sql.SET("brand_id = #{record.brandId,jdbcType=INTEGER}");
sql.SET("price = #{record.price,jdbcType=DECIMAL}"); sql.SET("price = #{record.price,jdbcType=DECIMAL}");
@ -208,6 +218,10 @@ public class ApiMemberProductSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.UPDATE("api_member_product"); sql.UPDATE("api_member_product");
if (record.getName() != null) {
sql.SET("`name` = #{name,jdbcType=VARCHAR}");
}
if (record.getTypeId() != null) { if (record.getTypeId() != null) {
sql.SET("type_id = #{typeId,jdbcType=INTEGER}"); sql.SET("type_id = #{typeId,jdbcType=INTEGER}");
} }

@ -19,6 +19,11 @@ public class ApiMemberProduct implements Serializable {
*/ */
private Long id; private Long id;
/**
* 名称
*/
private String name;
/** /**
* 类别id * 类别id
*/ */
@ -94,6 +99,14 @@ public class ApiMemberProduct implements Serializable {
this.id = id; this.id = id;
} }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getTypeId() { public Integer getTypeId() {
return typeId; return typeId;
} }
@ -211,6 +224,7 @@ public class ApiMemberProduct implements Serializable {
} }
ApiMemberProduct other = (ApiMemberProduct) that; ApiMemberProduct other = (ApiMemberProduct) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId())) && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
&& (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId())) && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
@ -231,6 +245,7 @@ public class ApiMemberProduct implements Serializable {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode()); result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode()); result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
@ -254,6 +269,7 @@ public class ApiMemberProduct implements Serializable {
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", typeId=").append(typeId); sb.append(", typeId=").append(typeId);
sb.append(", brandId=").append(brandId); sb.append(", brandId=").append(brandId);
sb.append(", price=").append(price); sb.append(", price=").append(price);

@ -186,6 +186,76 @@ public class ApiMemberProductExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andTypeIdIsNull() { public Criteria andTypeIdIsNull() {
addCriterion("type_id is null"); addCriterion("type_id is null");
return (Criteria) this; return (Criteria) this;

Loading…
Cancel
Save