From 450768e856e4277066e0f4203c5ee331fae1669a Mon Sep 17 00:00:00 2001 From: whb <17803890193@163.com> Date: Wed, 13 Nov 2024 18:55:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=9F=AD=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E8=90=A5=E9=94=80=E5=88=86=E9=94=80=E6=8F=90=E6=88=90=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9A=84=E6=94=B6=E7=9B=8A=E5=88=86=E9=85=8D?= =?UTF-8?q?=20,=E6=A0=B9=E6=8D=AE=E6=92=AD=E6=94=BE=E9=87=8F=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stu/StuGoodsTradingCenterController.java | 2 + .../trade/entity/StuGoodsShareBaseInfo.java | 144 +++ .../entity/StuGoodsShareBaseInfoExample.java | 970 ++++++++++++++++++ .../mapper/StuGoodsShareBaseInfoMapper.java | 30 + .../impl/StuGoodsTradingOrderServiceImpl.java | 2 +- .../mappers/StuGoodsShareBaseInfoMapper.xml | 323 ++++++ 6 files changed, 1470 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfo.java create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfoExample.java create mode 100644 src/main/java/com/sztzjy/trade/mapper/StuGoodsShareBaseInfoMapper.java create mode 100644 src/main/resources/mappers/StuGoodsShareBaseInfoMapper.xml diff --git a/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java b/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java index e07da63..e5acddb 100644 --- a/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java +++ b/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java @@ -403,4 +403,6 @@ public class StuGoodsTradingCenterController { + + } diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfo.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfo.java new file mode 100644 index 0000000..e63f07c --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfo.java @@ -0,0 +1,144 @@ +package com.sztzjy.trade.entity; + +import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; +/** + * 用户分享表 + * + * @author whb + * stu_goods_share_base_info + */ +public class StuGoodsShareBaseInfo { + @ApiModelProperty(notes = "分享表ID") + private Integer id; + + @ApiModelProperty(notes = "发起分享用户ID") + private String userId; + + @ApiModelProperty(notes = "接收分享用户ID") + private String clickOnTheSquare; + + @ApiModelProperty(notes = "接收方是否下单(1:已经下单,0:未下单)") + private Integer state; + + @ApiModelProperty(notes = "创建时间") + private Date createTime; + + @ApiModelProperty(notes = "分享商品ID") + private Integer goodsId; + + @ApiModelProperty(notes = "分享类型(视频、知乎等)") + private String type; + + @ApiModelProperty(notes = "分销提成") + private Double shareCommission; + + @ApiModelProperty(notes = "用户下单时间(默认为空)") + private Date orderTime; + + @ApiModelProperty(notes = "用户下单类型") + private String orderGoodsType; + + @ApiModelProperty(notes = "分享链接") + private String shareUrl; + + @ApiModelProperty(notes = "链接过期时间") + private Date effectiveDuration; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } + + public String getClickOnTheSquare() { + return clickOnTheSquare; + } + + public void setClickOnTheSquare(String clickOnTheSquare) { + this.clickOnTheSquare = clickOnTheSquare == null ? null : clickOnTheSquare.trim(); + } + + public Integer getState() { + return state; + } + + public void setState(Integer state) { + this.state = state; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getGoodsId() { + return goodsId; + } + + public void setGoodsId(Integer goodsId) { + this.goodsId = goodsId; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public Double getShareCommission() { + return shareCommission; + } + + public void setShareCommission(Double shareCommission) { + this.shareCommission = shareCommission; + } + + public Date getOrderTime() { + return orderTime; + } + + public void setOrderTime(Date orderTime) { + this.orderTime = orderTime; + } + + public String getOrderGoodsType() { + return orderGoodsType; + } + + public void setOrderGoodsType(String orderGoodsType) { + this.orderGoodsType = orderGoodsType == null ? null : orderGoodsType.trim(); + } + + public String getShareUrl() { + return shareUrl; + } + + public void setShareUrl(String shareUrl) { + this.shareUrl = shareUrl == null ? null : shareUrl.trim(); + } + + public Date getEffectiveDuration() { + return effectiveDuration; + } + + public void setEffectiveDuration(Date effectiveDuration) { + this.effectiveDuration = effectiveDuration; + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfoExample.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfoExample.java new file mode 100644 index 0000000..8725fd7 --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareBaseInfoExample.java @@ -0,0 +1,970 @@ +package com.sztzjy.trade.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StuGoodsShareBaseInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuGoodsShareBaseInfoExample() { + oredCriteria = new ArrayList<>(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareIsNull() { + addCriterion("click_on_the_square is null"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareIsNotNull() { + addCriterion("click_on_the_square is not null"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareEqualTo(String value) { + addCriterion("click_on_the_square =", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareNotEqualTo(String value) { + addCriterion("click_on_the_square <>", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareGreaterThan(String value) { + addCriterion("click_on_the_square >", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareGreaterThanOrEqualTo(String value) { + addCriterion("click_on_the_square >=", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareLessThan(String value) { + addCriterion("click_on_the_square <", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareLessThanOrEqualTo(String value) { + addCriterion("click_on_the_square <=", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareLike(String value) { + addCriterion("click_on_the_square like", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareNotLike(String value) { + addCriterion("click_on_the_square not like", value, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareIn(List values) { + addCriterion("click_on_the_square in", values, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareNotIn(List values) { + addCriterion("click_on_the_square not in", values, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareBetween(String value1, String value2) { + addCriterion("click_on_the_square between", value1, value2, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andClickOnTheSquareNotBetween(String value1, String value2) { + addCriterion("click_on_the_square not between", value1, value2, "clickOnTheSquare"); + return (Criteria) this; + } + + public Criteria andStateIsNull() { + addCriterion("state is null"); + return (Criteria) this; + } + + public Criteria andStateIsNotNull() { + addCriterion("state is not null"); + return (Criteria) this; + } + + public Criteria andStateEqualTo(Integer value) { + addCriterion("state =", value, "state"); + return (Criteria) this; + } + + public Criteria andStateNotEqualTo(Integer value) { + addCriterion("state <>", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThan(Integer value) { + addCriterion("state >", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThanOrEqualTo(Integer value) { + addCriterion("state >=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThan(Integer value) { + addCriterion("state <", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThanOrEqualTo(Integer value) { + addCriterion("state <=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateIn(List values) { + addCriterion("state in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateNotIn(List values) { + addCriterion("state not in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateBetween(Integer value1, Integer value2) { + addCriterion("state between", value1, value2, "state"); + return (Criteria) this; + } + + public Criteria andStateNotBetween(Integer value1, Integer value2) { + addCriterion("state not between", value1, value2, "state"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNull() { + addCriterion("goods_id is null"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNotNull() { + addCriterion("goods_id is not null"); + return (Criteria) this; + } + + public Criteria andGoodsIdEqualTo(Integer value) { + addCriterion("goods_id =", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotEqualTo(Integer value) { + addCriterion("goods_id <>", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThan(Integer value) { + addCriterion("goods_id >", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThanOrEqualTo(Integer value) { + addCriterion("goods_id >=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThan(Integer value) { + addCriterion("goods_id <", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThanOrEqualTo(Integer value) { + addCriterion("goods_id <=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIn(List values) { + addCriterion("goods_id in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotIn(List values) { + addCriterion("goods_id not in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdBetween(Integer value1, Integer value2) { + addCriterion("goods_id between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotBetween(Integer value1, Integer value2) { + addCriterion("goods_id not between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("type like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("type not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andShareCommissionIsNull() { + addCriterion("share_commission is null"); + return (Criteria) this; + } + + public Criteria andShareCommissionIsNotNull() { + addCriterion("share_commission is not null"); + return (Criteria) this; + } + + public Criteria andShareCommissionEqualTo(Double value) { + addCriterion("share_commission =", value, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionNotEqualTo(Double value) { + addCriterion("share_commission <>", value, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionGreaterThan(Double value) { + addCriterion("share_commission >", value, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionGreaterThanOrEqualTo(Double value) { + addCriterion("share_commission >=", value, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionLessThan(Double value) { + addCriterion("share_commission <", value, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionLessThanOrEqualTo(Double value) { + addCriterion("share_commission <=", value, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionIn(List values) { + addCriterion("share_commission in", values, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionNotIn(List values) { + addCriterion("share_commission not in", values, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionBetween(Double value1, Double value2) { + addCriterion("share_commission between", value1, value2, "shareCommission"); + return (Criteria) this; + } + + public Criteria andShareCommissionNotBetween(Double value1, Double value2) { + addCriterion("share_commission not between", value1, value2, "shareCommission"); + return (Criteria) this; + } + + public Criteria andOrderTimeIsNull() { + addCriterion("order_time is null"); + return (Criteria) this; + } + + public Criteria andOrderTimeIsNotNull() { + addCriterion("order_time is not null"); + return (Criteria) this; + } + + public Criteria andOrderTimeEqualTo(Date value) { + addCriterion("order_time =", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeNotEqualTo(Date value) { + addCriterion("order_time <>", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeGreaterThan(Date value) { + addCriterion("order_time >", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeGreaterThanOrEqualTo(Date value) { + addCriterion("order_time >=", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeLessThan(Date value) { + addCriterion("order_time <", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeLessThanOrEqualTo(Date value) { + addCriterion("order_time <=", value, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeIn(List values) { + addCriterion("order_time in", values, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeNotIn(List values) { + addCriterion("order_time not in", values, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeBetween(Date value1, Date value2) { + addCriterion("order_time between", value1, value2, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderTimeNotBetween(Date value1, Date value2) { + addCriterion("order_time not between", value1, value2, "orderTime"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeIsNull() { + addCriterion("order_goods_type is null"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeIsNotNull() { + addCriterion("order_goods_type is not null"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeEqualTo(String value) { + addCriterion("order_goods_type =", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeNotEqualTo(String value) { + addCriterion("order_goods_type <>", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeGreaterThan(String value) { + addCriterion("order_goods_type >", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeGreaterThanOrEqualTo(String value) { + addCriterion("order_goods_type >=", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeLessThan(String value) { + addCriterion("order_goods_type <", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeLessThanOrEqualTo(String value) { + addCriterion("order_goods_type <=", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeLike(String value) { + addCriterion("order_goods_type like", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeNotLike(String value) { + addCriterion("order_goods_type not like", value, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeIn(List values) { + addCriterion("order_goods_type in", values, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeNotIn(List values) { + addCriterion("order_goods_type not in", values, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeBetween(String value1, String value2) { + addCriterion("order_goods_type between", value1, value2, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andOrderGoodsTypeNotBetween(String value1, String value2) { + addCriterion("order_goods_type not between", value1, value2, "orderGoodsType"); + return (Criteria) this; + } + + public Criteria andShareUrlIsNull() { + addCriterion("share_url is null"); + return (Criteria) this; + } + + public Criteria andShareUrlIsNotNull() { + addCriterion("share_url is not null"); + return (Criteria) this; + } + + public Criteria andShareUrlEqualTo(String value) { + addCriterion("share_url =", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlNotEqualTo(String value) { + addCriterion("share_url <>", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlGreaterThan(String value) { + addCriterion("share_url >", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlGreaterThanOrEqualTo(String value) { + addCriterion("share_url >=", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlLessThan(String value) { + addCriterion("share_url <", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlLessThanOrEqualTo(String value) { + addCriterion("share_url <=", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlLike(String value) { + addCriterion("share_url like", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlNotLike(String value) { + addCriterion("share_url not like", value, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlIn(List values) { + addCriterion("share_url in", values, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlNotIn(List values) { + addCriterion("share_url not in", values, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlBetween(String value1, String value2) { + addCriterion("share_url between", value1, value2, "shareUrl"); + return (Criteria) this; + } + + public Criteria andShareUrlNotBetween(String value1, String value2) { + addCriterion("share_url not between", value1, value2, "shareUrl"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationIsNull() { + addCriterion("effective_duration is null"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationIsNotNull() { + addCriterion("effective_duration is not null"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationEqualTo(Date value) { + addCriterion("effective_duration =", value, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationNotEqualTo(Date value) { + addCriterion("effective_duration <>", value, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationGreaterThan(Date value) { + addCriterion("effective_duration >", value, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationGreaterThanOrEqualTo(Date value) { + addCriterion("effective_duration >=", value, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationLessThan(Date value) { + addCriterion("effective_duration <", value, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationLessThanOrEqualTo(Date value) { + addCriterion("effective_duration <=", value, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationIn(List values) { + addCriterion("effective_duration in", values, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationNotIn(List values) { + addCriterion("effective_duration not in", values, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationBetween(Date value1, Date value2) { + addCriterion("effective_duration between", value1, value2, "effectiveDuration"); + return (Criteria) this; + } + + public Criteria andEffectiveDurationNotBetween(Date value1, Date value2) { + addCriterion("effective_duration not between", value1, value2, "effectiveDuration"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/mapper/StuGoodsShareBaseInfoMapper.java b/src/main/java/com/sztzjy/trade/mapper/StuGoodsShareBaseInfoMapper.java new file mode 100644 index 0000000..eda7f02 --- /dev/null +++ b/src/main/java/com/sztzjy/trade/mapper/StuGoodsShareBaseInfoMapper.java @@ -0,0 +1,30 @@ +package com.sztzjy.trade.mapper; + +import com.sztzjy.trade.entity.StuGoodsShareBaseInfo; +import com.sztzjy.trade.entity.StuGoodsShareBaseInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface StuGoodsShareBaseInfoMapper { + long countByExample(StuGoodsShareBaseInfoExample example); + + int deleteByExample(StuGoodsShareBaseInfoExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuGoodsShareBaseInfo record); + + int insertSelective(StuGoodsShareBaseInfo record); + + List selectByExample(StuGoodsShareBaseInfoExample example); + + StuGoodsShareBaseInfo selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuGoodsShareBaseInfo record, @Param("example") StuGoodsShareBaseInfoExample example); + + int updateByExample(@Param("record") StuGoodsShareBaseInfo record, @Param("example") StuGoodsShareBaseInfoExample example); + + int updateByPrimaryKeySelective(StuGoodsShareBaseInfo record); + + int updateByPrimaryKey(StuGoodsShareBaseInfo record); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingOrderServiceImpl.java b/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingOrderServiceImpl.java index d21f06f..3609ad7 100644 --- a/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingOrderServiceImpl.java +++ b/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingOrderServiceImpl.java @@ -483,7 +483,6 @@ public class StuGoodsTradingOrderServiceImpl implements StuGoodsTradingOrderServ }else { - if (stuevaluate.getEve() == 1) { //评论的第一级别 @@ -672,6 +671,7 @@ public class StuGoodsTradingOrderServiceImpl implements StuGoodsTradingOrderServ // 查询评论表 StuGoodsVideoCommentInfoExample example = new StuGoodsVideoCommentInfoExample(); example.createCriteria().andVideoIdEqualTo(videoId).andGoodsIdEqualTo(goodsVideoInfo.getGoodsId()); + example.setOrderByClause("video_play_count desc"); List stuGoodsVideoCommentInfoList = stuGoodsVideoCommentInfoMapper.selectByExample(example); if (!stuGoodsVideoCommentInfoList.isEmpty()) { diff --git a/src/main/resources/mappers/StuGoodsShareBaseInfoMapper.xml b/src/main/resources/mappers/StuGoodsShareBaseInfoMapper.xml new file mode 100644 index 0000000..9027a4b --- /dev/null +++ b/src/main/resources/mappers/StuGoodsShareBaseInfoMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, click_on_the_square, state, create_time, goods_id, type, share_commission, + order_time, order_goods_type, share_url, effective_duration + + + + + delete from stu_goods_share_base_info + where id = #{id,jdbcType=INTEGER} + + + delete from stu_goods_share_base_info + + + + + + insert into stu_goods_share_base_info (id, user_id, click_on_the_square, + state, create_time, goods_id, + type, share_commission, order_time, + order_goods_type, share_url, effective_duration + ) + values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{clickOnTheSquare,jdbcType=VARCHAR}, + #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{goodsId,jdbcType=INTEGER}, + #{type,jdbcType=VARCHAR}, #{shareCommission,jdbcType=DOUBLE}, #{orderTime,jdbcType=TIMESTAMP}, + #{orderGoodsType,jdbcType=VARCHAR}, #{shareUrl,jdbcType=VARCHAR}, #{effectiveDuration,jdbcType=TIMESTAMP} + ) + + + insert into stu_goods_share_base_info + + + id, + + + user_id, + + + click_on_the_square, + + + state, + + + create_time, + + + goods_id, + + + type, + + + share_commission, + + + order_time, + + + order_goods_type, + + + share_url, + + + effective_duration, + + + + + #{id,jdbcType=INTEGER}, + + + #{userId,jdbcType=VARCHAR}, + + + #{clickOnTheSquare,jdbcType=VARCHAR}, + + + #{state,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{goodsId,jdbcType=INTEGER}, + + + #{type,jdbcType=VARCHAR}, + + + #{shareCommission,jdbcType=DOUBLE}, + + + #{orderTime,jdbcType=TIMESTAMP}, + + + #{orderGoodsType,jdbcType=VARCHAR}, + + + #{shareUrl,jdbcType=VARCHAR}, + + + #{effectiveDuration,jdbcType=TIMESTAMP}, + + + + + + update stu_goods_share_base_info + + + id = #{record.id,jdbcType=INTEGER}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + click_on_the_square = #{record.clickOnTheSquare,jdbcType=VARCHAR}, + + + state = #{record.state,jdbcType=INTEGER}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + goods_id = #{record.goodsId,jdbcType=INTEGER}, + + + type = #{record.type,jdbcType=VARCHAR}, + + + share_commission = #{record.shareCommission,jdbcType=DOUBLE}, + + + order_time = #{record.orderTime,jdbcType=TIMESTAMP}, + + + order_goods_type = #{record.orderGoodsType,jdbcType=VARCHAR}, + + + share_url = #{record.shareUrl,jdbcType=VARCHAR}, + + + effective_duration = #{record.effectiveDuration,jdbcType=TIMESTAMP}, + + + + + + + + update stu_goods_share_base_info + set id = #{record.id,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=VARCHAR}, + click_on_the_square = #{record.clickOnTheSquare,jdbcType=VARCHAR}, + state = #{record.state,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + goods_id = #{record.goodsId,jdbcType=INTEGER}, + type = #{record.type,jdbcType=VARCHAR}, + share_commission = #{record.shareCommission,jdbcType=DOUBLE}, + order_time = #{record.orderTime,jdbcType=TIMESTAMP}, + order_goods_type = #{record.orderGoodsType,jdbcType=VARCHAR}, + share_url = #{record.shareUrl,jdbcType=VARCHAR}, + effective_duration = #{record.effectiveDuration,jdbcType=TIMESTAMP} + + + + + + update stu_goods_share_base_info + + + user_id = #{userId,jdbcType=VARCHAR}, + + + click_on_the_square = #{clickOnTheSquare,jdbcType=VARCHAR}, + + + state = #{state,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + goods_id = #{goodsId,jdbcType=INTEGER}, + + + type = #{type,jdbcType=VARCHAR}, + + + share_commission = #{shareCommission,jdbcType=DOUBLE}, + + + order_time = #{orderTime,jdbcType=TIMESTAMP}, + + + order_goods_type = #{orderGoodsType,jdbcType=VARCHAR}, + + + share_url = #{shareUrl,jdbcType=VARCHAR}, + + + effective_duration = #{effectiveDuration,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + update stu_goods_share_base_info + set user_id = #{userId,jdbcType=VARCHAR}, + click_on_the_square = #{clickOnTheSquare,jdbcType=VARCHAR}, + state = #{state,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + goods_id = #{goodsId,jdbcType=INTEGER}, + type = #{type,jdbcType=VARCHAR}, + share_commission = #{shareCommission,jdbcType=DOUBLE}, + order_time = #{orderTime,jdbcType=TIMESTAMP}, + order_goods_type = #{orderGoodsType,jdbcType=VARCHAR}, + share_url = #{shareUrl,jdbcType=VARCHAR}, + effective_duration = #{effectiveDuration,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file