From c8c10c0951af8bef5e877f9623c3c11af205e4d1 Mon Sep 17 00:00:00 2001 From: whb <17803890193@163.com> Date: Thu, 31 Oct 2024 17:44:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=95=86=E5=93=81=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E5=A4=A7=E5=8E=85=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stu/StuGoodsTradingCenterController.java | 23 +- .../trade/entity/StuGoodsCommentInfo.java | 122 ++ .../entity/StuGoodsCommentInfoExample.java | 770 ++++++++++++ .../trade/entity/StuGoodsOrderInfo.java | 155 +++ .../entity/StuGoodsOrderInfoExample.java | 1050 +++++++++++++++++ .../entity/dto/StuGoodsSalesManageDTO.java | 69 ++ .../mapper/StuGoodsCommentInfoMapper.java | 36 + .../trade/mapper/StuGoodsOrderInfoMapper.java | 30 + .../service/StuGoodsTradingCenterService.java | 3 + .../StuGoodsTradingCenterServiceImpl.java | 171 ++- .../mappers/StuGoodsCommentInfoMapper.xml | 341 ++++++ .../mappers/StuGoodsOrderInfoMapper.xml | 338 ++++++ 12 files changed, 3066 insertions(+), 42 deletions(-) create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfo.java create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfoExample.java create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfo.java create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java create mode 100644 src/main/java/com/sztzjy/trade/entity/dto/StuGoodsSalesManageDTO.java create mode 100644 src/main/java/com/sztzjy/trade/mapper/StuGoodsCommentInfoMapper.java create mode 100644 src/main/java/com/sztzjy/trade/mapper/StuGoodsOrderInfoMapper.java create mode 100644 src/main/resources/mappers/StuGoodsCommentInfoMapper.xml create mode 100644 src/main/resources/mappers/StuGoodsOrderInfoMapper.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 7ab7a7c..e93ac98 100644 --- a/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java +++ b/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java @@ -10,13 +10,10 @@ import com.sztzjy.trade.util.ResultEntity; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.*; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; @@ -99,11 +96,6 @@ public class StuGoodsTradingCenterController { } - - - - - @ApiOperation("购物车信息展示") @PostMapping("/getShoppingCartInfo") @AnonymousAccess @@ -115,6 +107,19 @@ public class StuGoodsTradingCenterController { } + @ApiOperation("商品排序") + @PostMapping("/goodsOrder") + @AnonymousAccess + public ResultEntity goodsOrder(@ApiParam("排序关键字(商品类型) 默认:综合")String keyword, + @ApiParam("用户ID") String userId, + @ApiParam("当前页") @RequestParam(required = true, defaultValue = "1")Integer index, + @ApiParam("每页条数") @RequestParam(required = true, defaultValue = "60") Integer size, + @ApiParam("正序:1,倒叙:0")Integer type){ + return tradingCenterService.goodsOrder(keyword,userId,index,size,type); + + } + + diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfo.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfo.java new file mode 100644 index 0000000..bc4e8af --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfo.java @@ -0,0 +1,122 @@ +package com.sztzjy.trade.entity; + +import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; +/** + * 商品评价表 + * + * @author whb + * stu_goods_comment_info + */ +public class StuGoodsCommentInfo { + @ApiModelProperty(notes = "id") + private Integer id; + + @ApiModelProperty(notes = "订单号") + private String orderNumber; + + @ApiModelProperty(notes = "1-5") + private Integer goodsRating; + + @ApiModelProperty(notes = "商品评语") + private String goodsComment; + + @ApiModelProperty(notes = "匿名评价(0:关闭 ,1:开启)默认关闭") + private Integer anonymousEvaluation; + + @ApiModelProperty(notes = "创建时间") + private Date createTime; + + @ApiModelProperty(notes = "评论层级(默认为0)") + private Integer commentHierarchy; + + @ApiModelProperty(notes = "用户ID") + private String userId; + + @ApiModelProperty(notes = "商品ID") + private Integer goodsId; + + @ApiModelProperty(notes = "电脑传图 json类型(type,url)") + private String imageUpload; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber == null ? null : orderNumber.trim(); + } + + public Integer getGoodsRating() { + return goodsRating; + } + + public void setGoodsRating(Integer goodsRating) { + this.goodsRating = goodsRating; + } + + public String getGoodsComment() { + return goodsComment; + } + + public void setGoodsComment(String goodsComment) { + this.goodsComment = goodsComment == null ? null : goodsComment.trim(); + } + + public Integer getAnonymousEvaluation() { + return anonymousEvaluation; + } + + public void setAnonymousEvaluation(Integer anonymousEvaluation) { + this.anonymousEvaluation = anonymousEvaluation; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getCommentHierarchy() { + return commentHierarchy; + } + + public void setCommentHierarchy(Integer commentHierarchy) { + this.commentHierarchy = commentHierarchy; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } + + public Integer getGoodsId() { + return goodsId; + } + + public void setGoodsId(Integer goodsId) { + this.goodsId = goodsId; + } + + public String getImageUpload() { + return imageUpload; + } + + public void setImageUpload(String imageUpload) { + this.imageUpload = imageUpload == null ? null : imageUpload.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfoExample.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfoExample.java new file mode 100644 index 0000000..a78c91a --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsCommentInfoExample.java @@ -0,0 +1,770 @@ +package com.sztzjy.trade.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StuGoodsCommentInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuGoodsCommentInfoExample() { + 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 andOrderNumberIsNull() { + addCriterion("order_number is null"); + return (Criteria) this; + } + + public Criteria andOrderNumberIsNotNull() { + addCriterion("order_number is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumberEqualTo(String value) { + addCriterion("order_number =", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotEqualTo(String value) { + addCriterion("order_number <>", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberGreaterThan(String value) { + addCriterion("order_number >", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberGreaterThanOrEqualTo(String value) { + addCriterion("order_number >=", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLessThan(String value) { + addCriterion("order_number <", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLessThanOrEqualTo(String value) { + addCriterion("order_number <=", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLike(String value) { + addCriterion("order_number like", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotLike(String value) { + addCriterion("order_number not like", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberIn(List values) { + addCriterion("order_number in", values, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotIn(List values) { + addCriterion("order_number not in", values, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberBetween(String value1, String value2) { + addCriterion("order_number between", value1, value2, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotBetween(String value1, String value2) { + addCriterion("order_number not between", value1, value2, "orderNumber"); + return (Criteria) this; + } + + public Criteria andGoodsRatingIsNull() { + addCriterion("goods_rating is null"); + return (Criteria) this; + } + + public Criteria andGoodsRatingIsNotNull() { + addCriterion("goods_rating is not null"); + return (Criteria) this; + } + + public Criteria andGoodsRatingEqualTo(Integer value) { + addCriterion("goods_rating =", value, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingNotEqualTo(Integer value) { + addCriterion("goods_rating <>", value, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingGreaterThan(Integer value) { + addCriterion("goods_rating >", value, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingGreaterThanOrEqualTo(Integer value) { + addCriterion("goods_rating >=", value, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingLessThan(Integer value) { + addCriterion("goods_rating <", value, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingLessThanOrEqualTo(Integer value) { + addCriterion("goods_rating <=", value, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingIn(List values) { + addCriterion("goods_rating in", values, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingNotIn(List values) { + addCriterion("goods_rating not in", values, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingBetween(Integer value1, Integer value2) { + addCriterion("goods_rating between", value1, value2, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsRatingNotBetween(Integer value1, Integer value2) { + addCriterion("goods_rating not between", value1, value2, "goodsRating"); + return (Criteria) this; + } + + public Criteria andGoodsCommentIsNull() { + addCriterion("goods_comment is null"); + return (Criteria) this; + } + + public Criteria andGoodsCommentIsNotNull() { + addCriterion("goods_comment is not null"); + return (Criteria) this; + } + + public Criteria andGoodsCommentEqualTo(String value) { + addCriterion("goods_comment =", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentNotEqualTo(String value) { + addCriterion("goods_comment <>", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentGreaterThan(String value) { + addCriterion("goods_comment >", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentGreaterThanOrEqualTo(String value) { + addCriterion("goods_comment >=", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentLessThan(String value) { + addCriterion("goods_comment <", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentLessThanOrEqualTo(String value) { + addCriterion("goods_comment <=", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentLike(String value) { + addCriterion("goods_comment like", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentNotLike(String value) { + addCriterion("goods_comment not like", value, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentIn(List values) { + addCriterion("goods_comment in", values, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentNotIn(List values) { + addCriterion("goods_comment not in", values, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentBetween(String value1, String value2) { + addCriterion("goods_comment between", value1, value2, "goodsComment"); + return (Criteria) this; + } + + public Criteria andGoodsCommentNotBetween(String value1, String value2) { + addCriterion("goods_comment not between", value1, value2, "goodsComment"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationIsNull() { + addCriterion("anonymous_evaluation is null"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationIsNotNull() { + addCriterion("anonymous_evaluation is not null"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationEqualTo(Integer value) { + addCriterion("anonymous_evaluation =", value, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationNotEqualTo(Integer value) { + addCriterion("anonymous_evaluation <>", value, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationGreaterThan(Integer value) { + addCriterion("anonymous_evaluation >", value, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationGreaterThanOrEqualTo(Integer value) { + addCriterion("anonymous_evaluation >=", value, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationLessThan(Integer value) { + addCriterion("anonymous_evaluation <", value, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationLessThanOrEqualTo(Integer value) { + addCriterion("anonymous_evaluation <=", value, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationIn(List values) { + addCriterion("anonymous_evaluation in", values, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationNotIn(List values) { + addCriterion("anonymous_evaluation not in", values, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationBetween(Integer value1, Integer value2) { + addCriterion("anonymous_evaluation between", value1, value2, "anonymousEvaluation"); + return (Criteria) this; + } + + public Criteria andAnonymousEvaluationNotBetween(Integer value1, Integer value2) { + addCriterion("anonymous_evaluation not between", value1, value2, "anonymousEvaluation"); + 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 andCommentHierarchyIsNull() { + addCriterion("comment_hierarchy is null"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyIsNotNull() { + addCriterion("comment_hierarchy is not null"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyEqualTo(Integer value) { + addCriterion("comment_hierarchy =", value, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyNotEqualTo(Integer value) { + addCriterion("comment_hierarchy <>", value, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyGreaterThan(Integer value) { + addCriterion("comment_hierarchy >", value, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyGreaterThanOrEqualTo(Integer value) { + addCriterion("comment_hierarchy >=", value, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyLessThan(Integer value) { + addCriterion("comment_hierarchy <", value, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyLessThanOrEqualTo(Integer value) { + addCriterion("comment_hierarchy <=", value, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyIn(List values) { + addCriterion("comment_hierarchy in", values, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyNotIn(List values) { + addCriterion("comment_hierarchy not in", values, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyBetween(Integer value1, Integer value2) { + addCriterion("comment_hierarchy between", value1, value2, "commentHierarchy"); + return (Criteria) this; + } + + public Criteria andCommentHierarchyNotBetween(Integer value1, Integer value2) { + addCriterion("comment_hierarchy not between", value1, value2, "commentHierarchy"); + 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 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 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/entity/StuGoodsOrderInfo.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfo.java new file mode 100644 index 0000000..8876dce --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfo.java @@ -0,0 +1,155 @@ +package com.sztzjy.trade.entity; + +import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; +/** + * 商品订单信息 + * + * @author whb + * stu_goods_order_info + */ +public class StuGoodsOrderInfo { + @ApiModelProperty(notes = "ID") + private Integer id; + + @ApiModelProperty(notes = "订单类型") + private String orderType; + + @ApiModelProperty(notes = "订单编号") + private String orderNumber; + + @ApiModelProperty(notes = "商品ID") + private Integer goodsId; + + @ApiModelProperty(notes = "商品名称") + private String goodsName; + + @ApiModelProperty(notes = "店铺名称") + private String shopName; + + @ApiModelProperty(notes = "收货人") + private String consignee; + + @ApiModelProperty(notes = "下单时间") + private Date orderTime; + + @ApiModelProperty(notes = "商品链接") + private String goodsUrl; + + @ApiModelProperty(notes = "数量") + private Integer number; + + @ApiModelProperty(notes = "收货状态(0未收货 1已收货)") + private Integer receiptStatus; + + @ApiModelProperty(notes = "评论状态(0未评论 1已评论)") + private Integer commentStatus; + + @ApiModelProperty(notes = "用户ID") + private String userId; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getOrderType() { + return orderType; + } + + public void setOrderType(String orderType) { + this.orderType = orderType == null ? null : orderType.trim(); + } + + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber == null ? null : orderNumber.trim(); + } + + public Integer getGoodsId() { + return goodsId; + } + + public void setGoodsId(Integer goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName == null ? null : goodsName.trim(); + } + + public String getShopName() { + return shopName; + } + + public void setShopName(String shopName) { + this.shopName = shopName == null ? null : shopName.trim(); + } + + public String getConsignee() { + return consignee; + } + + public void setConsignee(String consignee) { + this.consignee = consignee == null ? null : consignee.trim(); + } + + public Date getOrderTime() { + return orderTime; + } + + public void setOrderTime(Date orderTime) { + this.orderTime = orderTime; + } + + public String getGoodsUrl() { + return goodsUrl; + } + + public void setGoodsUrl(String goodsUrl) { + this.goodsUrl = goodsUrl == null ? null : goodsUrl.trim(); + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public Integer getReceiptStatus() { + return receiptStatus; + } + + public void setReceiptStatus(Integer receiptStatus) { + this.receiptStatus = receiptStatus; + } + + public Integer getCommentStatus() { + return commentStatus; + } + + public void setCommentStatus(Integer commentStatus) { + this.commentStatus = commentStatus; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java new file mode 100644 index 0000000..679da79 --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java @@ -0,0 +1,1050 @@ +package com.sztzjy.trade.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StuGoodsOrderInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuGoodsOrderInfoExample() { + 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 andOrderTypeIsNull() { + addCriterion("order_type is null"); + return (Criteria) this; + } + + public Criteria andOrderTypeIsNotNull() { + addCriterion("order_type is not null"); + return (Criteria) this; + } + + public Criteria andOrderTypeEqualTo(String value) { + addCriterion("order_type =", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotEqualTo(String value) { + addCriterion("order_type <>", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeGreaterThan(String value) { + addCriterion("order_type >", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeGreaterThanOrEqualTo(String value) { + addCriterion("order_type >=", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeLessThan(String value) { + addCriterion("order_type <", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeLessThanOrEqualTo(String value) { + addCriterion("order_type <=", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeLike(String value) { + addCriterion("order_type like", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotLike(String value) { + addCriterion("order_type not like", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeIn(List values) { + addCriterion("order_type in", values, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotIn(List values) { + addCriterion("order_type not in", values, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeBetween(String value1, String value2) { + addCriterion("order_type between", value1, value2, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotBetween(String value1, String value2) { + addCriterion("order_type not between", value1, value2, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderNumberIsNull() { + addCriterion("order_number is null"); + return (Criteria) this; + } + + public Criteria andOrderNumberIsNotNull() { + addCriterion("order_number is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumberEqualTo(String value) { + addCriterion("order_number =", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotEqualTo(String value) { + addCriterion("order_number <>", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberGreaterThan(String value) { + addCriterion("order_number >", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberGreaterThanOrEqualTo(String value) { + addCriterion("order_number >=", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLessThan(String value) { + addCriterion("order_number <", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLessThanOrEqualTo(String value) { + addCriterion("order_number <=", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLike(String value) { + addCriterion("order_number like", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotLike(String value) { + addCriterion("order_number not like", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberIn(List values) { + addCriterion("order_number in", values, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotIn(List values) { + addCriterion("order_number not in", values, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberBetween(String value1, String value2) { + addCriterion("order_number between", value1, value2, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotBetween(String value1, String value2) { + addCriterion("order_number not between", value1, value2, "orderNumber"); + 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 andGoodsNameIsNull() { + addCriterion("goods_name is null"); + return (Criteria) this; + } + + public Criteria andGoodsNameIsNotNull() { + addCriterion("goods_name is not null"); + return (Criteria) this; + } + + public Criteria andGoodsNameEqualTo(String value) { + addCriterion("goods_name =", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameNotEqualTo(String value) { + addCriterion("goods_name <>", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameGreaterThan(String value) { + addCriterion("goods_name >", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameGreaterThanOrEqualTo(String value) { + addCriterion("goods_name >=", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameLessThan(String value) { + addCriterion("goods_name <", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameLessThanOrEqualTo(String value) { + addCriterion("goods_name <=", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameLike(String value) { + addCriterion("goods_name like", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameNotLike(String value) { + addCriterion("goods_name not like", value, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameIn(List values) { + addCriterion("goods_name in", values, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameNotIn(List values) { + addCriterion("goods_name not in", values, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameBetween(String value1, String value2) { + addCriterion("goods_name between", value1, value2, "goodsName"); + return (Criteria) this; + } + + public Criteria andGoodsNameNotBetween(String value1, String value2) { + addCriterion("goods_name not between", value1, value2, "goodsName"); + return (Criteria) this; + } + + public Criteria andShopNameIsNull() { + addCriterion("shop_name is null"); + return (Criteria) this; + } + + public Criteria andShopNameIsNotNull() { + addCriterion("shop_name is not null"); + return (Criteria) this; + } + + public Criteria andShopNameEqualTo(String value) { + addCriterion("shop_name =", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameNotEqualTo(String value) { + addCriterion("shop_name <>", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameGreaterThan(String value) { + addCriterion("shop_name >", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameGreaterThanOrEqualTo(String value) { + addCriterion("shop_name >=", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameLessThan(String value) { + addCriterion("shop_name <", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameLessThanOrEqualTo(String value) { + addCriterion("shop_name <=", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameLike(String value) { + addCriterion("shop_name like", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameNotLike(String value) { + addCriterion("shop_name not like", value, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameIn(List values) { + addCriterion("shop_name in", values, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameNotIn(List values) { + addCriterion("shop_name not in", values, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameBetween(String value1, String value2) { + addCriterion("shop_name between", value1, value2, "shopName"); + return (Criteria) this; + } + + public Criteria andShopNameNotBetween(String value1, String value2) { + addCriterion("shop_name not between", value1, value2, "shopName"); + return (Criteria) this; + } + + public Criteria andConsigneeIsNull() { + addCriterion("consignee is null"); + return (Criteria) this; + } + + public Criteria andConsigneeIsNotNull() { + addCriterion("consignee is not null"); + return (Criteria) this; + } + + public Criteria andConsigneeEqualTo(String value) { + addCriterion("consignee =", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotEqualTo(String value) { + addCriterion("consignee <>", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeGreaterThan(String value) { + addCriterion("consignee >", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeGreaterThanOrEqualTo(String value) { + addCriterion("consignee >=", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeLessThan(String value) { + addCriterion("consignee <", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeLessThanOrEqualTo(String value) { + addCriterion("consignee <=", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeLike(String value) { + addCriterion("consignee like", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotLike(String value) { + addCriterion("consignee not like", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeIn(List values) { + addCriterion("consignee in", values, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotIn(List values) { + addCriterion("consignee not in", values, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeBetween(String value1, String value2) { + addCriterion("consignee between", value1, value2, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotBetween(String value1, String value2) { + addCriterion("consignee not between", value1, value2, "consignee"); + 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 andGoodsUrlIsNull() { + addCriterion("goods_url is null"); + return (Criteria) this; + } + + public Criteria andGoodsUrlIsNotNull() { + addCriterion("goods_url is not null"); + return (Criteria) this; + } + + public Criteria andGoodsUrlEqualTo(String value) { + addCriterion("goods_url =", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlNotEqualTo(String value) { + addCriterion("goods_url <>", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlGreaterThan(String value) { + addCriterion("goods_url >", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlGreaterThanOrEqualTo(String value) { + addCriterion("goods_url >=", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlLessThan(String value) { + addCriterion("goods_url <", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlLessThanOrEqualTo(String value) { + addCriterion("goods_url <=", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlLike(String value) { + addCriterion("goods_url like", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlNotLike(String value) { + addCriterion("goods_url not like", value, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlIn(List values) { + addCriterion("goods_url in", values, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlNotIn(List values) { + addCriterion("goods_url not in", values, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlBetween(String value1, String value2) { + addCriterion("goods_url between", value1, value2, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andGoodsUrlNotBetween(String value1, String value2) { + addCriterion("goods_url not between", value1, value2, "goodsUrl"); + return (Criteria) this; + } + + public Criteria andNumberIsNull() { + addCriterion("number is null"); + return (Criteria) this; + } + + public Criteria andNumberIsNotNull() { + addCriterion("number is not null"); + return (Criteria) this; + } + + public Criteria andNumberEqualTo(Integer value) { + addCriterion("number =", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotEqualTo(Integer value) { + addCriterion("number <>", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberGreaterThan(Integer value) { + addCriterion("number >", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("number >=", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLessThan(Integer value) { + addCriterion("number <", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLessThanOrEqualTo(Integer value) { + addCriterion("number <=", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberIn(List values) { + addCriterion("number in", values, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotIn(List values) { + addCriterion("number not in", values, "number"); + return (Criteria) this; + } + + public Criteria andNumberBetween(Integer value1, Integer value2) { + addCriterion("number between", value1, value2, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotBetween(Integer value1, Integer value2) { + addCriterion("number not between", value1, value2, "number"); + return (Criteria) this; + } + + public Criteria andReceiptStatusIsNull() { + addCriterion("receipt_status is null"); + return (Criteria) this; + } + + public Criteria andReceiptStatusIsNotNull() { + addCriterion("receipt_status is not null"); + return (Criteria) this; + } + + public Criteria andReceiptStatusEqualTo(Integer value) { + addCriterion("receipt_status =", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusNotEqualTo(Integer value) { + addCriterion("receipt_status <>", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusGreaterThan(Integer value) { + addCriterion("receipt_status >", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("receipt_status >=", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusLessThan(Integer value) { + addCriterion("receipt_status <", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusLessThanOrEqualTo(Integer value) { + addCriterion("receipt_status <=", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusIn(List values) { + addCriterion("receipt_status in", values, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusNotIn(List values) { + addCriterion("receipt_status not in", values, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusBetween(Integer value1, Integer value2) { + addCriterion("receipt_status between", value1, value2, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusNotBetween(Integer value1, Integer value2) { + addCriterion("receipt_status not between", value1, value2, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusIsNull() { + addCriterion("comment_status is null"); + return (Criteria) this; + } + + public Criteria andCommentStatusIsNotNull() { + addCriterion("comment_status is not null"); + return (Criteria) this; + } + + public Criteria andCommentStatusEqualTo(Integer value) { + addCriterion("comment_status =", value, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusNotEqualTo(Integer value) { + addCriterion("comment_status <>", value, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusGreaterThan(Integer value) { + addCriterion("comment_status >", value, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("comment_status >=", value, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusLessThan(Integer value) { + addCriterion("comment_status <", value, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusLessThanOrEqualTo(Integer value) { + addCriterion("comment_status <=", value, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusIn(List values) { + addCriterion("comment_status in", values, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusNotIn(List values) { + addCriterion("comment_status not in", values, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusBetween(Integer value1, Integer value2) { + addCriterion("comment_status between", value1, value2, "commentStatus"); + return (Criteria) this; + } + + public Criteria andCommentStatusNotBetween(Integer value1, Integer value2) { + addCriterion("comment_status not between", value1, value2, "commentStatus"); + 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 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/entity/dto/StuGoodsSalesManageDTO.java b/src/main/java/com/sztzjy/trade/entity/dto/StuGoodsSalesManageDTO.java new file mode 100644 index 0000000..c4c8cdb --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/dto/StuGoodsSalesManageDTO.java @@ -0,0 +1,69 @@ +package com.sztzjy.trade.entity.dto; + +import io.swagger.annotations.ApiModelProperty; + +import java.util.Date; + +/** + * 商品销售管理 + * + * @author whb + * stu_goods_sales_manage + */ +public class StuGoodsSalesManageDTO { + @ApiModelProperty(notes = "ID") + private Integer id; + + @ApiModelProperty(notes = "商品ID") + private Integer goodsId; + + @ApiModelProperty(notes = "商品名称") + private String goodsName; + + @ApiModelProperty(notes = "商品类型") + private String goodsType; + + @ApiModelProperty(notes = "商品小类") + private String goodsSubclass; + + @ApiModelProperty(notes = "上架数量") + private String onlineTotal; + + @ApiModelProperty(notes = "可用库存数量") + private Integer availableInventoryQuantity; + + @ApiModelProperty(notes = "已售数量") + private String soldQuantity; + + @ApiModelProperty(notes = "销售额") + private String salesVolume; + + @ApiModelProperty(notes = "毛利率") + private String grossMargin; + + @ApiModelProperty(notes = "评论数") + private Integer numberOfComments; + + @ApiModelProperty(notes = "点赞数") + private Integer numberOfLikes; + + @ApiModelProperty(notes = "收藏数") + private Integer numberOfCollections; + + @ApiModelProperty(notes = "分享数") + private Integer numberOfShares; + + @ApiModelProperty(notes = "上架时间") + private Date onlineTime; + + @ApiModelProperty(notes = "是否展示(1上架展示 0下架不展示)") + private Integer state; + + @ApiModelProperty(notes = "用户ID") + private String userId; + + @ApiModelProperty(notes = "评论数量") + private Integer commentNumber; + + +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/mapper/StuGoodsCommentInfoMapper.java b/src/main/java/com/sztzjy/trade/mapper/StuGoodsCommentInfoMapper.java new file mode 100644 index 0000000..c79ae9e --- /dev/null +++ b/src/main/java/com/sztzjy/trade/mapper/StuGoodsCommentInfoMapper.java @@ -0,0 +1,36 @@ +package com.sztzjy.trade.mapper; + +import com.sztzjy.trade.entity.StuGoodsCommentInfo; +import com.sztzjy.trade.entity.StuGoodsCommentInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface StuGoodsCommentInfoMapper { + long countByExample(StuGoodsCommentInfoExample example); + + int deleteByExample(StuGoodsCommentInfoExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuGoodsCommentInfo record); + + int insertSelective(StuGoodsCommentInfo record); + + List selectByExampleWithBLOBs(StuGoodsCommentInfoExample example); + + List selectByExample(StuGoodsCommentInfoExample example); + + StuGoodsCommentInfo selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuGoodsCommentInfo record, @Param("example") StuGoodsCommentInfoExample example); + + int updateByExampleWithBLOBs(@Param("record") StuGoodsCommentInfo record, @Param("example") StuGoodsCommentInfoExample example); + + int updateByExample(@Param("record") StuGoodsCommentInfo record, @Param("example") StuGoodsCommentInfoExample example); + + int updateByPrimaryKeySelective(StuGoodsCommentInfo record); + + int updateByPrimaryKeyWithBLOBs(StuGoodsCommentInfo record); + + int updateByPrimaryKey(StuGoodsCommentInfo record); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/mapper/StuGoodsOrderInfoMapper.java b/src/main/java/com/sztzjy/trade/mapper/StuGoodsOrderInfoMapper.java new file mode 100644 index 0000000..d1471c0 --- /dev/null +++ b/src/main/java/com/sztzjy/trade/mapper/StuGoodsOrderInfoMapper.java @@ -0,0 +1,30 @@ +package com.sztzjy.trade.mapper; + +import com.sztzjy.trade.entity.StuGoodsOrderInfo; +import com.sztzjy.trade.entity.StuGoodsOrderInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface StuGoodsOrderInfoMapper { + long countByExample(StuGoodsOrderInfoExample example); + + int deleteByExample(StuGoodsOrderInfoExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuGoodsOrderInfo record); + + int insertSelective(StuGoodsOrderInfo record); + + List selectByExample(StuGoodsOrderInfoExample example); + + StuGoodsOrderInfo selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuGoodsOrderInfo record, @Param("example") StuGoodsOrderInfoExample example); + + int updateByExample(@Param("record") StuGoodsOrderInfo record, @Param("example") StuGoodsOrderInfoExample example); + + int updateByPrimaryKeySelective(StuGoodsOrderInfo record); + + int updateByPrimaryKey(StuGoodsOrderInfo record); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java b/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java index d3da4b8..fc1a4cf 100644 --- a/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java +++ b/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java @@ -30,4 +30,7 @@ public interface StuGoodsTradingCenterService { //购物车数量 ResultEntity getNumberOfShopping(String userId); + + //商品排序 + ResultEntity goodsOrder(String keyword, String userId, Integer index, Integer size,Integer type); } diff --git a/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingCenterServiceImpl.java b/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingCenterServiceImpl.java index 5a31afc..b114109 100644 --- a/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingCenterServiceImpl.java +++ b/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingCenterServiceImpl.java @@ -1,34 +1,27 @@ package com.sztzjy.trade.service.impl; -import com.sztzjy.trade.entity.StuGoodSalesManage; -import com.sztzjy.trade.entity.StuGoodSalesManageExample; -import com.sztzjy.trade.entity.StuGoodsInfo; -import com.sztzjy.trade.entity.StuGoodsInfoExample; -import com.sztzjy.trade.mapper.StuGoodSalesManageMapper; -import com.sztzjy.trade.mapper.StuGoodsInfoMapper; +import com.github.pagehelper.PageHelper; +import com.sztzjy.trade.entity.*; +import com.sztzjy.trade.entity.dto.StuGoodsSalesManageDTO; +import com.sztzjy.trade.mapper.*; import com.github.pagehelper.PageInfo; -import com.sztzjy.trade.entity.StuShoppingCartInfo; -import com.sztzjy.trade.entity.StuShoppingCartInfoExample; -import com.sztzjy.trade.mapper.StuShoppingCartInfoMapper; import com.sztzjy.trade.service.StuGoodsTradingCenterService; import com.sztzjy.trade.util.ResultEntity; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import com.sztzjy.trade.util.PageUtil; import org.springframework.stereotype.Service; -import java.util.Collections; -import java.util.Comparator; +import java.util.*; import javax.annotation.Resource; -import java.util.List; -import java.util.Random; import java.util.stream.Collectors; /** * @author 17803 - * @date 2024-10-28 09:15 * @author tz + * @date 2024-10-28 09:15 * @date 2024/10/28 15:03 */ @Service @@ -42,6 +35,14 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe @Resource StuShoppingCartInfoMapper shoppingCartInfoMapper; + @Autowired + private StuGoodsSalesManageMapper stuGoodsSalesManageMapper; + + @Autowired + private StuGoodsOrderInfoMapper stuGoodsOrderInfoMapper; + + @Autowired + private StuGoodsCommentInfoMapper stuGoodsCommentInfoMapper; //小广告位招租 @Override @@ -59,7 +60,7 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe sorted(Comparator.comparing(StuGoodSalesManage::getSoldQuantity).reversed()) .limit(10) .collect(Collectors.toList()); - return new ResultEntity<>(HttpStatus.OK,manageSaleTenList); + return new ResultEntity<>(HttpStatus.OK, manageSaleTenList); } //内置16个商品以及相关信息,一般不为空 return new ResultEntity<>(HttpStatus.NO_CONTENT); @@ -76,8 +77,8 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe List stuGoodsInfoList = stuGoodsInfoMapper.selectByExample(example); if (stuGoodsInfoList != null && stuGoodsInfoList.size() > 0) { - return new ResultEntity<>(HttpStatus.OK,stuGoodsInfoList); - }else { + return new ResultEntity<>(HttpStatus.OK, stuGoodsInfoList); + } else { return new ResultEntity<>(HttpStatus.NO_CONTENT); } @@ -90,13 +91,13 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe StuGoodsInfoExample example = new StuGoodsInfoExample(); example.createCriteria().andUserIdEqualTo(userId).andOnlineStateEqualTo(1); - if(keyWord!=null && keyWord.length()>0){ - example.createCriteria().andGoodsNameLike("%"+keyWord+"%"); + if (keyWord != null && keyWord.length() > 0) { + example.createCriteria().andGoodsNameLike("%" + keyWord + "%"); } List stuGoodsInfoList = stuGoodsInfoMapper.selectByExample(example); if (stuGoodsInfoList != null && stuGoodsInfoList.size() > 0) { - return new ResultEntity<>(HttpStatus.OK,stuGoodsInfoList); - }else { + return new ResultEntity<>(HttpStatus.OK, stuGoodsInfoList); + } else { return new ResultEntity<>(HttpStatus.NO_CONTENT); } @@ -104,12 +105,12 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe @Override public PageInfo getShoppingCartInfo(String userId, Integer index, Integer size) { - StuShoppingCartInfoExample cartInfoExample=new StuShoppingCartInfoExample(); + StuShoppingCartInfoExample cartInfoExample = new StuShoppingCartInfoExample(); cartInfoExample.createCriteria().andUserIdEqualTo(userId); List stuShoppingCartInfos = shoppingCartInfoMapper.selectByExample(cartInfoExample); - return PageUtil.pageHelper(stuShoppingCartInfos,index,size); + return PageUtil.pageHelper(stuShoppingCartInfos, index, size); } @@ -126,8 +127,8 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe if (goodSalesManageList.size() >= 2) { Collections.shuffle(goodSalesManageList, new Random(System.currentTimeMillis())); List goodSalesManageList1 = goodSalesManageList.subList(0, 2); - return new ResultEntity<>(HttpStatus.OK,goodSalesManageList1); - }else { + return new ResultEntity<>(HttpStatus.OK, goodSalesManageList1); + } else { return new ResultEntity<>(goodSalesManageList); } } @@ -144,13 +145,13 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe StuGoodsInfoExample example = new StuGoodsInfoExample(); example.createCriteria().andUserIdEqualTo(userId).andOnlineStateEqualTo(1); - if(type!=null && type.length()>0){ - example.createCriteria().andGoodsNameLike("%"+type+"%"); + if (type != null && type.length() > 0) { + example.createCriteria().andGoodsNameLike("%" + type + "%"); } List stuGoodsInfoList = stuGoodsInfoMapper.selectByExample(example); if (stuGoodsInfoList != null && stuGoodsInfoList.size() > 0) { - return new ResultEntity<>(HttpStatus.OK,stuGoodsInfoList); - }else { + return new ResultEntity<>(HttpStatus.OK, stuGoodsInfoList); + } else { return new ResultEntity<>(HttpStatus.NO_CONTENT); } @@ -160,19 +161,123 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe @Override public ResultEntity getNumberOfShopping(String userId) { - StuShoppingCartInfoExample cartInfoExample=new StuShoppingCartInfoExample(); + StuShoppingCartInfoExample cartInfoExample = new StuShoppingCartInfoExample(); cartInfoExample.createCriteria().andUserIdEqualTo(userId); List stuShoppingCartInfos = shoppingCartInfoMapper.selectByExample(cartInfoExample); if (stuShoppingCartInfos != null && stuShoppingCartInfos.size() > 0) { - return new ResultEntity(HttpStatus.OK,stuShoppingCartInfos.size()); - }else { - return new ResultEntity<>(HttpStatus.OK,0); + return new ResultEntity(HttpStatus.OK, stuShoppingCartInfos.size()); + } else { + return new ResultEntity<>(HttpStatus.OK, 0); + } + + + } + + //商品排序 + @Override + public ResultEntity goodsOrder(String keyword, String userId, Integer index, Integer size, Integer type) { + //开启分页 + PageHelper.startPage(index, size); + + StuGoodSalesManageExample goodSalesManageExample = new StuGoodSalesManageExample(); + StuGoodSalesManageExample.Criteria criteria = goodSalesManageExample.createCriteria(); + criteria.andUserIdEqualTo(userId).andStateEqualTo(1); + + //倒叙 + + //分页查询 默认每页展示60条商品记录 + //默认综合查询根据,销售数量,评论数,创建时间排序(默认按照综合,从高到低排序) + if (keyword.equals("综合")) { //正序 + String order = ""; + if (type == 1) { + order = "DESC"; + } else { + order = "ASC"; + } + + //查询所有已经上间的商品 按照规格计算并且展示 + + // 查询所有已经上架的商品,按照多个条件排序 + // 拼接排序条件 + String orderByClause = "sold_quantity " + order + ", " + + "number_of_likes " + order + ", " + + "number_of_collections " + order + ", " + + "number_of_shares " + order; + goodSalesManageExample.setOrderByClause(orderByClause); + + //提取出来前25% + } else if (keyword.equals("销量")) { + //销量排序 + if (type == 1) { + + goodSalesManageExample.setOrderByClause("sold_quantity desc"); + } else { + goodSalesManageExample.setOrderByClause("sold_quantity asc"); + } + } else if (keyword.equals("新品")) { + //新品(创建时间) + if (type == 1) { + goodSalesManageExample.setOrderByClause("online_time desc"); + } else { + goodSalesManageExample.setOrderByClause("online_time asc"); + } + } + List goodSalesManageList = stuGoodSalesManageMapper.selectByExample(goodSalesManageExample); + if (goodSalesManageList != null && goodSalesManageList.size() > 0) { + + ////////////////////////////////////////// + if (keyword.equals("评论数")) { + List collect = goodSalesManageList.stream().map(item -> item.getGoodsId()).collect(Collectors.toList()); + + + StuGoodsCommentInfoExample commentInfoExample = new StuGoodsCommentInfoExample(); + commentInfoExample.createCriteria().andUserIdEqualTo(userId); + List stuGoodsCommentInfoList = stuGoodsCommentInfoMapper.selectByExample(commentInfoExample); + if (!stuGoodsCommentInfoList.isEmpty()) + { +// stuGoodsCommentInfoList.stream().map(item -> item.getGoodsId()).co + } + + + + + + + //评论数 查询多个表 + if (type == 1) { + + + } else { + + + } + } else if (keyword.equals("价格")) { + + + //多表查询 + //价格 + if (type == 1) { + + } else { + + } + + } + + + } else { + return new ResultEntity<>(HttpStatus.NO_CONTENT); } + //根据商品订单查询评论层级为0的评价数量 + return null; } + + + } diff --git a/src/main/resources/mappers/StuGoodsCommentInfoMapper.xml b/src/main/resources/mappers/StuGoodsCommentInfoMapper.xml new file mode 100644 index 0000000..ca84e23 --- /dev/null +++ b/src/main/resources/mappers/StuGoodsCommentInfoMapper.xml @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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, order_number, goods_rating, goods_comment, anonymous_evaluation, create_time, + comment_hierarchy, user_id, goods_id + + + image_upload + + + + + + delete from stu_goods_comment_info + where id = #{id,jdbcType=INTEGER} + + + delete from stu_goods_comment_info + + + + + + insert into stu_goods_comment_info (id, order_number, goods_rating, + goods_comment, anonymous_evaluation, create_time, + comment_hierarchy, user_id, goods_id, + image_upload) + values (#{id,jdbcType=INTEGER}, #{orderNumber,jdbcType=VARCHAR}, #{goodsRating,jdbcType=INTEGER}, + #{goodsComment,jdbcType=VARCHAR}, #{anonymousEvaluation,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, + #{commentHierarchy,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{goodsId,jdbcType=INTEGER}, + #{imageUpload,jdbcType=LONGVARCHAR}) + + + insert into stu_goods_comment_info + + + id, + + + order_number, + + + goods_rating, + + + goods_comment, + + + anonymous_evaluation, + + + create_time, + + + comment_hierarchy, + + + user_id, + + + goods_id, + + + image_upload, + + + + + #{id,jdbcType=INTEGER}, + + + #{orderNumber,jdbcType=VARCHAR}, + + + #{goodsRating,jdbcType=INTEGER}, + + + #{goodsComment,jdbcType=VARCHAR}, + + + #{anonymousEvaluation,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{commentHierarchy,jdbcType=INTEGER}, + + + #{userId,jdbcType=VARCHAR}, + + + #{goodsId,jdbcType=INTEGER}, + + + #{imageUpload,jdbcType=LONGVARCHAR}, + + + + + + update stu_goods_comment_info + + + id = #{record.id,jdbcType=INTEGER}, + + + order_number = #{record.orderNumber,jdbcType=VARCHAR}, + + + goods_rating = #{record.goodsRating,jdbcType=INTEGER}, + + + goods_comment = #{record.goodsComment,jdbcType=VARCHAR}, + + + anonymous_evaluation = #{record.anonymousEvaluation,jdbcType=INTEGER}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + goods_id = #{record.goodsId,jdbcType=INTEGER}, + + + image_upload = #{record.imageUpload,jdbcType=LONGVARCHAR}, + + + + + + + + update stu_goods_comment_info + set id = #{record.id,jdbcType=INTEGER}, + order_number = #{record.orderNumber,jdbcType=VARCHAR}, + goods_rating = #{record.goodsRating,jdbcType=INTEGER}, + goods_comment = #{record.goodsComment,jdbcType=VARCHAR}, + anonymous_evaluation = #{record.anonymousEvaluation,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=VARCHAR}, + goods_id = #{record.goodsId,jdbcType=INTEGER}, + image_upload = #{record.imageUpload,jdbcType=LONGVARCHAR} + + + + + + update stu_goods_comment_info + set id = #{record.id,jdbcType=INTEGER}, + order_number = #{record.orderNumber,jdbcType=VARCHAR}, + goods_rating = #{record.goodsRating,jdbcType=INTEGER}, + goods_comment = #{record.goodsComment,jdbcType=VARCHAR}, + anonymous_evaluation = #{record.anonymousEvaluation,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=VARCHAR}, + goods_id = #{record.goodsId,jdbcType=INTEGER} + + + + + + update stu_goods_comment_info + + + order_number = #{orderNumber,jdbcType=VARCHAR}, + + + goods_rating = #{goodsRating,jdbcType=INTEGER}, + + + goods_comment = #{goodsComment,jdbcType=VARCHAR}, + + + anonymous_evaluation = #{anonymousEvaluation,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + goods_id = #{goodsId,jdbcType=INTEGER}, + + + image_upload = #{imageUpload,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update stu_goods_comment_info + set order_number = #{orderNumber,jdbcType=VARCHAR}, + goods_rating = #{goodsRating,jdbcType=INTEGER}, + goods_comment = #{goodsComment,jdbcType=VARCHAR}, + anonymous_evaluation = #{anonymousEvaluation,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER}, + user_id = #{userId,jdbcType=VARCHAR}, + goods_id = #{goodsId,jdbcType=INTEGER}, + image_upload = #{imageUpload,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update stu_goods_comment_info + set order_number = #{orderNumber,jdbcType=VARCHAR}, + goods_rating = #{goodsRating,jdbcType=INTEGER}, + goods_comment = #{goodsComment,jdbcType=VARCHAR}, + anonymous_evaluation = #{anonymousEvaluation,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER}, + user_id = #{userId,jdbcType=VARCHAR}, + goods_id = #{goodsId,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mappers/StuGoodsOrderInfoMapper.xml b/src/main/resources/mappers/StuGoodsOrderInfoMapper.xml new file mode 100644 index 0000000..554ced9 --- /dev/null +++ b/src/main/resources/mappers/StuGoodsOrderInfoMapper.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 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, order_type, order_number, goods_id, goods_name, shop_name, consignee, order_time, + goods_url, number, receipt_status, comment_status, user_id + + + + + delete from stu_goods_order_info + where id = #{id,jdbcType=INTEGER} + + + delete from stu_goods_order_info + + + + + + insert into stu_goods_order_info (id, order_type, order_number, + goods_id, goods_name, shop_name, + consignee, order_time, goods_url, + number, receipt_status, comment_status, + user_id) + values (#{id,jdbcType=INTEGER}, #{orderType,jdbcType=VARCHAR}, #{orderNumber,jdbcType=VARCHAR}, + #{goodsId,jdbcType=INTEGER}, #{goodsName,jdbcType=VARCHAR}, #{shopName,jdbcType=VARCHAR}, + #{consignee,jdbcType=VARCHAR}, #{orderTime,jdbcType=TIMESTAMP}, #{goodsUrl,jdbcType=VARCHAR}, + #{number,jdbcType=INTEGER}, #{receiptStatus,jdbcType=INTEGER}, #{commentStatus,jdbcType=INTEGER}, + #{userId,jdbcType=VARCHAR}) + + + insert into stu_goods_order_info + + + id, + + + order_type, + + + order_number, + + + goods_id, + + + goods_name, + + + shop_name, + + + consignee, + + + order_time, + + + goods_url, + + + number, + + + receipt_status, + + + comment_status, + + + user_id, + + + + + #{id,jdbcType=INTEGER}, + + + #{orderType,jdbcType=VARCHAR}, + + + #{orderNumber,jdbcType=VARCHAR}, + + + #{goodsId,jdbcType=INTEGER}, + + + #{goodsName,jdbcType=VARCHAR}, + + + #{shopName,jdbcType=VARCHAR}, + + + #{consignee,jdbcType=VARCHAR}, + + + #{orderTime,jdbcType=TIMESTAMP}, + + + #{goodsUrl,jdbcType=VARCHAR}, + + + #{number,jdbcType=INTEGER}, + + + #{receiptStatus,jdbcType=INTEGER}, + + + #{commentStatus,jdbcType=INTEGER}, + + + #{userId,jdbcType=VARCHAR}, + + + + + + update stu_goods_order_info + + + id = #{record.id,jdbcType=INTEGER}, + + + order_type = #{record.orderType,jdbcType=VARCHAR}, + + + order_number = #{record.orderNumber,jdbcType=VARCHAR}, + + + goods_id = #{record.goodsId,jdbcType=INTEGER}, + + + goods_name = #{record.goodsName,jdbcType=VARCHAR}, + + + shop_name = #{record.shopName,jdbcType=VARCHAR}, + + + consignee = #{record.consignee,jdbcType=VARCHAR}, + + + order_time = #{record.orderTime,jdbcType=TIMESTAMP}, + + + goods_url = #{record.goodsUrl,jdbcType=VARCHAR}, + + + number = #{record.number,jdbcType=INTEGER}, + + + receipt_status = #{record.receiptStatus,jdbcType=INTEGER}, + + + comment_status = #{record.commentStatus,jdbcType=INTEGER}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + + + + + + update stu_goods_order_info + set id = #{record.id,jdbcType=INTEGER}, + order_type = #{record.orderType,jdbcType=VARCHAR}, + order_number = #{record.orderNumber,jdbcType=VARCHAR}, + goods_id = #{record.goodsId,jdbcType=INTEGER}, + goods_name = #{record.goodsName,jdbcType=VARCHAR}, + shop_name = #{record.shopName,jdbcType=VARCHAR}, + consignee = #{record.consignee,jdbcType=VARCHAR}, + order_time = #{record.orderTime,jdbcType=TIMESTAMP}, + goods_url = #{record.goodsUrl,jdbcType=VARCHAR}, + number = #{record.number,jdbcType=INTEGER}, + receipt_status = #{record.receiptStatus,jdbcType=INTEGER}, + comment_status = #{record.commentStatus,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=VARCHAR} + + + + + + update stu_goods_order_info + + + order_type = #{orderType,jdbcType=VARCHAR}, + + + order_number = #{orderNumber,jdbcType=VARCHAR}, + + + goods_id = #{goodsId,jdbcType=INTEGER}, + + + goods_name = #{goodsName,jdbcType=VARCHAR}, + + + shop_name = #{shopName,jdbcType=VARCHAR}, + + + consignee = #{consignee,jdbcType=VARCHAR}, + + + order_time = #{orderTime,jdbcType=TIMESTAMP}, + + + goods_url = #{goodsUrl,jdbcType=VARCHAR}, + + + number = #{number,jdbcType=INTEGER}, + + + receipt_status = #{receiptStatus,jdbcType=INTEGER}, + + + comment_status = #{commentStatus,jdbcType=INTEGER}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update stu_goods_order_info + set order_type = #{orderType,jdbcType=VARCHAR}, + order_number = #{orderNumber,jdbcType=VARCHAR}, + goods_id = #{goodsId,jdbcType=INTEGER}, + goods_name = #{goodsName,jdbcType=VARCHAR}, + shop_name = #{shopName,jdbcType=VARCHAR}, + consignee = #{consignee,jdbcType=VARCHAR}, + order_time = #{orderTime,jdbcType=TIMESTAMP}, + goods_url = #{goodsUrl,jdbcType=VARCHAR}, + number = #{number,jdbcType=INTEGER}, + receipt_status = #{receiptStatus,jdbcType=INTEGER}, + comment_status = #{commentStatus,jdbcType=INTEGER}, + user_id = #{userId,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file