添加获取购物车中商品可用优惠券接口

This commit is contained in:
zhh
2018-08-29 17:08:16 +08:00
parent 201b405a08
commit 61a67c9aa9
16 changed files with 604 additions and 79 deletions

View File

@@ -104,6 +104,13 @@ public class OmsCartItem implements Serializable {
*/
private Integer deleteStatus;
/**
* 商品分类
*
* @mbggenerated
*/
private Long productCategoryId;
private static final long serialVersionUID = 1L;
public Long getId() {
@@ -242,6 +249,14 @@ public class OmsCartItem implements Serializable {
this.deleteStatus = deleteStatus;
}
public Long getProductCategoryId() {
return productCategoryId;
}
public void setProductCategoryId(Long productCategoryId) {
this.productCategoryId = productCategoryId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@@ -265,6 +280,7 @@ public class OmsCartItem implements Serializable {
sb.append(", createDate=").append(createDate);
sb.append(", modifyDate=").append(modifyDate);
sb.append(", deleteStatus=").append(deleteStatus);
sb.append(", productCategoryId=").append(productCategoryId);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

View File

@@ -1205,6 +1205,66 @@ public class OmsCartItemExample {
addCriterion("delete_status not between", value1, value2, "deleteStatus");
return (Criteria) this;
}
public Criteria andProductCategoryIdIsNull() {
addCriterion("product_category_id is null");
return (Criteria) this;
}
public Criteria andProductCategoryIdIsNotNull() {
addCriterion("product_category_id is not null");
return (Criteria) this;
}
public Criteria andProductCategoryIdEqualTo(Long value) {
addCriterion("product_category_id =", value, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdNotEqualTo(Long value) {
addCriterion("product_category_id <>", value, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdGreaterThan(Long value) {
addCriterion("product_category_id >", value, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdGreaterThanOrEqualTo(Long value) {
addCriterion("product_category_id >=", value, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdLessThan(Long value) {
addCriterion("product_category_id <", value, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdLessThanOrEqualTo(Long value) {
addCriterion("product_category_id <=", value, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdIn(List<Long> values) {
addCriterion("product_category_id in", values, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdNotIn(List<Long> values) {
addCriterion("product_category_id not in", values, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdBetween(Long value1, Long value2) {
addCriterion("product_category_id between", value1, value2, "productCategoryId");
return (Criteria) this;
}
public Criteria andProductCategoryIdNotBetween(Long value1, Long value2) {
addCriterion("product_category_id not between", value1, value2, "productCategoryId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

View File

@@ -19,6 +19,7 @@
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
<result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@@ -81,7 +82,7 @@
<sql id="Base_Column_List">
id, product_id, product_sku_id, member_id, quantity, price, sp1, sp2, sp3, product_pic,
product_name, product_sub_title, product_sku_code, member_nickname, create_date,
modify_date, delete_status
modify_date, delete_status, product_category_id
</sql>
<select id="selectByExample" parameterType="com.macro.mall.model.OmsCartItemExample" resultMap="BaseResultMap">
select
@@ -122,13 +123,13 @@
sp2, sp3, product_pic,
product_name, product_sub_title, product_sku_code,
member_nickname, create_date, modify_date,
delete_status)
delete_status, product_category_id)
values (#{productId,jdbcType=BIGINT}, #{productSkuId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
#{quantity,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{productPic,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{productSubTitle,jdbcType=VARCHAR}, #{productSkuCode,jdbcType=VARCHAR},
#{memberNickname,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyDate,jdbcType=TIMESTAMP},
#{deleteStatus,jdbcType=INTEGER})
#{deleteStatus,jdbcType=INTEGER}, #{productCategoryId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsCartItem">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -184,6 +185,9 @@
<if test="deleteStatus != null">
delete_status,
</if>
<if test="productCategoryId != null">
product_category_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null">
@@ -234,6 +238,9 @@
<if test="deleteStatus != null">
#{deleteStatus,jdbcType=INTEGER},
</if>
<if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.macro.mall.model.OmsCartItemExample" resultType="java.lang.Integer">
@@ -296,6 +303,9 @@
<if test="record.deleteStatus != null">
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
</if>
<if test="record.productCategoryId != null">
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -319,7 +329,8 @@
member_nickname = #{record.memberNickname,jdbcType=VARCHAR},
create_date = #{record.createDate,jdbcType=TIMESTAMP},
modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
delete_status = #{record.deleteStatus,jdbcType=INTEGER}
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
product_category_id = #{record.productCategoryId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@@ -375,6 +386,9 @@
<if test="deleteStatus != null">
delete_status = #{deleteStatus,jdbcType=INTEGER},
</if>
<if test="productCategoryId != null">
product_category_id = #{productCategoryId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@@ -395,7 +409,8 @@
member_nickname = #{memberNickname,jdbcType=VARCHAR},
create_date = #{createDate,jdbcType=TIMESTAMP},
modify_date = #{modifyDate,jdbcType=TIMESTAMP},
delete_status = #{deleteStatus,jdbcType=INTEGER}
delete_status = #{deleteStatus,jdbcType=INTEGER},
product_category_id = #{productCategoryId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>