From 31017f2e636adfb32bcd7ce7e317d5039ac96779 Mon Sep 17 00:00:00 2001 From: "@t2652009480" <2652009480@qq.com> Date: Fri, 8 Nov 2024 08:54:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8D=81=E4=BA=8C=EF=BC=9A?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E8=90=A5=E9=94=80=E6=89=80=E6=9C=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/sztzjy/trade/config/Constant.java | 4 + .../StuGoodsMarketingCenterController.java | 66 +- .../stu/StuGoodsTradingCenterController.java | 21 +- .../trade/entity/StuGoodsOrderInfo.java | 11 + .../entity/StuGoodsOrderInfoExample.java | 70 + .../trade/entity/StuGoodsShareInfo.java | 254 +++ .../entity/StuGoodsShareInfoExample.java | 1500 +++++++++++++++++ .../trade/entity/StuTradeAccountInfo.java | 78 +- .../entity/StuTradeAccountInfoExample.java | 396 ++--- .../trade/entity/dto/StuGoodThingsDTO.java | 23 + .../trade/entity/dto/StuGoodsShareDTO.java | 38 + .../trade/mapper/StuGoodsShareInfoMapper.java | 38 + .../StuGoodsMarketingCenterService.java | 25 + .../StuGoodsMarketingCenterServiceImpl.java | 281 +++ .../service/StuGoodsTradingCenterService.java | 6 +- .../StuGoodsTradingCenterServiceImpl.java | 43 +- .../mappers/StuGoodsOrderInfoMapper.xml | 351 +++- .../mappers/StuGoodsShareInfoMapper.xml | 542 ++++++ .../mappers/StuTradeAccountInfoMapper.xml | 121 +- 19 files changed, 3436 insertions(+), 432 deletions(-) create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfo.java create mode 100644 src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfoExample.java create mode 100644 src/main/java/com/sztzjy/trade/entity/dto/StuGoodThingsDTO.java create mode 100644 src/main/java/com/sztzjy/trade/entity/dto/StuGoodsShareDTO.java create mode 100644 src/main/java/com/sztzjy/trade/mapper/StuGoodsShareInfoMapper.java create mode 100644 src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterService.java create mode 100644 src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterServiceImpl.java create mode 100644 src/main/resources/mappers/StuGoodsShareInfoMapper.xml diff --git a/src/main/java/com/sztzjy/trade/config/Constant.java b/src/main/java/com/sztzjy/trade/config/Constant.java index 8ca2c6b..7114d6d 100644 --- a/src/main/java/com/sztzjy/trade/config/Constant.java +++ b/src/main/java/com/sztzjy/trade/config/Constant.java @@ -18,6 +18,10 @@ public class Constant { public static final String DANDUGOUMAI = "单独购买"; public static final String PINDUANGOUMAI = "我要开团"; + public static final String COMMENT_NUMBER="评论数"; + + public static final String BROWSE_NUMBER="被浏览数"; + diff --git a/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsMarketingCenterController.java b/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsMarketingCenterController.java index aeddadb..35d3302 100644 --- a/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsMarketingCenterController.java +++ b/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsMarketingCenterController.java @@ -1,8 +1,18 @@ package com.sztzjy.trade.controller.stu; +import com.sztzjy.trade.annotation.AnonymousAccess; +import com.sztzjy.trade.entity.dto.StuGoodThingsDTO; +import com.sztzjy.trade.service.StuGoodsMarketingCenterService; +import com.sztzjy.trade.util.ResultEntity; import io.swagger.annotations.Api; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.util.List; /** * @author tz @@ -12,4 +22,56 @@ import org.springframework.web.bind.annotation.RestController; @RestController @Api(tags = "商品营销中心") public class StuGoodsMarketingCenterController { + @Resource + StuGoodsMarketingCenterService marketingCenterService; + + @ApiOperation("分享营销展示(包含排序)") + @PostMapping("/getShareMarketing") + @AnonymousAccess + public ResultEntity getShareMarketing(@ApiParam("当前页") Integer index, + @ApiParam("每页条数") Integer size, + @ApiParam("排序条件(评论数/被浏览数)") @RequestParam(required = false) String sortType, + @ApiParam("商品类型") @RequestParam(required = false) String goodsType, + @ApiParam("降序:1,升序:0")Integer type) { + + return new ResultEntity(HttpStatus.OK, "分享营销展示", marketingCenterService.getShareMarketing(index, size, sortType, goodsType,type)); + } + + @ApiOperation("新增分享-订单回显") + @GetMapping("/getOrderInfo") + @AnonymousAccess + public ResultEntity getOrderInfo(String userId){ + + return new ResultEntity(HttpStatus.OK,"订单回显",marketingCenterService.getOrderInfo(userId)); + } + + @ApiOperation("好物分享") + @PostMapping("/add") + @AnonymousAccess + public ResultEntity add(@RequestBody StuGoodThingsDTO stuGoodThingsDTO, + @RequestParam(required = false) List files){ + + Integer result=marketingCenterService.add(stuGoodThingsDTO,files); + if(result>0){ + return new ResultEntity(HttpStatus.OK,"好物分享成功"); + }else { + return new ResultEntity(HttpStatus.ACCEPTED,"好物分享失败,请联系管理员"); + } + } + + + @ApiOperation("浏览/点赞/评论") + @PostMapping("/operate") + @AnonymousAccess + public ResultEntity operate(@ApiParam("分享ID") Integer id, + @ApiParam("用户ID") String userId, + @ApiParam("操作类型(浏览/点赞/评论)") String operateType, + @ApiParam("评论内容(点赞/浏览不传)")@RequestParam(required = false) String content ){ + + Integer result=marketingCenterService.operate(id,userId,operateType,content); + + if(result>1){return new ResultEntity(HttpStatus.OK,operateType+"成功");} + + else {return new ResultEntity(HttpStatus.OK,operateType+"失败,请联系管理员");} + } } 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 e9fd7b1..59cb867 100644 --- a/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java +++ b/src/main/java/com/sztzjy/trade/controller/stu/StuGoodsTradingCenterController.java @@ -176,10 +176,11 @@ public class StuGoodsTradingCenterController { @ApiOperation("订单评价") @PostMapping("/orderEvaluation") @AnonymousAccess - public ResultEntity orderEvaluation(@RequestBody StuGoodsCommentInfo commentInfo, + public ResultEntity orderEvaluation(@ApiParam("订单ID") Integer orderId, + @RequestBody StuGoodsCommentInfo commentInfo, @RequestParam List files){ - Integer result = tradingCenterService.orderEvaluation(commentInfo, files); + Integer result = tradingCenterService.orderEvaluation(orderId,commentInfo, files); if(result>0){ return new ResultEntity(HttpStatus.OK,"订单评价成功"); }else { @@ -268,14 +269,14 @@ public class StuGoodsTradingCenterController { - @ApiOperation("商品详情页面:商品评价") - @AnonymousAccess - @GetMapping("/evaluate") - public ResultEntity getEvaluateByGoodsId(@ApiParam("商品ID") Integer goodsId) { - - return stuGoodsTradingOrderService.getEvaluateByGoodsId(goodsId); - - } +// @ApiOperation("商品详情页面:商品评价") +// @AnonymousAccess +// @GetMapping("/evaluate") +// public ResultEntity getEvaluateByGoodsId(@ApiParam("商品ID") Integer goodsId) { +// +// return stuGoodsTradingOrderService.getEvaluateByGoodsId(goodsId); +// +// } @ApiOperation("商品详情页面:商品评价分页展示") diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfo.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfo.java index 6b4ce68..15a3997 100644 --- a/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfo.java +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfo.java @@ -28,6 +28,9 @@ public class StuGoodsOrderInfo { @ApiModelProperty(notes = "商品名称") private String goodsName; + @ApiModelProperty(notes = "商品图片") + private String goodsImg; + @ApiModelProperty(notes = "店铺名称") private String shopName; @@ -94,6 +97,14 @@ public class StuGoodsOrderInfo { this.goodsName = goodsName == null ? null : goodsName.trim(); } + public String getGoodsImg() { + return goodsImg; + } + + public void setGoodsImg(String goodsImg) { + this.goodsImg = goodsImg == null ? null : goodsImg.trim(); + } + public String getShopName() { return shopName; } diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java index 679da79..5d02512 100644 --- a/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsOrderInfoExample.java @@ -435,6 +435,76 @@ public class StuGoodsOrderInfoExample { return (Criteria) this; } + public Criteria andGoodsImgIsNull() { + addCriterion("goods_img is null"); + return (Criteria) this; + } + + public Criteria andGoodsImgIsNotNull() { + addCriterion("goods_img is not null"); + return (Criteria) this; + } + + public Criteria andGoodsImgEqualTo(String value) { + addCriterion("goods_img =", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotEqualTo(String value) { + addCriterion("goods_img <>", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgGreaterThan(String value) { + addCriterion("goods_img >", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgGreaterThanOrEqualTo(String value) { + addCriterion("goods_img >=", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgLessThan(String value) { + addCriterion("goods_img <", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgLessThanOrEqualTo(String value) { + addCriterion("goods_img <=", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgLike(String value) { + addCriterion("goods_img like", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotLike(String value) { + addCriterion("goods_img not like", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgIn(List values) { + addCriterion("goods_img in", values, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotIn(List values) { + addCriterion("goods_img not in", values, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgBetween(String value1, String value2) { + addCriterion("goods_img between", value1, value2, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotBetween(String value1, String value2) { + addCriterion("goods_img not between", value1, value2, "goodsImg"); + return (Criteria) this; + } + public Criteria andShopNameIsNull() { addCriterion("shop_name is null"); return (Criteria) this; diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfo.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfo.java new file mode 100644 index 0000000..f86258b --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfo.java @@ -0,0 +1,254 @@ +package com.sztzjy.trade.entity; + +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.sztzjy.trade.entity.dto.StuGoodsShareDTO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * + * @author whb + * stu_goods_share_info + */ +@Data +public class StuGoodsShareInfo { + @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 goodsImg; + + @ApiModelProperty(notes = "分享者名称") + private String sharerName; + + @ApiModelProperty(notes = "分享者头像") + private String sharerProfile; + + @ApiModelProperty(notes = "评论时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + private Date commentTime; + + @ApiModelProperty(notes = "评论内容") + private String commentContent; + + @ApiModelProperty(notes = "评论的图片或视频(逗号隔开)") + private String commentFile; + + @ApiModelProperty(notes = "综合得分") + private String comprehensiveScore; + + @ApiModelProperty(notes = "商品链接") + private String goodsUrl; + + @ApiModelProperty(notes = "被浏览次数") + private Integer browseNumber; + + @ApiModelProperty(notes = "被评论次数") + private Integer commentNumber; + + @ApiModelProperty(notes = "点赞次数 (默认为0 未点赞)") + private Integer giveTheThumbsUp; + + @ApiModelProperty(notes = "用户ID") + private String userId; + + @ApiModelProperty(notes = "关注数") + private Integer attentionNumber; + + @ApiModelProperty(notes = "粉丝数") + private Integer fansNumber; + + @ApiModelProperty(notes = "评论ID") + private Integer commentId; + + @ApiModelProperty(notes = "评论层级(默认为0)") + private Integer commentHierarchy; + + @ApiModelProperty(notes = "规格与包装") + private String specificationPackaging; + + @ApiModelProperty(notes = "评论集") + private List shareDTOS; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + 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 getGoodsType() { + return goodsType; + } + + public void setGoodsType(String goodsType) { + this.goodsType = goodsType == null ? null : goodsType.trim(); + } + + public String getGoodsImg() { + return goodsImg; + } + + public void setGoodsImg(String goodsImg) { + this.goodsImg = goodsImg == null ? null : goodsImg.trim(); + } + + public String getSharerName() { + return sharerName; + } + + public void setSharerName(String sharerName) { + this.sharerName = sharerName == null ? null : sharerName.trim(); + } + + public String getSharerProfile() { + return sharerProfile; + } + + public void setSharerProfile(String sharerProfile) { + this.sharerProfile = sharerProfile == null ? null : sharerProfile.trim(); + } + + public Date getCommentTime() { + return commentTime; + } + + public void setCommentTime(Date commentTime) { + this.commentTime = commentTime; + } + + public String getCommentContent() { + return commentContent; + } + + public void setCommentContent(String commentContent) { + this.commentContent = commentContent == null ? null : commentContent.trim(); + } + + public String getCommentFile() { + return commentFile; + } + + public void setCommentFile(String commentFile) { + this.commentFile = commentFile == null ? null : commentFile.trim(); + } + + public String getComprehensiveScore() { + return comprehensiveScore; + } + + public void setComprehensiveScore(String comprehensiveScore) { + this.comprehensiveScore = comprehensiveScore == null ? null : comprehensiveScore.trim(); + } + + public String getGoodsUrl() { + return goodsUrl; + } + + public void setGoodsUrl(String goodsUrl) { + this.goodsUrl = goodsUrl == null ? null : goodsUrl.trim(); + } + + public Integer getBrowseNumber() { + return browseNumber; + } + + public void setBrowseNumber(Integer browseNumber) { + this.browseNumber = browseNumber; + } + + public Integer getCommentNumber() { + return commentNumber; + } + + public void setCommentNumber(Integer commentNumber) { + this.commentNumber = commentNumber; + } + + public Integer getGiveTheThumbsUp() { + return giveTheThumbsUp; + } + + public void setGiveTheThumbsUp(Integer giveTheThumbsUp) { + this.giveTheThumbsUp = giveTheThumbsUp; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId == null ? null : userId.trim(); + } + + public Integer getAttentionNumber() { + return attentionNumber; + } + + public void setAttentionNumber(Integer attentionNumber) { + this.attentionNumber = attentionNumber; + } + + public Integer getFansNumber() { + return fansNumber; + } + + public void setFansNumber(Integer fansNumber) { + this.fansNumber = fansNumber; + } + + public Integer getCommentId() { + return commentId; + } + + public void setCommentId(Integer commentId) { + this.commentId = commentId; + } + + public Integer getCommentHierarchy() { + return commentHierarchy; + } + + public void setCommentHierarchy(Integer commentHierarchy) { + this.commentHierarchy = commentHierarchy; + } + + public String getSpecificationPackaging() { + return specificationPackaging; + } + + public void setSpecificationPackaging(String specificationPackaging) { + this.specificationPackaging = specificationPackaging == null ? null : specificationPackaging.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfoExample.java b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfoExample.java new file mode 100644 index 0000000..5a25494 --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/StuGoodsShareInfoExample.java @@ -0,0 +1,1500 @@ +package com.sztzjy.trade.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StuGoodsShareInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StuGoodsShareInfoExample() { + 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 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 andGoodsTypeIsNull() { + addCriterion("goods_type is null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeIsNotNull() { + addCriterion("goods_type is not null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeEqualTo(String value) { + addCriterion("goods_type =", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotEqualTo(String value) { + addCriterion("goods_type <>", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeGreaterThan(String value) { + addCriterion("goods_type >", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeGreaterThanOrEqualTo(String value) { + addCriterion("goods_type >=", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeLessThan(String value) { + addCriterion("goods_type <", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeLessThanOrEqualTo(String value) { + addCriterion("goods_type <=", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeLike(String value) { + addCriterion("goods_type like", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotLike(String value) { + addCriterion("goods_type not like", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeIn(List values) { + addCriterion("goods_type in", values, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotIn(List values) { + addCriterion("goods_type not in", values, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeBetween(String value1, String value2) { + addCriterion("goods_type between", value1, value2, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotBetween(String value1, String value2) { + addCriterion("goods_type not between", value1, value2, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsImgIsNull() { + addCriterion("goods_img is null"); + return (Criteria) this; + } + + public Criteria andGoodsImgIsNotNull() { + addCriterion("goods_img is not null"); + return (Criteria) this; + } + + public Criteria andGoodsImgEqualTo(String value) { + addCriterion("goods_img =", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotEqualTo(String value) { + addCriterion("goods_img <>", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgGreaterThan(String value) { + addCriterion("goods_img >", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgGreaterThanOrEqualTo(String value) { + addCriterion("goods_img >=", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgLessThan(String value) { + addCriterion("goods_img <", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgLessThanOrEqualTo(String value) { + addCriterion("goods_img <=", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgLike(String value) { + addCriterion("goods_img like", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotLike(String value) { + addCriterion("goods_img not like", value, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgIn(List values) { + addCriterion("goods_img in", values, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotIn(List values) { + addCriterion("goods_img not in", values, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgBetween(String value1, String value2) { + addCriterion("goods_img between", value1, value2, "goodsImg"); + return (Criteria) this; + } + + public Criteria andGoodsImgNotBetween(String value1, String value2) { + addCriterion("goods_img not between", value1, value2, "goodsImg"); + return (Criteria) this; + } + + public Criteria andSharerNameIsNull() { + addCriterion("sharer_name is null"); + return (Criteria) this; + } + + public Criteria andSharerNameIsNotNull() { + addCriterion("sharer_name is not null"); + return (Criteria) this; + } + + public Criteria andSharerNameEqualTo(String value) { + addCriterion("sharer_name =", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameNotEqualTo(String value) { + addCriterion("sharer_name <>", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameGreaterThan(String value) { + addCriterion("sharer_name >", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameGreaterThanOrEqualTo(String value) { + addCriterion("sharer_name >=", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameLessThan(String value) { + addCriterion("sharer_name <", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameLessThanOrEqualTo(String value) { + addCriterion("sharer_name <=", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameLike(String value) { + addCriterion("sharer_name like", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameNotLike(String value) { + addCriterion("sharer_name not like", value, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameIn(List values) { + addCriterion("sharer_name in", values, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameNotIn(List values) { + addCriterion("sharer_name not in", values, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameBetween(String value1, String value2) { + addCriterion("sharer_name between", value1, value2, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerNameNotBetween(String value1, String value2) { + addCriterion("sharer_name not between", value1, value2, "sharerName"); + return (Criteria) this; + } + + public Criteria andSharerProfileIsNull() { + addCriterion("sharer_profile is null"); + return (Criteria) this; + } + + public Criteria andSharerProfileIsNotNull() { + addCriterion("sharer_profile is not null"); + return (Criteria) this; + } + + public Criteria andSharerProfileEqualTo(String value) { + addCriterion("sharer_profile =", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotEqualTo(String value) { + addCriterion("sharer_profile <>", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileGreaterThan(String value) { + addCriterion("sharer_profile >", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileGreaterThanOrEqualTo(String value) { + addCriterion("sharer_profile >=", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileLessThan(String value) { + addCriterion("sharer_profile <", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileLessThanOrEqualTo(String value) { + addCriterion("sharer_profile <=", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileLike(String value) { + addCriterion("sharer_profile like", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotLike(String value) { + addCriterion("sharer_profile not like", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileIn(List values) { + addCriterion("sharer_profile in", values, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotIn(List values) { + addCriterion("sharer_profile not in", values, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileBetween(String value1, String value2) { + addCriterion("sharer_profile between", value1, value2, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotBetween(String value1, String value2) { + addCriterion("sharer_profile not between", value1, value2, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andCommentTimeIsNull() { + addCriterion("comment_time is null"); + return (Criteria) this; + } + + public Criteria andCommentTimeIsNotNull() { + addCriterion("comment_time is not null"); + return (Criteria) this; + } + + public Criteria andCommentTimeEqualTo(Date value) { + addCriterion("comment_time =", value, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeNotEqualTo(Date value) { + addCriterion("comment_time <>", value, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeGreaterThan(Date value) { + addCriterion("comment_time >", value, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeGreaterThanOrEqualTo(Date value) { + addCriterion("comment_time >=", value, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeLessThan(Date value) { + addCriterion("comment_time <", value, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeLessThanOrEqualTo(Date value) { + addCriterion("comment_time <=", value, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeIn(List values) { + addCriterion("comment_time in", values, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeNotIn(List values) { + addCriterion("comment_time not in", values, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeBetween(Date value1, Date value2) { + addCriterion("comment_time between", value1, value2, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentTimeNotBetween(Date value1, Date value2) { + addCriterion("comment_time not between", value1, value2, "commentTime"); + return (Criteria) this; + } + + public Criteria andCommentContentIsNull() { + addCriterion("comment_content is null"); + return (Criteria) this; + } + + public Criteria andCommentContentIsNotNull() { + addCriterion("comment_content is not null"); + return (Criteria) this; + } + + public Criteria andCommentContentEqualTo(String value) { + addCriterion("comment_content =", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentNotEqualTo(String value) { + addCriterion("comment_content <>", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentGreaterThan(String value) { + addCriterion("comment_content >", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentGreaterThanOrEqualTo(String value) { + addCriterion("comment_content >=", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentLessThan(String value) { + addCriterion("comment_content <", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentLessThanOrEqualTo(String value) { + addCriterion("comment_content <=", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentLike(String value) { + addCriterion("comment_content like", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentNotLike(String value) { + addCriterion("comment_content not like", value, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentIn(List values) { + addCriterion("comment_content in", values, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentNotIn(List values) { + addCriterion("comment_content not in", values, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentBetween(String value1, String value2) { + addCriterion("comment_content between", value1, value2, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentContentNotBetween(String value1, String value2) { + addCriterion("comment_content not between", value1, value2, "commentContent"); + return (Criteria) this; + } + + public Criteria andCommentFileIsNull() { + addCriterion("comment_file is null"); + return (Criteria) this; + } + + public Criteria andCommentFileIsNotNull() { + addCriterion("comment_file is not null"); + return (Criteria) this; + } + + public Criteria andCommentFileEqualTo(String value) { + addCriterion("comment_file =", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileNotEqualTo(String value) { + addCriterion("comment_file <>", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileGreaterThan(String value) { + addCriterion("comment_file >", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileGreaterThanOrEqualTo(String value) { + addCriterion("comment_file >=", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileLessThan(String value) { + addCriterion("comment_file <", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileLessThanOrEqualTo(String value) { + addCriterion("comment_file <=", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileLike(String value) { + addCriterion("comment_file like", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileNotLike(String value) { + addCriterion("comment_file not like", value, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileIn(List values) { + addCriterion("comment_file in", values, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileNotIn(List values) { + addCriterion("comment_file not in", values, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileBetween(String value1, String value2) { + addCriterion("comment_file between", value1, value2, "commentFile"); + return (Criteria) this; + } + + public Criteria andCommentFileNotBetween(String value1, String value2) { + addCriterion("comment_file not between", value1, value2, "commentFile"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreIsNull() { + addCriterion("comprehensive_score is null"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreIsNotNull() { + addCriterion("comprehensive_score is not null"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreEqualTo(String value) { + addCriterion("comprehensive_score =", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreNotEqualTo(String value) { + addCriterion("comprehensive_score <>", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreGreaterThan(String value) { + addCriterion("comprehensive_score >", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreGreaterThanOrEqualTo(String value) { + addCriterion("comprehensive_score >=", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreLessThan(String value) { + addCriterion("comprehensive_score <", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreLessThanOrEqualTo(String value) { + addCriterion("comprehensive_score <=", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreLike(String value) { + addCriterion("comprehensive_score like", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreNotLike(String value) { + addCriterion("comprehensive_score not like", value, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreIn(List values) { + addCriterion("comprehensive_score in", values, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreNotIn(List values) { + addCriterion("comprehensive_score not in", values, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreBetween(String value1, String value2) { + addCriterion("comprehensive_score between", value1, value2, "comprehensiveScore"); + return (Criteria) this; + } + + public Criteria andComprehensiveScoreNotBetween(String value1, String value2) { + addCriterion("comprehensive_score not between", value1, value2, "comprehensiveScore"); + 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 andBrowseNumberIsNull() { + addCriterion("browse_number is null"); + return (Criteria) this; + } + + public Criteria andBrowseNumberIsNotNull() { + addCriterion("browse_number is not null"); + return (Criteria) this; + } + + public Criteria andBrowseNumberEqualTo(Integer value) { + addCriterion("browse_number =", value, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberNotEqualTo(Integer value) { + addCriterion("browse_number <>", value, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberGreaterThan(Integer value) { + addCriterion("browse_number >", value, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("browse_number >=", value, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberLessThan(Integer value) { + addCriterion("browse_number <", value, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberLessThanOrEqualTo(Integer value) { + addCriterion("browse_number <=", value, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberIn(List values) { + addCriterion("browse_number in", values, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberNotIn(List values) { + addCriterion("browse_number not in", values, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberBetween(Integer value1, Integer value2) { + addCriterion("browse_number between", value1, value2, "browseNumber"); + return (Criteria) this; + } + + public Criteria andBrowseNumberNotBetween(Integer value1, Integer value2) { + addCriterion("browse_number not between", value1, value2, "browseNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberIsNull() { + addCriterion("comment_number is null"); + return (Criteria) this; + } + + public Criteria andCommentNumberIsNotNull() { + addCriterion("comment_number is not null"); + return (Criteria) this; + } + + public Criteria andCommentNumberEqualTo(Integer value) { + addCriterion("comment_number =", value, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberNotEqualTo(Integer value) { + addCriterion("comment_number <>", value, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberGreaterThan(Integer value) { + addCriterion("comment_number >", value, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("comment_number >=", value, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberLessThan(Integer value) { + addCriterion("comment_number <", value, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberLessThanOrEqualTo(Integer value) { + addCriterion("comment_number <=", value, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberIn(List values) { + addCriterion("comment_number in", values, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberNotIn(List values) { + addCriterion("comment_number not in", values, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberBetween(Integer value1, Integer value2) { + addCriterion("comment_number between", value1, value2, "commentNumber"); + return (Criteria) this; + } + + public Criteria andCommentNumberNotBetween(Integer value1, Integer value2) { + addCriterion("comment_number not between", value1, value2, "commentNumber"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpIsNull() { + addCriterion("give_the_thumbs_up is null"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpIsNotNull() { + addCriterion("give_the_thumbs_up is not null"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpEqualTo(Integer value) { + addCriterion("give_the_thumbs_up =", value, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpNotEqualTo(Integer value) { + addCriterion("give_the_thumbs_up <>", value, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpGreaterThan(Integer value) { + addCriterion("give_the_thumbs_up >", value, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpGreaterThanOrEqualTo(Integer value) { + addCriterion("give_the_thumbs_up >=", value, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpLessThan(Integer value) { + addCriterion("give_the_thumbs_up <", value, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpLessThanOrEqualTo(Integer value) { + addCriterion("give_the_thumbs_up <=", value, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpIn(List values) { + addCriterion("give_the_thumbs_up in", values, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpNotIn(List values) { + addCriterion("give_the_thumbs_up not in", values, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpBetween(Integer value1, Integer value2) { + addCriterion("give_the_thumbs_up between", value1, value2, "giveTheThumbsUp"); + return (Criteria) this; + } + + public Criteria andGiveTheThumbsUpNotBetween(Integer value1, Integer value2) { + addCriterion("give_the_thumbs_up not between", value1, value2, "giveTheThumbsUp"); + 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 andAttentionNumberIsNull() { + addCriterion("attention_number is null"); + return (Criteria) this; + } + + public Criteria andAttentionNumberIsNotNull() { + addCriterion("attention_number is not null"); + return (Criteria) this; + } + + public Criteria andAttentionNumberEqualTo(Integer value) { + addCriterion("attention_number =", value, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberNotEqualTo(Integer value) { + addCriterion("attention_number <>", value, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberGreaterThan(Integer value) { + addCriterion("attention_number >", value, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("attention_number >=", value, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberLessThan(Integer value) { + addCriterion("attention_number <", value, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberLessThanOrEqualTo(Integer value) { + addCriterion("attention_number <=", value, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberIn(List values) { + addCriterion("attention_number in", values, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberNotIn(List values) { + addCriterion("attention_number not in", values, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberBetween(Integer value1, Integer value2) { + addCriterion("attention_number between", value1, value2, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andAttentionNumberNotBetween(Integer value1, Integer value2) { + addCriterion("attention_number not between", value1, value2, "attentionNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberIsNull() { + addCriterion("fans_number is null"); + return (Criteria) this; + } + + public Criteria andFansNumberIsNotNull() { + addCriterion("fans_number is not null"); + return (Criteria) this; + } + + public Criteria andFansNumberEqualTo(Integer value) { + addCriterion("fans_number =", value, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberNotEqualTo(Integer value) { + addCriterion("fans_number <>", value, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberGreaterThan(Integer value) { + addCriterion("fans_number >", value, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("fans_number >=", value, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberLessThan(Integer value) { + addCriterion("fans_number <", value, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberLessThanOrEqualTo(Integer value) { + addCriterion("fans_number <=", value, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberIn(List values) { + addCriterion("fans_number in", values, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberNotIn(List values) { + addCriterion("fans_number not in", values, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberBetween(Integer value1, Integer value2) { + addCriterion("fans_number between", value1, value2, "fansNumber"); + return (Criteria) this; + } + + public Criteria andFansNumberNotBetween(Integer value1, Integer value2) { + addCriterion("fans_number not between", value1, value2, "fansNumber"); + return (Criteria) this; + } + + public Criteria andCommentIdIsNull() { + addCriterion("comment_id is null"); + return (Criteria) this; + } + + public Criteria andCommentIdIsNotNull() { + addCriterion("comment_id is not null"); + return (Criteria) this; + } + + public Criteria andCommentIdEqualTo(Integer value) { + addCriterion("comment_id =", value, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdNotEqualTo(Integer value) { + addCriterion("comment_id <>", value, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdGreaterThan(Integer value) { + addCriterion("comment_id >", value, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdGreaterThanOrEqualTo(Integer value) { + addCriterion("comment_id >=", value, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdLessThan(Integer value) { + addCriterion("comment_id <", value, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdLessThanOrEqualTo(Integer value) { + addCriterion("comment_id <=", value, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdIn(List values) { + addCriterion("comment_id in", values, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdNotIn(List values) { + addCriterion("comment_id not in", values, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdBetween(Integer value1, Integer value2) { + addCriterion("comment_id between", value1, value2, "commentId"); + return (Criteria) this; + } + + public Criteria andCommentIdNotBetween(Integer value1, Integer value2) { + addCriterion("comment_id not between", value1, value2, "commentId"); + 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 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/StuTradeAccountInfo.java b/src/main/java/com/sztzjy/trade/entity/StuTradeAccountInfo.java index 9a7d70a..2409681 100644 --- a/src/main/java/com/sztzjy/trade/entity/StuTradeAccountInfo.java +++ b/src/main/java/com/sztzjy/trade/entity/StuTradeAccountInfo.java @@ -21,39 +21,29 @@ public class StuTradeAccountInfo { @ApiModelProperty(notes = "账户名称") private String accountName; + @ApiModelProperty(notes = "账户头像") + private String sharerProfile; + @ApiModelProperty(notes = "账户余额") private BigDecimal accountBalance; @ApiModelProperty(notes = "用户ID") private String userId; - @ApiModelProperty(notes = "预留字段1") - private String reservedOne; - - @ApiModelProperty(notes = "预留字段2") - private String reservedTwo; - - @ApiModelProperty(notes = "预留字段3") - private String reservedThree; + @ApiModelProperty(notes = "关注数") + private Integer attentionNumber; - @ApiModelProperty(notes = "预留字段4") - private String reservedFour; + @ApiModelProperty(notes = "粉丝数") + private Integer fansNumber; - @ApiModelProperty(notes = "预留字段5") - private String reservedFive; - - @Resource - StuUserMapper stuUserMapper; public StuTradeAccountInfo(String userId){ Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode(); uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空 this.id=uuid; - this.accountBalance=new BigDecimal(20000000); + this.accountBalance=new BigDecimal(0); this.userId=userId; - - //查询用户名称 - StuUser stuUser = stuUserMapper.selectByPrimaryKey(userId); - this.accountName=stuUser.getName(); + this.attentionNumber=0; + this.fansNumber=0; } public Integer getId() { @@ -72,6 +62,14 @@ public class StuTradeAccountInfo { this.accountName = accountName == null ? null : accountName.trim(); } + public String getSharerProfile() { + return sharerProfile; + } + + public void setSharerProfile(String sharerProfile) { + this.sharerProfile = sharerProfile == null ? null : sharerProfile.trim(); + } + public BigDecimal getAccountBalance() { return accountBalance; } @@ -88,43 +86,19 @@ public class StuTradeAccountInfo { this.userId = userId == null ? null : userId.trim(); } - public String getReservedOne() { - return reservedOne; - } - - public void setReservedOne(String reservedOne) { - this.reservedOne = reservedOne == null ? null : reservedOne.trim(); - } - - public String getReservedTwo() { - return reservedTwo; - } - - public void setReservedTwo(String reservedTwo) { - this.reservedTwo = reservedTwo == null ? null : reservedTwo.trim(); - } - - public String getReservedThree() { - return reservedThree; - } - - public void setReservedThree(String reservedThree) { - this.reservedThree = reservedThree == null ? null : reservedThree.trim(); - } - - public String getReservedFour() { - return reservedFour; + public Integer getAttentionNumber() { + return attentionNumber; } - public void setReservedFour(String reservedFour) { - this.reservedFour = reservedFour == null ? null : reservedFour.trim(); + public void setAttentionNumber(Integer attentionNumber) { + this.attentionNumber = attentionNumber; } - public String getReservedFive() { - return reservedFive; + public Integer getFansNumber() { + return fansNumber; } - public void setReservedFive(String reservedFive) { - this.reservedFive = reservedFive == null ? null : reservedFive.trim(); + public void setFansNumber(Integer fansNumber) { + this.fansNumber = fansNumber; } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/entity/StuTradeAccountInfoExample.java b/src/main/java/com/sztzjy/trade/entity/StuTradeAccountInfoExample.java index 8a16ef4..4f2362b 100644 --- a/src/main/java/com/sztzjy/trade/entity/StuTradeAccountInfoExample.java +++ b/src/main/java/com/sztzjy/trade/entity/StuTradeAccountInfoExample.java @@ -235,6 +235,76 @@ public class StuTradeAccountInfoExample { return (Criteria) this; } + public Criteria andSharerProfileIsNull() { + addCriterion("sharer_profile is null"); + return (Criteria) this; + } + + public Criteria andSharerProfileIsNotNull() { + addCriterion("sharer_profile is not null"); + return (Criteria) this; + } + + public Criteria andSharerProfileEqualTo(String value) { + addCriterion("sharer_profile =", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotEqualTo(String value) { + addCriterion("sharer_profile <>", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileGreaterThan(String value) { + addCriterion("sharer_profile >", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileGreaterThanOrEqualTo(String value) { + addCriterion("sharer_profile >=", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileLessThan(String value) { + addCriterion("sharer_profile <", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileLessThanOrEqualTo(String value) { + addCriterion("sharer_profile <=", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileLike(String value) { + addCriterion("sharer_profile like", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotLike(String value) { + addCriterion("sharer_profile not like", value, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileIn(List values) { + addCriterion("sharer_profile in", values, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotIn(List values) { + addCriterion("sharer_profile not in", values, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileBetween(String value1, String value2) { + addCriterion("sharer_profile between", value1, value2, "sharerProfile"); + return (Criteria) this; + } + + public Criteria andSharerProfileNotBetween(String value1, String value2) { + addCriterion("sharer_profile not between", value1, value2, "sharerProfile"); + return (Criteria) this; + } + public Criteria andAccountBalanceIsNull() { addCriterion("account_balance is null"); return (Criteria) this; @@ -365,353 +435,123 @@ public class StuTradeAccountInfoExample { return (Criteria) this; } - public Criteria andReservedOneIsNull() { - addCriterion("reserved_one is null"); - return (Criteria) this; - } - - public Criteria andReservedOneIsNotNull() { - addCriterion("reserved_one is not null"); - return (Criteria) this; - } - - public Criteria andReservedOneEqualTo(String value) { - addCriterion("reserved_one =", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneNotEqualTo(String value) { - addCriterion("reserved_one <>", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneGreaterThan(String value) { - addCriterion("reserved_one >", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneGreaterThanOrEqualTo(String value) { - addCriterion("reserved_one >=", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneLessThan(String value) { - addCriterion("reserved_one <", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneLessThanOrEqualTo(String value) { - addCriterion("reserved_one <=", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneLike(String value) { - addCriterion("reserved_one like", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneNotLike(String value) { - addCriterion("reserved_one not like", value, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneIn(List values) { - addCriterion("reserved_one in", values, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneNotIn(List values) { - addCriterion("reserved_one not in", values, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneBetween(String value1, String value2) { - addCriterion("reserved_one between", value1, value2, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedOneNotBetween(String value1, String value2) { - addCriterion("reserved_one not between", value1, value2, "reservedOne"); - return (Criteria) this; - } - - public Criteria andReservedTwoIsNull() { - addCriterion("reserved_two is null"); - return (Criteria) this; - } - - public Criteria andReservedTwoIsNotNull() { - addCriterion("reserved_two is not null"); - return (Criteria) this; - } - - public Criteria andReservedTwoEqualTo(String value) { - addCriterion("reserved_two =", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoNotEqualTo(String value) { - addCriterion("reserved_two <>", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoGreaterThan(String value) { - addCriterion("reserved_two >", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoGreaterThanOrEqualTo(String value) { - addCriterion("reserved_two >=", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoLessThan(String value) { - addCriterion("reserved_two <", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoLessThanOrEqualTo(String value) { - addCriterion("reserved_two <=", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoLike(String value) { - addCriterion("reserved_two like", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoNotLike(String value) { - addCriterion("reserved_two not like", value, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoIn(List values) { - addCriterion("reserved_two in", values, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoNotIn(List values) { - addCriterion("reserved_two not in", values, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoBetween(String value1, String value2) { - addCriterion("reserved_two between", value1, value2, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedTwoNotBetween(String value1, String value2) { - addCriterion("reserved_two not between", value1, value2, "reservedTwo"); - return (Criteria) this; - } - - public Criteria andReservedThreeIsNull() { - addCriterion("reserved_three is null"); - return (Criteria) this; - } - - public Criteria andReservedThreeIsNotNull() { - addCriterion("reserved_three is not null"); - return (Criteria) this; - } - - public Criteria andReservedThreeEqualTo(String value) { - addCriterion("reserved_three =", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeNotEqualTo(String value) { - addCriterion("reserved_three <>", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeGreaterThan(String value) { - addCriterion("reserved_three >", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeGreaterThanOrEqualTo(String value) { - addCriterion("reserved_three >=", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeLessThan(String value) { - addCriterion("reserved_three <", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeLessThanOrEqualTo(String value) { - addCriterion("reserved_three <=", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeLike(String value) { - addCriterion("reserved_three like", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeNotLike(String value) { - addCriterion("reserved_three not like", value, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeIn(List values) { - addCriterion("reserved_three in", values, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeNotIn(List values) { - addCriterion("reserved_three not in", values, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeBetween(String value1, String value2) { - addCriterion("reserved_three between", value1, value2, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedThreeNotBetween(String value1, String value2) { - addCriterion("reserved_three not between", value1, value2, "reservedThree"); - return (Criteria) this; - } - - public Criteria andReservedFourIsNull() { - addCriterion("reserved_four is null"); - return (Criteria) this; - } - - public Criteria andReservedFourIsNotNull() { - addCriterion("reserved_four is not null"); - return (Criteria) this; - } - - public Criteria andReservedFourEqualTo(String value) { - addCriterion("reserved_four =", value, "reservedFour"); - return (Criteria) this; - } - - public Criteria andReservedFourNotEqualTo(String value) { - addCriterion("reserved_four <>", value, "reservedFour"); - return (Criteria) this; - } - - public Criteria andReservedFourGreaterThan(String value) { - addCriterion("reserved_four >", value, "reservedFour"); + public Criteria andAttentionNumberIsNull() { + addCriterion("attention_number is null"); return (Criteria) this; } - public Criteria andReservedFourGreaterThanOrEqualTo(String value) { - addCriterion("reserved_four >=", value, "reservedFour"); + public Criteria andAttentionNumberIsNotNull() { + addCriterion("attention_number is not null"); return (Criteria) this; } - public Criteria andReservedFourLessThan(String value) { - addCriterion("reserved_four <", value, "reservedFour"); + public Criteria andAttentionNumberEqualTo(Integer value) { + addCriterion("attention_number =", value, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFourLessThanOrEqualTo(String value) { - addCriterion("reserved_four <=", value, "reservedFour"); + public Criteria andAttentionNumberNotEqualTo(Integer value) { + addCriterion("attention_number <>", value, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFourLike(String value) { - addCriterion("reserved_four like", value, "reservedFour"); + public Criteria andAttentionNumberGreaterThan(Integer value) { + addCriterion("attention_number >", value, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFourNotLike(String value) { - addCriterion("reserved_four not like", value, "reservedFour"); + public Criteria andAttentionNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("attention_number >=", value, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFourIn(List values) { - addCriterion("reserved_four in", values, "reservedFour"); + public Criteria andAttentionNumberLessThan(Integer value) { + addCriterion("attention_number <", value, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFourNotIn(List values) { - addCriterion("reserved_four not in", values, "reservedFour"); + public Criteria andAttentionNumberLessThanOrEqualTo(Integer value) { + addCriterion("attention_number <=", value, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFourBetween(String value1, String value2) { - addCriterion("reserved_four between", value1, value2, "reservedFour"); + public Criteria andAttentionNumberIn(List values) { + addCriterion("attention_number in", values, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFourNotBetween(String value1, String value2) { - addCriterion("reserved_four not between", value1, value2, "reservedFour"); + public Criteria andAttentionNumberNotIn(List values) { + addCriterion("attention_number not in", values, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFiveIsNull() { - addCriterion("reserved_five is null"); + public Criteria andAttentionNumberBetween(Integer value1, Integer value2) { + addCriterion("attention_number between", value1, value2, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFiveIsNotNull() { - addCriterion("reserved_five is not null"); + public Criteria andAttentionNumberNotBetween(Integer value1, Integer value2) { + addCriterion("attention_number not between", value1, value2, "attentionNumber"); return (Criteria) this; } - public Criteria andReservedFiveEqualTo(String value) { - addCriterion("reserved_five =", value, "reservedFive"); + public Criteria andFansNumberIsNull() { + addCriterion("fans_number is null"); return (Criteria) this; } - public Criteria andReservedFiveNotEqualTo(String value) { - addCriterion("reserved_five <>", value, "reservedFive"); + public Criteria andFansNumberIsNotNull() { + addCriterion("fans_number is not null"); return (Criteria) this; } - public Criteria andReservedFiveGreaterThan(String value) { - addCriterion("reserved_five >", value, "reservedFive"); + public Criteria andFansNumberEqualTo(Integer value) { + addCriterion("fans_number =", value, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveGreaterThanOrEqualTo(String value) { - addCriterion("reserved_five >=", value, "reservedFive"); + public Criteria andFansNumberNotEqualTo(Integer value) { + addCriterion("fans_number <>", value, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveLessThan(String value) { - addCriterion("reserved_five <", value, "reservedFive"); + public Criteria andFansNumberGreaterThan(Integer value) { + addCriterion("fans_number >", value, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveLessThanOrEqualTo(String value) { - addCriterion("reserved_five <=", value, "reservedFive"); + public Criteria andFansNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("fans_number >=", value, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveLike(String value) { - addCriterion("reserved_five like", value, "reservedFive"); + public Criteria andFansNumberLessThan(Integer value) { + addCriterion("fans_number <", value, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveNotLike(String value) { - addCriterion("reserved_five not like", value, "reservedFive"); + public Criteria andFansNumberLessThanOrEqualTo(Integer value) { + addCriterion("fans_number <=", value, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveIn(List values) { - addCriterion("reserved_five in", values, "reservedFive"); + public Criteria andFansNumberIn(List values) { + addCriterion("fans_number in", values, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveNotIn(List values) { - addCriterion("reserved_five not in", values, "reservedFive"); + public Criteria andFansNumberNotIn(List values) { + addCriterion("fans_number not in", values, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveBetween(String value1, String value2) { - addCriterion("reserved_five between", value1, value2, "reservedFive"); + public Criteria andFansNumberBetween(Integer value1, Integer value2) { + addCriterion("fans_number between", value1, value2, "fansNumber"); return (Criteria) this; } - public Criteria andReservedFiveNotBetween(String value1, String value2) { - addCriterion("reserved_five not between", value1, value2, "reservedFive"); + public Criteria andFansNumberNotBetween(Integer value1, Integer value2) { + addCriterion("fans_number not between", value1, value2, "fansNumber"); return (Criteria) this; } } diff --git a/src/main/java/com/sztzjy/trade/entity/dto/StuGoodThingsDTO.java b/src/main/java/com/sztzjy/trade/entity/dto/StuGoodThingsDTO.java new file mode 100644 index 0000000..4892c12 --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/dto/StuGoodThingsDTO.java @@ -0,0 +1,23 @@ +package com.sztzjy.trade.entity.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author tz + * @date 2024/11/7 11:18 + */ +@Data +public class StuGoodThingsDTO { + @ApiModelProperty(notes = "订单ID") + private Integer id; + + @ApiModelProperty(notes = "用户ID") + private String userId; + + @ApiModelProperty(notes = "商品ID") + private Integer goodsId; + + @ApiModelProperty(notes = "评论内容") + private String commentContent; +} diff --git a/src/main/java/com/sztzjy/trade/entity/dto/StuGoodsShareDTO.java b/src/main/java/com/sztzjy/trade/entity/dto/StuGoodsShareDTO.java new file mode 100644 index 0000000..cb054db --- /dev/null +++ b/src/main/java/com/sztzjy/trade/entity/dto/StuGoodsShareDTO.java @@ -0,0 +1,38 @@ +package com.sztzjy.trade.entity.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author tz + * @date 2024/11/6 11:36 + */ +//分享营销展示返回 +@Data +public class StuGoodsShareDTO { + + @ApiModelProperty(notes = "分享者名称") + private String sharerName; + + @ApiModelProperty(notes = "评论时间") + private Date commentTime; + + @ApiModelProperty(notes = "评论内容") + private String commentContent; + + @ApiModelProperty(notes = "用户ID") + private String userId; + + @ApiModelProperty(notes = "评论ID") + private Integer commentId; + + @ApiModelProperty(notes = "评论层级(默认为0)") + private Integer commentHierarchy; + + @ApiModelProperty(notes = "评论集") + private List shareDTOS; + +} diff --git a/src/main/java/com/sztzjy/trade/mapper/StuGoodsShareInfoMapper.java b/src/main/java/com/sztzjy/trade/mapper/StuGoodsShareInfoMapper.java new file mode 100644 index 0000000..bdea5cd --- /dev/null +++ b/src/main/java/com/sztzjy/trade/mapper/StuGoodsShareInfoMapper.java @@ -0,0 +1,38 @@ +package com.sztzjy.trade.mapper; + +import com.sztzjy.trade.entity.StuGoodsShareInfo; +import com.sztzjy.trade.entity.StuGoodsShareInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface StuGoodsShareInfoMapper { + long countByExample(StuGoodsShareInfoExample example); + + int deleteByExample(StuGoodsShareInfoExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(StuGoodsShareInfo record); + + int insertSelective(StuGoodsShareInfo record); + + List selectByExampleWithBLOBs(StuGoodsShareInfoExample example); + + List selectByExample(StuGoodsShareInfoExample example); + + StuGoodsShareInfo selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") StuGoodsShareInfo record, @Param("example") StuGoodsShareInfoExample example); + + int updateByExampleWithBLOBs(@Param("record") StuGoodsShareInfo record, @Param("example") StuGoodsShareInfoExample example); + + int updateByExample(@Param("record") StuGoodsShareInfo record, @Param("example") StuGoodsShareInfoExample example); + + int updateByPrimaryKeySelective(StuGoodsShareInfo record); + + int updateByPrimaryKeyWithBLOBs(StuGoodsShareInfo record); + + int updateByPrimaryKey(StuGoodsShareInfo record); + + List selectCommentById(Integer id); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterService.java b/src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterService.java new file mode 100644 index 0000000..fc7503a --- /dev/null +++ b/src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterService.java @@ -0,0 +1,25 @@ +package com.sztzjy.trade.service; + +import com.github.pagehelper.PageInfo; +import com.sztzjy.trade.entity.StuGoodsOrderInfo; +import com.sztzjy.trade.entity.StuGoodsShareInfo; +import com.sztzjy.trade.entity.dto.StuGoodThingsDTO; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * @author tz + * @date 2024/11/6 10:59 + */ +public interface StuGoodsMarketingCenterService { + PageInfo getShareMarketing(Integer index, Integer size, String sortType, String goodsType,Integer type); + + List getOrderInfo(String userId); + + + Integer add(StuGoodThingsDTO stuGoodThingsDTO, List files); + + Integer operate(Integer id, String userId, String operateType, String content); +} diff --git a/src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterServiceImpl.java b/src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterServiceImpl.java new file mode 100644 index 0000000..9a899f4 --- /dev/null +++ b/src/main/java/com/sztzjy/trade/service/StuGoodsMarketingCenterServiceImpl.java @@ -0,0 +1,281 @@ +package com.sztzjy.trade.service; + +import com.github.pagehelper.PageInfo; +import com.sztzjy.trade.config.Constant; +import com.sztzjy.trade.entity.*; +import com.sztzjy.trade.entity.dto.StuGoodThingsDTO; +import com.sztzjy.trade.entity.dto.StuGoodsShareDTO; +import com.sztzjy.trade.mapper.*; +import com.sztzjy.trade.util.BigDecimalUtils; +import com.sztzjy.trade.util.ConvertUtil; +import com.sztzjy.trade.util.PageUtil; +import com.sztzjy.trade.util.file.IFileUtil; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.util.*; + +/** + * @author tz + * @date 2024/11/6 11:00 + */ +@Service +public class StuGoodsMarketingCenterServiceImpl implements StuGoodsMarketingCenterService{ + @Resource + StuGoodsShareInfoMapper shareInfoMapper; + @Resource + ConvertUtil convertUtil; + @Resource + StuGoodsOrderInfoMapper orderInfoMapper; + @Resource + StuGoodsCommentInfoMapper commentInfoMapper; + @Resource + StuTradeAccountInfoMapper tradeAccountInfoMapper; + @Resource + StuGoodsInfoMapper goodsInfoMapper; + @Resource + IFileUtil fileUtil; + @Resource + BigDecimalUtils bigDecimalUtils; + @Override + public PageInfo getShareMarketing(Integer index, Integer size, String sortType, String goodsType,Integer type) { + + StuGoodsShareInfoExample goodsShareInfoExample=new StuGoodsShareInfoExample(); + + if(!sortType.isEmpty()){ + if(sortType.equals(Constant.COMMENT_NUMBER)){ //按照评论数排序 + if(type==1){ //降序 + goodsShareInfoExample.setOrderByClause("desc comment_number"); + }else { //升序 + goodsShareInfoExample.setOrderByClause("asc comment_number"); + } + } + + if(sortType.equals(Constant.BROWSE_NUMBER)){ //按照被浏览数排序 + if(type==1){ //降序 + goodsShareInfoExample.setOrderByClause("desc browse_number"); + }else { //升序 + goodsShareInfoExample.setOrderByClause("asc browse_number"); + } + } + } + StuGoodsShareInfoExample.Criteria criteria = goodsShareInfoExample.createCriteria(); + criteria.andCommentHierarchyEqualTo(0); //分享评论层级 + if(!goodsType.isEmpty()){ + criteria.andGoodsTypeEqualTo(goodsType); + } + List stuGoodsShareInfos = shareInfoMapper.selectByExampleWithBLOBs(goodsShareInfoExample); + + + + if(!stuGoodsShareInfos.isEmpty()){ + //查询出所有回复 + StuGoodsShareInfoExample replyShareInfoExample=new StuGoodsShareInfoExample(); + replyShareInfoExample.createCriteria().andCommentHierarchyNotEqualTo(0); + List replyShareInfos = shareInfoMapper.selectByExampleWithBLOBs(replyShareInfoExample); + + for (StuGoodsShareInfo stuGoodsShareInfo: stuGoodsShareInfos) { + //查询用户的关注和粉丝数更新 + StuTradeAccountInfoExample tradeAccountInfoExample=new StuTradeAccountInfoExample(); + tradeAccountInfoExample.createCriteria().andUserIdEqualTo(stuGoodsShareInfo.getUserId()); + List stuTradeAccountInfos = tradeAccountInfoMapper.selectByExample(tradeAccountInfoExample); + + if(stuTradeAccountInfos.isEmpty()){ + StuTradeAccountInfo stuTradeAccountInfo=new StuTradeAccountInfo(stuGoodsShareInfo.getUserId()); + tradeAccountInfoMapper.insert(stuTradeAccountInfo); + stuTradeAccountInfos.add(stuTradeAccountInfo); + } + stuGoodsShareInfo.setAttentionNumber(stuTradeAccountInfos.get(0).getAttentionNumber()); + stuGoodsShareInfo.setFansNumber(stuTradeAccountInfos.get(0).getFansNumber()); + + List shareDTOS=new ArrayList<>(); + + if(!replyShareInfos.isEmpty()){ + + for (StuGoodsShareInfo replyShareInfo:replyShareInfos){ + + //根据分享id 递归查询该分享下的评论 + if(Objects.equals(stuGoodsShareInfo.getId(), replyShareInfo.getCommentId())){ + shareDTOS.add(convertUtil.entityToDTO(replyShareInfo, StuGoodsShareDTO.class)); + //剔除该数据,防止重复遍历 + stuGoodsShareInfos.remove(replyShareInfo); + shareDTOS.addAll(recursion(replyShareInfo,stuGoodsShareInfos)); + } + + } + + stuGoodsShareInfo.setShareDTOS(shareDTOS); + } + } + } + + + return PageUtil.pageHelper(stuGoodsShareInfos,index,size); + } + + @Override + public List getOrderInfo(String userId) { + StuGoodsOrderInfoExample orderInfoExample=new StuGoodsOrderInfoExample(); + orderInfoExample.createCriteria().andUserIdEqualTo(userId); + List stuGoodsOrderInfos = orderInfoMapper.selectByExample(orderInfoExample); + + //查询评分为5以上的商品评论信息 + StuGoodsCommentInfoExample commentInfoExample=new StuGoodsCommentInfoExample(); + commentInfoExample.createCriteria().andUserIdEqualTo(userId) + .andCommentHierarchyEqualTo(0); + List stuGoodsCommentInfos = commentInfoMapper.selectByExampleWithBLOBs(commentInfoExample); + + //根据订单编号剔除不符合条件的订单信息 + for (int i = 0; i < stuGoodsOrderInfos.size(); i++) { + for (int j = 0; j < stuGoodsCommentInfos.size(); j++) { + if(stuGoodsOrderInfos.get(i).getOrderNumber().equals(stuGoodsCommentInfos.get(j).getOrderNumber())){ + break; + } + if(j==stuGoodsCommentInfos.size()-1){ + stuGoodsOrderInfos.remove(stuGoodsOrderInfos.get(i)); + } + } + } + + return stuGoodsOrderInfos; + } + + @Override + public Integer add(StuGoodThingsDTO stuGoodThingsDTO, List files) { + //批量上传 + String string = insertBatch(files); + + //查询账户信息 + StuTradeAccountInfoExample tradeAccountInfoExample=new StuTradeAccountInfoExample(); + tradeAccountInfoExample.createCriteria().andUserIdEqualTo(stuGoodThingsDTO.getUserId()); + List stuTradeAccountInfos = tradeAccountInfoMapper.selectByExample(tradeAccountInfoExample); + + if(stuTradeAccountInfos.isEmpty()){ + StuTradeAccountInfo stuTradeAccountInfo=new StuTradeAccountInfo(stuGoodThingsDTO.getUserId()); + tradeAccountInfoMapper.insert(stuTradeAccountInfo); + stuTradeAccountInfos.add(stuTradeAccountInfo); + } + StuTradeAccountInfo stuTradeAccountInfo = stuTradeAccountInfos.get(0); + + //查询商品信息 + StuGoodsInfo stuGoodsInfo = goodsInfoMapper.selectByPrimaryKey(stuGoodThingsDTO.getGoodsId()); + + //查询商品评价,计算出商品综合得分 + StuGoodsCommentInfoExample commentInfoExample=new StuGoodsCommentInfoExample(); + commentInfoExample.createCriteria().andGoodsIdEqualTo(stuGoodThingsDTO.getGoodsId()).andCommentHierarchyEqualTo(0); + List stuGoodsCommentInfos = commentInfoMapper.selectByExampleWithBLOBs(commentInfoExample); + + //得分累加 + int score=0; + for (StuGoodsCommentInfo stuGoodsCommentInfo:stuGoodsCommentInfos) { + score=stuGoodsCommentInfo.getGoodsRating()+score; + } + + //综合得分 + Double div = bigDecimalUtils.div(Double.parseDouble(String.valueOf(score)), Double.parseDouble(String.valueOf(stuGoodsCommentInfos.size()))); + + //创建对象 赋值 + StuGoodsShareInfo stuGoodsShareInfo=new StuGoodsShareInfo(); + Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode(); + uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空 + stuGoodsShareInfo.setId(uuid); + stuGoodsShareInfo.setGoodsId(stuGoodThingsDTO.getGoodsId()); + stuGoodsShareInfo.setGoodsName(stuGoodsInfo.getGoodsName()); + stuGoodsShareInfo.setGoodsType(stuGoodsInfo.getGoodsType()); + stuGoodsShareInfo.setGoodsImg(stuGoodsInfo.getGoodsMainImage()); + stuGoodsShareInfo.setSpecificationPackaging(stuGoodsInfo.getSpecificationPackaging()); + stuGoodsShareInfo.setSharerName(stuTradeAccountInfo.getAccountName()); + stuGoodsShareInfo.setSharerProfile(stuTradeAccountInfo.getSharerProfile()); + stuGoodsShareInfo.setCommentTime(new Date()); + stuGoodsShareInfo.setCommentContent(stuGoodThingsDTO.getCommentContent()); + stuGoodsShareInfo.setCommentFile(string); + stuGoodsShareInfo.setComprehensiveScore(String.valueOf(div)); + stuGoodsShareInfo.setGoodsUrl(stuGoodsInfo.getGoodsUrl()); + stuGoodsShareInfo.setBrowseNumber(0); + stuGoodsShareInfo.setCommentNumber(0); + stuGoodsShareInfo.setGiveTheThumbsUp(0); + stuGoodsShareInfo.setUserId(stuGoodThingsDTO.getUserId()); + stuGoodsShareInfo.setAttentionNumber(stuTradeAccountInfo.getAttentionNumber()); + stuGoodsShareInfo.setFansNumber(stuTradeAccountInfo.getFansNumber()); + stuGoodsShareInfo.setCommentHierarchy(0); + + return shareInfoMapper.insert(stuGoodsShareInfo); + } + + @Override + public Integer operate(Integer id, String userId, String operateType, String content) { + StuGoodsShareInfo stuGoodsShareInfo = shareInfoMapper.selectByPrimaryKey(id); + if(operateType.equals("点赞")){ + stuGoodsShareInfo.setGiveTheThumbsUp(stuGoodsShareInfo.getGiveTheThumbsUp()+1); + } + if(operateType.equals("浏览")){ + stuGoodsShareInfo.setBrowseNumber(stuGoodsShareInfo.getBrowseNumber()+1); + } + if(operateType.equals("评论") && !content.isEmpty()){ + //查询评论用户的信息 + StuTradeAccountInfoExample tradeAccountInfoExample=new StuTradeAccountInfoExample(); + tradeAccountInfoExample.createCriteria().andUserIdEqualTo(userId); + List stuTradeAccountInfos = tradeAccountInfoMapper.selectByExample(tradeAccountInfoExample); + + if(stuTradeAccountInfos.isEmpty()){ + StuTradeAccountInfo stuTradeAccountInfo=new StuTradeAccountInfo(userId); + tradeAccountInfoMapper.insert(stuTradeAccountInfo); + stuTradeAccountInfos.add(stuTradeAccountInfo); + } + StuTradeAccountInfo stuTradeAccountInfo = stuTradeAccountInfos.get(0); + + + StuGoodsShareInfo stuGoodsShareInfo1=new StuGoodsShareInfo(); + Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode(); + uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空 + stuGoodsShareInfo1.setId(uuid); + stuGoodsShareInfo1.setSharerName(stuTradeAccountInfo.getAccountName()); + stuGoodsShareInfo1.setSharerProfile(stuTradeAccountInfo.getSharerProfile()); + stuGoodsShareInfo1.setCommentTime(new Date()); + stuGoodsShareInfo1.setCommentContent(content); + stuGoodsShareInfo1.setCommentNumber(0); + stuGoodsShareInfo1.setGiveTheThumbsUp(0); + stuGoodsShareInfo1.setUserId(userId); + stuGoodsShareInfo1.setCommentId(id); + stuGoodsShareInfo1.setCommentHierarchy(stuGoodsShareInfo.getCommentHierarchy()+1); + + shareInfoMapper.insert(stuGoodsShareInfo1); + + stuGoodsShareInfo.setCommentNumber(stuGoodsShareInfo.getCommentNumber()+1); + } + return shareInfoMapper.updateByPrimaryKeyWithBLOBs(stuGoodsShareInfo); + } + + //递归查询分享下的评论 + public List recursion(StuGoodsShareInfo replyShareInfo,List stuGoodsShareInfos){ + List shareDTOS=new ArrayList<>(); + for (StuGoodsShareInfo stuGoodsShareInfo: stuGoodsShareInfos){ + if(Objects.equals(replyShareInfo.getId(), stuGoodsShareInfo.getCommentId())){ + shareDTOS.add(convertUtil.entityToDTO(stuGoodsShareInfo, StuGoodsShareDTO.class)); + //剔除该数据,防止重复遍历 + stuGoodsShareInfos.remove(replyShareInfo); + shareDTOS.addAll(recursion(stuGoodsShareInfo,stuGoodsShareInfos)); + } + } + return shareDTOS; + } + + + /** + * 评价订单-批量上传 + * @param files + */ + private String insertBatch(List files) { + StringBuilder imageUpload = new StringBuilder(); + for (int i = 0; i < files.size(); i++) { + String upload = fileUtil.upload(files.get(i)); + if(i==files.size()-1){ + imageUpload.append(upload); + }else { + imageUpload.append(upload).append(","); + } + } + return String.valueOf(imageUpload); + } +} diff --git a/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java b/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java index e7734ca..2178b11 100644 --- a/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java +++ b/src/main/java/com/sztzjy/trade/service/StuGoodsTradingCenterService.java @@ -48,10 +48,10 @@ public interface StuGoodsTradingCenterService { //购物车数量 ResultEntity getNumberOfShopping(String userId); - //商品排序 - ResultEntity goodsOrder(String keyword, String userId, Integer index, Integer size,Integer type); +// //商品排序 +// ResultEntity goodsOrder(String keyword, String userId, Integer index, Integer size,Integer type); - Integer orderEvaluation(StuGoodsCommentInfo commentInfo, List files); + Integer orderEvaluation(Integer orderId,StuGoodsCommentInfo commentInfo, List files); Integer operate(Integer id,String userId, String operateType, String reportType, String content); ResultEntity goodsOrder(String keyword, Integer index, Integer size,Integer type,String search); 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 d40b31a..7eddfcf 100644 --- a/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingCenterServiceImpl.java +++ b/src/main/java/com/sztzjy/trade/service/impl/StuGoodsTradingCenterServiceImpl.java @@ -236,6 +236,7 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe String format = String.format("%d-%04d", timestamp, randomNum); stuGoodsOrderInfo.setOrderNumber(format); stuGoodsOrderInfo.setGoodsName(stuShoppingCartInfo.getGoodsName()); + stuGoodsOrderInfo.setGoodsUrl(stuShoppingCartInfo.getGoodsImage()); stuGoodsOrderInfo.setShopName(stuShoppingCartInfo.getShopName()); stuGoodsOrderInfo.setConsignee(stuTradeAccountInfos.get(0).getAccountName()); stuGoodsOrderInfo.setOrderTime(new Date()); @@ -303,6 +304,27 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe @Override public PageInfo getMyOrderInfo(String userId, Integer index, Integer size, String orderType, String name) { List stuGoodsOrderInfos = orderInfoMapper.selectMyOrderInfoList(userId, orderType, name); + for (StuGoodsOrderInfo stugoodsOrderInfo:stuGoodsOrderInfos) { + if(stugoodsOrderInfo.getReceiptStatus()!=1){ + //取到下单时间 + Date orderTime = stugoodsOrderInfo.getOrderTime(); + // 获取当前时间 + Date currentTime = new Date(); + // 创建 Calendar 实例并设置为 orderTime + Calendar calendar = Calendar.getInstance(); + calendar.setTime(orderTime); + + // orderTime 加上 10 分钟 + calendar.add(Calendar.MINUTE, 10); + Date orderTimePlusTenMinutes = calendar.getTime(); + + // 比较 currentTime 和 orderTimePlusTenMinutes + if (currentTime.compareTo(orderTimePlusTenMinutes) >= 0) { + stugoodsOrderInfo.setReceiptStatus(1); + orderInfoMapper.updateByPrimaryKey(stugoodsOrderInfo); + } + } + } return PageUtil.pageHelper(stuGoodsOrderInfos, index, size); } @@ -368,6 +390,7 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe } + //商品排序 @Override public ResultEntity goodsOrder(String keyword, Integer index, Integer size, Integer type, String search) { @@ -716,9 +739,19 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe stuGoodsOrderInfo.setUserId(stuPurcreateOrderDTO.getUserId()); orderInfoMapper.insert(stuGoodsOrderInfo); + + // TODO: 2024/10/28 4、扣除余额 + BigDecimal sub = bigDecimalUtils.sub(accountBalance.toString(), bigDecimal.toString()); + stuTradeAccountInfos.get(0).setAccountBalance(sub); + + accountInfoMapper.updateByPrimaryKey(stuTradeAccountInfos.get(0)); } @Override - public Integer orderEvaluation(StuGoodsCommentInfo commentInfo, List files) { + public Integer orderEvaluation(Integer orderId,StuGoodsCommentInfo commentInfo, List files) { + StuGoodsOrderInfo stuGoodsOrderInfo = orderInfoMapper.selectByPrimaryKey(orderId); + if(stuGoodsOrderInfo.getReceiptStatus()==0){ + throw new ServiceException(HttpStatus.ACCEPTED,"订单未收货,不能评价"); + } //批量上传 StuGoodsCommentInfo stuGoodsCommentInfo = insertBatch(commentInfo, files); //评论时间 @@ -733,14 +766,6 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe List stuGoodsCommentInfos = stuGoodsCommentInfoMapper.selectByExample(commentInfoExample); - - // TODO: 2024/10/28 4、扣除余额 - BigDecimal sub = bigDecimalUtils.sub(accountBalance.toString(), bigDecimal.toString()); - stuTradeAccountInfos.get(0).setAccountBalance(sub); - - accountInfoMapper.updateByPrimaryKey(stuTradeAccountInfos.get(0)); - - Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode(); uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空 stuGoodsCommentInfo.setId(uuid); diff --git a/src/main/resources/mappers/StuGoodsOrderInfoMapper.xml b/src/main/resources/mappers/StuGoodsOrderInfoMapper.xml index 12dd5b1..ef8d345 100644 --- a/src/main/resources/mappers/StuGoodsOrderInfoMapper.xml +++ b/src/main/resources/mappers/StuGoodsOrderInfoMapper.xml @@ -1,6 +1,355 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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, goods_img, 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, goods_img, + 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}, #{goodsImg,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, + + + goods_img, + + + 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}, + + + #{goodsImg,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}, + + + goods_img = #{record.goodsImg,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}, + goods_img = #{record.goodsImg,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}, + + + goods_img = #{goodsImg,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}, + goods_img = #{goodsImg,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} + @@ -336,7 +685,7 @@ where id = #{id,jdbcType=INTEGER} - SELECT id,order_type,order_number,goods_id,goods_name,shop_name,consignee,order_time,goods_url,number,receipt_status,comment_status,user_id FROM stu_goods_order_info WHERE user_id = #{userId} diff --git a/src/main/resources/mappers/StuGoodsShareInfoMapper.xml b/src/main/resources/mappers/StuGoodsShareInfoMapper.xml new file mode 100644 index 0000000..fcb3b7d --- /dev/null +++ b/src/main/resources/mappers/StuGoodsShareInfoMapper.xml @@ -0,0 +1,542 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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, goods_id, goods_name, goods_type, goods_img, sharer_name, sharer_profile, comment_time, + comment_content, comment_file, comprehensive_score, goods_url, browse_number, comment_number, + give_the_thumbs_up, user_id, attention_number, fans_number, comment_id, comment_hierarchy + + + specification_packaging + + + + + + delete from stu_goods_share_info + where id = #{id,jdbcType=INTEGER} + + + delete from stu_goods_share_info + + + + + + insert into stu_goods_share_info (id, goods_id, goods_name, + goods_type, goods_img, sharer_name, + sharer_profile, comment_time, comment_content, + comment_file, comprehensive_score, goods_url, + browse_number, comment_number, give_the_thumbs_up, + user_id, attention_number, fans_number, + comment_id, comment_hierarchy, specification_packaging + ) + values (#{id,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{goodsName,jdbcType=VARCHAR}, + #{goodsType,jdbcType=VARCHAR}, #{goodsImg,jdbcType=VARCHAR}, #{sharerName,jdbcType=VARCHAR}, + #{sharerProfile,jdbcType=VARCHAR}, #{commentTime,jdbcType=TIMESTAMP}, #{commentContent,jdbcType=VARCHAR}, + #{commentFile,jdbcType=VARCHAR}, #{comprehensiveScore,jdbcType=VARCHAR}, #{goodsUrl,jdbcType=VARCHAR}, + #{browseNumber,jdbcType=INTEGER}, #{commentNumber,jdbcType=INTEGER}, #{giveTheThumbsUp,jdbcType=INTEGER}, + #{userId,jdbcType=VARCHAR}, #{attentionNumber,jdbcType=INTEGER}, #{fansNumber,jdbcType=INTEGER}, + #{commentId,jdbcType=INTEGER}, #{commentHierarchy,jdbcType=INTEGER}, #{specificationPackaging,jdbcType=LONGVARCHAR} + ) + + + insert into stu_goods_share_info + + + id, + + + goods_id, + + + goods_name, + + + goods_type, + + + goods_img, + + + sharer_name, + + + sharer_profile, + + + comment_time, + + + comment_content, + + + comment_file, + + + comprehensive_score, + + + goods_url, + + + browse_number, + + + comment_number, + + + give_the_thumbs_up, + + + user_id, + + + attention_number, + + + fans_number, + + + comment_id, + + + comment_hierarchy, + + + specification_packaging, + + + + + #{id,jdbcType=INTEGER}, + + + #{goodsId,jdbcType=INTEGER}, + + + #{goodsName,jdbcType=VARCHAR}, + + + #{goodsType,jdbcType=VARCHAR}, + + + #{goodsImg,jdbcType=VARCHAR}, + + + #{sharerName,jdbcType=VARCHAR}, + + + #{sharerProfile,jdbcType=VARCHAR}, + + + #{commentTime,jdbcType=TIMESTAMP}, + + + #{commentContent,jdbcType=VARCHAR}, + + + #{commentFile,jdbcType=VARCHAR}, + + + #{comprehensiveScore,jdbcType=VARCHAR}, + + + #{goodsUrl,jdbcType=VARCHAR}, + + + #{browseNumber,jdbcType=INTEGER}, + + + #{commentNumber,jdbcType=INTEGER}, + + + #{giveTheThumbsUp,jdbcType=INTEGER}, + + + #{userId,jdbcType=VARCHAR}, + + + #{attentionNumber,jdbcType=INTEGER}, + + + #{fansNumber,jdbcType=INTEGER}, + + + #{commentId,jdbcType=INTEGER}, + + + #{commentHierarchy,jdbcType=INTEGER}, + + + #{specificationPackaging,jdbcType=LONGVARCHAR}, + + + + + + update stu_goods_share_info + + + id = #{record.id,jdbcType=INTEGER}, + + + goods_id = #{record.goodsId,jdbcType=INTEGER}, + + + goods_name = #{record.goodsName,jdbcType=VARCHAR}, + + + goods_type = #{record.goodsType,jdbcType=VARCHAR}, + + + goods_img = #{record.goodsImg,jdbcType=VARCHAR}, + + + sharer_name = #{record.sharerName,jdbcType=VARCHAR}, + + + sharer_profile = #{record.sharerProfile,jdbcType=VARCHAR}, + + + comment_time = #{record.commentTime,jdbcType=TIMESTAMP}, + + + comment_content = #{record.commentContent,jdbcType=VARCHAR}, + + + comment_file = #{record.commentFile,jdbcType=VARCHAR}, + + + comprehensive_score = #{record.comprehensiveScore,jdbcType=VARCHAR}, + + + goods_url = #{record.goodsUrl,jdbcType=VARCHAR}, + + + browse_number = #{record.browseNumber,jdbcType=INTEGER}, + + + comment_number = #{record.commentNumber,jdbcType=INTEGER}, + + + give_the_thumbs_up = #{record.giveTheThumbsUp,jdbcType=INTEGER}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + attention_number = #{record.attentionNumber,jdbcType=INTEGER}, + + + fans_number = #{record.fansNumber,jdbcType=INTEGER}, + + + comment_id = #{record.commentId,jdbcType=INTEGER}, + + + comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER}, + + + specification_packaging = #{record.specificationPackaging,jdbcType=LONGVARCHAR}, + + + + + + + + update stu_goods_share_info + set id = #{record.id,jdbcType=INTEGER}, + goods_id = #{record.goodsId,jdbcType=INTEGER}, + goods_name = #{record.goodsName,jdbcType=VARCHAR}, + goods_type = #{record.goodsType,jdbcType=VARCHAR}, + goods_img = #{record.goodsImg,jdbcType=VARCHAR}, + sharer_name = #{record.sharerName,jdbcType=VARCHAR}, + sharer_profile = #{record.sharerProfile,jdbcType=VARCHAR}, + comment_time = #{record.commentTime,jdbcType=TIMESTAMP}, + comment_content = #{record.commentContent,jdbcType=VARCHAR}, + comment_file = #{record.commentFile,jdbcType=VARCHAR}, + comprehensive_score = #{record.comprehensiveScore,jdbcType=VARCHAR}, + goods_url = #{record.goodsUrl,jdbcType=VARCHAR}, + browse_number = #{record.browseNumber,jdbcType=INTEGER}, + comment_number = #{record.commentNumber,jdbcType=INTEGER}, + give_the_thumbs_up = #{record.giveTheThumbsUp,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=VARCHAR}, + attention_number = #{record.attentionNumber,jdbcType=INTEGER}, + fans_number = #{record.fansNumber,jdbcType=INTEGER}, + comment_id = #{record.commentId,jdbcType=INTEGER}, + comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER}, + specification_packaging = #{record.specificationPackaging,jdbcType=LONGVARCHAR} + + + + + + update stu_goods_share_info + set id = #{record.id,jdbcType=INTEGER}, + goods_id = #{record.goodsId,jdbcType=INTEGER}, + goods_name = #{record.goodsName,jdbcType=VARCHAR}, + goods_type = #{record.goodsType,jdbcType=VARCHAR}, + goods_img = #{record.goodsImg,jdbcType=VARCHAR}, + sharer_name = #{record.sharerName,jdbcType=VARCHAR}, + sharer_profile = #{record.sharerProfile,jdbcType=VARCHAR}, + comment_time = #{record.commentTime,jdbcType=TIMESTAMP}, + comment_content = #{record.commentContent,jdbcType=VARCHAR}, + comment_file = #{record.commentFile,jdbcType=VARCHAR}, + comprehensive_score = #{record.comprehensiveScore,jdbcType=VARCHAR}, + goods_url = #{record.goodsUrl,jdbcType=VARCHAR}, + browse_number = #{record.browseNumber,jdbcType=INTEGER}, + comment_number = #{record.commentNumber,jdbcType=INTEGER}, + give_the_thumbs_up = #{record.giveTheThumbsUp,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=VARCHAR}, + attention_number = #{record.attentionNumber,jdbcType=INTEGER}, + fans_number = #{record.fansNumber,jdbcType=INTEGER}, + comment_id = #{record.commentId,jdbcType=INTEGER}, + comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER} + + + + + + update stu_goods_share_info + + + goods_id = #{goodsId,jdbcType=INTEGER}, + + + goods_name = #{goodsName,jdbcType=VARCHAR}, + + + goods_type = #{goodsType,jdbcType=VARCHAR}, + + + goods_img = #{goodsImg,jdbcType=VARCHAR}, + + + sharer_name = #{sharerName,jdbcType=VARCHAR}, + + + sharer_profile = #{sharerProfile,jdbcType=VARCHAR}, + + + comment_time = #{commentTime,jdbcType=TIMESTAMP}, + + + comment_content = #{commentContent,jdbcType=VARCHAR}, + + + comment_file = #{commentFile,jdbcType=VARCHAR}, + + + comprehensive_score = #{comprehensiveScore,jdbcType=VARCHAR}, + + + goods_url = #{goodsUrl,jdbcType=VARCHAR}, + + + browse_number = #{browseNumber,jdbcType=INTEGER}, + + + comment_number = #{commentNumber,jdbcType=INTEGER}, + + + give_the_thumbs_up = #{giveTheThumbsUp,jdbcType=INTEGER}, + + + user_id = #{userId,jdbcType=VARCHAR}, + + + attention_number = #{attentionNumber,jdbcType=INTEGER}, + + + fans_number = #{fansNumber,jdbcType=INTEGER}, + + + comment_id = #{commentId,jdbcType=INTEGER}, + + + comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER}, + + + specification_packaging = #{specificationPackaging,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update stu_goods_share_info + set goods_id = #{goodsId,jdbcType=INTEGER}, + goods_name = #{goodsName,jdbcType=VARCHAR}, + goods_type = #{goodsType,jdbcType=VARCHAR}, + goods_img = #{goodsImg,jdbcType=VARCHAR}, + sharer_name = #{sharerName,jdbcType=VARCHAR}, + sharer_profile = #{sharerProfile,jdbcType=VARCHAR}, + comment_time = #{commentTime,jdbcType=TIMESTAMP}, + comment_content = #{commentContent,jdbcType=VARCHAR}, + comment_file = #{commentFile,jdbcType=VARCHAR}, + comprehensive_score = #{comprehensiveScore,jdbcType=VARCHAR}, + goods_url = #{goodsUrl,jdbcType=VARCHAR}, + browse_number = #{browseNumber,jdbcType=INTEGER}, + comment_number = #{commentNumber,jdbcType=INTEGER}, + give_the_thumbs_up = #{giveTheThumbsUp,jdbcType=INTEGER}, + user_id = #{userId,jdbcType=VARCHAR}, + attention_number = #{attentionNumber,jdbcType=INTEGER}, + fans_number = #{fansNumber,jdbcType=INTEGER}, + comment_id = #{commentId,jdbcType=INTEGER}, + comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER}, + specification_packaging = #{specificationPackaging,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update stu_goods_share_info + set goods_id = #{goodsId,jdbcType=INTEGER}, + goods_name = #{goodsName,jdbcType=VARCHAR}, + goods_type = #{goodsType,jdbcType=VARCHAR}, + goods_img = #{goodsImg,jdbcType=VARCHAR}, + sharer_name = #{sharerName,jdbcType=VARCHAR}, + sharer_profile = #{sharerProfile,jdbcType=VARCHAR}, + comment_time = #{commentTime,jdbcType=TIMESTAMP}, + comment_content = #{commentContent,jdbcType=VARCHAR}, + comment_file = #{commentFile,jdbcType=VARCHAR}, + comprehensive_score = #{comprehensiveScore,jdbcType=VARCHAR}, + goods_url = #{goodsUrl,jdbcType=VARCHAR}, + browse_number = #{browseNumber,jdbcType=INTEGER}, + comment_number = #{commentNumber,jdbcType=INTEGER}, + give_the_thumbs_up = #{giveTheThumbsUp,jdbcType=INTEGER}, + user_id = #{userId,jdbcType=VARCHAR}, + attention_number = #{attentionNumber,jdbcType=INTEGER}, + fans_number = #{fansNumber,jdbcType=INTEGER}, + comment_id = #{commentId,jdbcType=INTEGER}, + comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/src/main/resources/mappers/StuTradeAccountInfoMapper.xml b/src/main/resources/mappers/StuTradeAccountInfoMapper.xml index 24c3fa6..1c91d16 100644 --- a/src/main/resources/mappers/StuTradeAccountInfoMapper.xml +++ b/src/main/resources/mappers/StuTradeAccountInfoMapper.xml @@ -4,13 +4,11 @@ + - - - - - + + @@ -71,8 +69,7 @@ - id, account_name, account_balance, user_id, reserved_one, reserved_two, reserved_three, - reserved_four, reserved_five + id, account_name, sharer_profile, account_balance, user_id, attention_number, fans_number