项目十二:分享营销所有功能

main
@t2652009480 4 months ago
parent 05aa00791e
commit 31017f2e63

@ -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="被浏览数";

@ -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<MultipartFile> 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+"失败,请联系管理员");}
}
}

@ -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<MultipartFile> 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("商品详情页面:商品评价分页展示")

@ -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;
}

@ -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<String> values) {
addCriterion("goods_img in", values, "goodsImg");
return (Criteria) this;
}
public Criteria andGoodsImgNotIn(List<String> 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;

@ -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<StuGoodsShareDTO> 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();
}
}

@ -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;
}
}

@ -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<String> values) {
addCriterion("sharer_profile in", values, "sharerProfile");
return (Criteria) this;
}
public Criteria andSharerProfileNotIn(List<String> 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<String> values) {
addCriterion("reserved_one in", values, "reservedOne");
return (Criteria) this;
}
public Criteria andReservedOneNotIn(List<String> 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<String> values) {
addCriterion("reserved_two in", values, "reservedTwo");
return (Criteria) this;
}
public Criteria andReservedTwoNotIn(List<String> 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<String> values) {
addCriterion("reserved_three in", values, "reservedThree");
return (Criteria) this;
}
public Criteria andReservedThreeNotIn(List<String> 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<String> values) {
addCriterion("reserved_four in", values, "reservedFour");
public Criteria andAttentionNumberLessThan(Integer value) {
addCriterion("attention_number <", value, "attentionNumber");
return (Criteria) this;
}
public Criteria andReservedFourNotIn(List<String> 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<Integer> 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<Integer> 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<String> values) {
addCriterion("reserved_five in", values, "reservedFive");
public Criteria andFansNumberIn(List<Integer> values) {
addCriterion("fans_number in", values, "fansNumber");
return (Criteria) this;
}
public Criteria andReservedFiveNotIn(List<String> values) {
addCriterion("reserved_five not in", values, "reservedFive");
public Criteria andFansNumberNotIn(List<Integer> 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;
}
}

@ -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;
}

@ -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<StuGoodsShareDTO> shareDTOS;
}

@ -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<StuGoodsShareInfo> selectByExampleWithBLOBs(StuGoodsShareInfoExample example);
List<StuGoodsShareInfo> 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<StuGoodsShareInfo> selectCommentById(Integer id);
}

@ -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<StuGoodsShareInfo> getShareMarketing(Integer index, Integer size, String sortType, String goodsType,Integer type);
List<StuGoodsOrderInfo> getOrderInfo(String userId);
Integer add(StuGoodThingsDTO stuGoodThingsDTO, List<MultipartFile> files);
Integer operate(Integer id, String userId, String operateType, String content);
}

@ -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<StuGoodsShareInfo> stuGoodsShareInfos = shareInfoMapper.selectByExampleWithBLOBs(goodsShareInfoExample);
if(!stuGoodsShareInfos.isEmpty()){
//查询出所有回复
StuGoodsShareInfoExample replyShareInfoExample=new StuGoodsShareInfoExample();
replyShareInfoExample.createCriteria().andCommentHierarchyNotEqualTo(0);
List<StuGoodsShareInfo> replyShareInfos = shareInfoMapper.selectByExampleWithBLOBs(replyShareInfoExample);
for (StuGoodsShareInfo stuGoodsShareInfo: stuGoodsShareInfos) {
//查询用户的关注和粉丝数更新
StuTradeAccountInfoExample tradeAccountInfoExample=new StuTradeAccountInfoExample();
tradeAccountInfoExample.createCriteria().andUserIdEqualTo(stuGoodsShareInfo.getUserId());
List<StuTradeAccountInfo> 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<StuGoodsShareDTO> 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<StuGoodsOrderInfo> getOrderInfo(String userId) {
StuGoodsOrderInfoExample orderInfoExample=new StuGoodsOrderInfoExample();
orderInfoExample.createCriteria().andUserIdEqualTo(userId);
List<StuGoodsOrderInfo> stuGoodsOrderInfos = orderInfoMapper.selectByExample(orderInfoExample);
//查询评分为5以上的商品评论信息
StuGoodsCommentInfoExample commentInfoExample=new StuGoodsCommentInfoExample();
commentInfoExample.createCriteria().andUserIdEqualTo(userId)
.andCommentHierarchyEqualTo(0);
List<StuGoodsCommentInfo> 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<MultipartFile> files) {
//批量上传
String string = insertBatch(files);
//查询账户信息
StuTradeAccountInfoExample tradeAccountInfoExample=new StuTradeAccountInfoExample();
tradeAccountInfoExample.createCriteria().andUserIdEqualTo(stuGoodThingsDTO.getUserId());
List<StuTradeAccountInfo> 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<StuGoodsCommentInfo> 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<StuTradeAccountInfo> 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<StuGoodsShareDTO> recursion(StuGoodsShareInfo replyShareInfo,List<StuGoodsShareInfo> stuGoodsShareInfos){
List<StuGoodsShareDTO> 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<MultipartFile> 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);
}
}

@ -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<MultipartFile> files);
Integer orderEvaluation(Integer orderId,StuGoodsCommentInfo commentInfo, List<MultipartFile> 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);

@ -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<StuGoodsOrderInfo> 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<MultipartFile> files) {
public Integer orderEvaluation(Integer orderId,StuGoodsCommentInfo commentInfo, List<MultipartFile> 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<StuGoodsCommentInfo> 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);

@ -1,6 +1,355 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.trade.mapper.StuGoodsOrderInfoMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuGoodsOrderInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_type" jdbcType="VARCHAR" property="orderType" />
<result column="order_number" jdbcType="VARCHAR" property="orderNumber" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
<result column="goods_img" jdbcType="VARCHAR" property="goodsImg" />
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
<result column="consignee" jdbcType="VARCHAR" property="consignee" />
<result column="order_time" jdbcType="TIMESTAMP" property="orderTime" />
<result column="goods_url" jdbcType="VARCHAR" property="goodsUrl" />
<result column="number" jdbcType="INTEGER" property="number" />
<result column="receipt_status" jdbcType="INTEGER" property="receiptStatus" />
<result column="comment_status" jdbcType="INTEGER" property="commentStatus" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
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
</sql>
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.StuGoodsOrderInfoExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_goods_order_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from stu_goods_order_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_goods_order_info
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.StuGoodsOrderInfoExample">
delete from stu_goods_order_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuGoodsOrderInfo">
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>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuGoodsOrderInfo">
insert into stu_goods_order_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="orderType != null">
order_type,
</if>
<if test="orderNumber != null">
order_number,
</if>
<if test="goodsId != null">
goods_id,
</if>
<if test="goodsName != null">
goods_name,
</if>
<if test="goodsImg != null">
goods_img,
</if>
<if test="shopName != null">
shop_name,
</if>
<if test="consignee != null">
consignee,
</if>
<if test="orderTime != null">
order_time,
</if>
<if test="goodsUrl != null">
goods_url,
</if>
<if test="number != null">
number,
</if>
<if test="receiptStatus != null">
receipt_status,
</if>
<if test="commentStatus != null">
comment_status,
</if>
<if test="userId != null">
user_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="orderType != null">
#{orderType,jdbcType=VARCHAR},
</if>
<if test="orderNumber != null">
#{orderNumber,jdbcType=VARCHAR},
</if>
<if test="goodsId != null">
#{goodsId,jdbcType=INTEGER},
</if>
<if test="goodsName != null">
#{goodsName,jdbcType=VARCHAR},
</if>
<if test="goodsImg != null">
#{goodsImg,jdbcType=VARCHAR},
</if>
<if test="shopName != null">
#{shopName,jdbcType=VARCHAR},
</if>
<if test="consignee != null">
#{consignee,jdbcType=VARCHAR},
</if>
<if test="orderTime != null">
#{orderTime,jdbcType=TIMESTAMP},
</if>
<if test="goodsUrl != null">
#{goodsUrl,jdbcType=VARCHAR},
</if>
<if test="number != null">
#{number,jdbcType=INTEGER},
</if>
<if test="receiptStatus != null">
#{receiptStatus,jdbcType=INTEGER},
</if>
<if test="commentStatus != null">
#{commentStatus,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.trade.entity.StuGoodsOrderInfoExample" resultType="java.lang.Long">
select count(*) from stu_goods_order_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_goods_order_info
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.orderType != null">
order_type = #{record.orderType,jdbcType=VARCHAR},
</if>
<if test="record.orderNumber != null">
order_number = #{record.orderNumber,jdbcType=VARCHAR},
</if>
<if test="record.goodsId != null">
goods_id = #{record.goodsId,jdbcType=INTEGER},
</if>
<if test="record.goodsName != null">
goods_name = #{record.goodsName,jdbcType=VARCHAR},
</if>
<if test="record.goodsImg != null">
goods_img = #{record.goodsImg,jdbcType=VARCHAR},
</if>
<if test="record.shopName != null">
shop_name = #{record.shopName,jdbcType=VARCHAR},
</if>
<if test="record.consignee != null">
consignee = #{record.consignee,jdbcType=VARCHAR},
</if>
<if test="record.orderTime != null">
order_time = #{record.orderTime,jdbcType=TIMESTAMP},
</if>
<if test="record.goodsUrl != null">
goods_url = #{record.goodsUrl,jdbcType=VARCHAR},
</if>
<if test="record.number != null">
number = #{record.number,jdbcType=INTEGER},
</if>
<if test="record.receiptStatus != null">
receipt_status = #{record.receiptStatus,jdbcType=INTEGER},
</if>
<if test="record.commentStatus != null">
comment_status = #{record.commentStatus,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.StuGoodsOrderInfo">
update stu_goods_order_info
<set>
<if test="orderType != null">
order_type = #{orderType,jdbcType=VARCHAR},
</if>
<if test="orderNumber != null">
order_number = #{orderNumber,jdbcType=VARCHAR},
</if>
<if test="goodsId != null">
goods_id = #{goodsId,jdbcType=INTEGER},
</if>
<if test="goodsName != null">
goods_name = #{goodsName,jdbcType=VARCHAR},
</if>
<if test="goodsImg != null">
goods_img = #{goodsImg,jdbcType=VARCHAR},
</if>
<if test="shopName != null">
shop_name = #{shopName,jdbcType=VARCHAR},
</if>
<if test="consignee != null">
consignee = #{consignee,jdbcType=VARCHAR},
</if>
<if test="orderTime != null">
order_time = #{orderTime,jdbcType=TIMESTAMP},
</if>
<if test="goodsUrl != null">
goods_url = #{goodsUrl,jdbcType=VARCHAR},
</if>
<if test="number != null">
number = #{number,jdbcType=INTEGER},
</if>
<if test="receiptStatus != null">
receipt_status = #{receiptStatus,jdbcType=INTEGER},
</if>
<if test="commentStatus != null">
comment_status = #{commentStatus,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.StuGoodsOrderInfo">
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}
</update>
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuGoodsOrderInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_type" jdbcType="VARCHAR" property="orderType" />
@ -336,7 +685,7 @@
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectMyOrderInfoList" resultType="com.sztzjy.trade.entity.StuGoodsOrderInfo" resultMap="BaseResultMap">
<select id="selectMyOrderInfoList" resultMap="BaseResultMap" resultType="com.sztzjy.trade.entity.StuGoodsOrderInfo">
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}

@ -0,0 +1,542 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.trade.mapper.StuGoodsShareInfoMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuGoodsShareInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
<result column="goods_type" jdbcType="VARCHAR" property="goodsType" />
<result column="goods_img" jdbcType="VARCHAR" property="goodsImg" />
<result column="sharer_name" jdbcType="VARCHAR" property="sharerName" />
<result column="sharer_profile" jdbcType="VARCHAR" property="sharerProfile" />
<result column="comment_time" jdbcType="TIMESTAMP" property="commentTime" />
<result column="comment_content" jdbcType="VARCHAR" property="commentContent" />
<result column="comment_file" jdbcType="VARCHAR" property="commentFile" />
<result column="comprehensive_score" jdbcType="VARCHAR" property="comprehensiveScore" />
<result column="goods_url" jdbcType="VARCHAR" property="goodsUrl" />
<result column="browse_number" jdbcType="INTEGER" property="browseNumber" />
<result column="comment_number" jdbcType="INTEGER" property="commentNumber" />
<result column="give_the_thumbs_up" jdbcType="INTEGER" property="giveTheThumbsUp" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="attention_number" jdbcType="INTEGER" property="attentionNumber" />
<result column="fans_number" jdbcType="INTEGER" property="fansNumber" />
<result column="comment_id" jdbcType="INTEGER" property="commentId" />
<result column="comment_hierarchy" jdbcType="INTEGER" property="commentHierarchy" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.trade.entity.StuGoodsShareInfo">
<result column="specification_packaging" jdbcType="LONGVARCHAR" property="specificationPackaging" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
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
</sql>
<sql id="Blob_Column_List">
specification_packaging
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfoExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from stu_goods_share_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfoExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_goods_share_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from stu_goods_share_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_goods_share_info
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfoExample">
delete from stu_goods_share_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfo">
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>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfo">
insert into stu_goods_share_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="goodsId != null">
goods_id,
</if>
<if test="goodsName != null">
goods_name,
</if>
<if test="goodsType != null">
goods_type,
</if>
<if test="goodsImg != null">
goods_img,
</if>
<if test="sharerName != null">
sharer_name,
</if>
<if test="sharerProfile != null">
sharer_profile,
</if>
<if test="commentTime != null">
comment_time,
</if>
<if test="commentContent != null">
comment_content,
</if>
<if test="commentFile != null">
comment_file,
</if>
<if test="comprehensiveScore != null">
comprehensive_score,
</if>
<if test="goodsUrl != null">
goods_url,
</if>
<if test="browseNumber != null">
browse_number,
</if>
<if test="commentNumber != null">
comment_number,
</if>
<if test="giveTheThumbsUp != null">
give_the_thumbs_up,
</if>
<if test="userId != null">
user_id,
</if>
<if test="attentionNumber != null">
attention_number,
</if>
<if test="fansNumber != null">
fans_number,
</if>
<if test="commentId != null">
comment_id,
</if>
<if test="commentHierarchy != null">
comment_hierarchy,
</if>
<if test="specificationPackaging != null">
specification_packaging,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="goodsId != null">
#{goodsId,jdbcType=INTEGER},
</if>
<if test="goodsName != null">
#{goodsName,jdbcType=VARCHAR},
</if>
<if test="goodsType != null">
#{goodsType,jdbcType=VARCHAR},
</if>
<if test="goodsImg != null">
#{goodsImg,jdbcType=VARCHAR},
</if>
<if test="sharerName != null">
#{sharerName,jdbcType=VARCHAR},
</if>
<if test="sharerProfile != null">
#{sharerProfile,jdbcType=VARCHAR},
</if>
<if test="commentTime != null">
#{commentTime,jdbcType=TIMESTAMP},
</if>
<if test="commentContent != null">
#{commentContent,jdbcType=VARCHAR},
</if>
<if test="commentFile != null">
#{commentFile,jdbcType=VARCHAR},
</if>
<if test="comprehensiveScore != null">
#{comprehensiveScore,jdbcType=VARCHAR},
</if>
<if test="goodsUrl != null">
#{goodsUrl,jdbcType=VARCHAR},
</if>
<if test="browseNumber != null">
#{browseNumber,jdbcType=INTEGER},
</if>
<if test="commentNumber != null">
#{commentNumber,jdbcType=INTEGER},
</if>
<if test="giveTheThumbsUp != null">
#{giveTheThumbsUp,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="attentionNumber != null">
#{attentionNumber,jdbcType=INTEGER},
</if>
<if test="fansNumber != null">
#{fansNumber,jdbcType=INTEGER},
</if>
<if test="commentId != null">
#{commentId,jdbcType=INTEGER},
</if>
<if test="commentHierarchy != null">
#{commentHierarchy,jdbcType=INTEGER},
</if>
<if test="specificationPackaging != null">
#{specificationPackaging,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfoExample" resultType="java.lang.Long">
select count(*) from stu_goods_share_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_goods_share_info
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.goodsId != null">
goods_id = #{record.goodsId,jdbcType=INTEGER},
</if>
<if test="record.goodsName != null">
goods_name = #{record.goodsName,jdbcType=VARCHAR},
</if>
<if test="record.goodsType != null">
goods_type = #{record.goodsType,jdbcType=VARCHAR},
</if>
<if test="record.goodsImg != null">
goods_img = #{record.goodsImg,jdbcType=VARCHAR},
</if>
<if test="record.sharerName != null">
sharer_name = #{record.sharerName,jdbcType=VARCHAR},
</if>
<if test="record.sharerProfile != null">
sharer_profile = #{record.sharerProfile,jdbcType=VARCHAR},
</if>
<if test="record.commentTime != null">
comment_time = #{record.commentTime,jdbcType=TIMESTAMP},
</if>
<if test="record.commentContent != null">
comment_content = #{record.commentContent,jdbcType=VARCHAR},
</if>
<if test="record.commentFile != null">
comment_file = #{record.commentFile,jdbcType=VARCHAR},
</if>
<if test="record.comprehensiveScore != null">
comprehensive_score = #{record.comprehensiveScore,jdbcType=VARCHAR},
</if>
<if test="record.goodsUrl != null">
goods_url = #{record.goodsUrl,jdbcType=VARCHAR},
</if>
<if test="record.browseNumber != null">
browse_number = #{record.browseNumber,jdbcType=INTEGER},
</if>
<if test="record.commentNumber != null">
comment_number = #{record.commentNumber,jdbcType=INTEGER},
</if>
<if test="record.giveTheThumbsUp != null">
give_the_thumbs_up = #{record.giveTheThumbsUp,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.attentionNumber != null">
attention_number = #{record.attentionNumber,jdbcType=INTEGER},
</if>
<if test="record.fansNumber != null">
fans_number = #{record.fansNumber,jdbcType=INTEGER},
</if>
<if test="record.commentId != null">
comment_id = #{record.commentId,jdbcType=INTEGER},
</if>
<if test="record.commentHierarchy != null">
comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER},
</if>
<if test="record.specificationPackaging != null">
specification_packaging = #{record.specificationPackaging,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfo">
update stu_goods_share_info
<set>
<if test="goodsId != null">
goods_id = #{goodsId,jdbcType=INTEGER},
</if>
<if test="goodsName != null">
goods_name = #{goodsName,jdbcType=VARCHAR},
</if>
<if test="goodsType != null">
goods_type = #{goodsType,jdbcType=VARCHAR},
</if>
<if test="goodsImg != null">
goods_img = #{goodsImg,jdbcType=VARCHAR},
</if>
<if test="sharerName != null">
sharer_name = #{sharerName,jdbcType=VARCHAR},
</if>
<if test="sharerProfile != null">
sharer_profile = #{sharerProfile,jdbcType=VARCHAR},
</if>
<if test="commentTime != null">
comment_time = #{commentTime,jdbcType=TIMESTAMP},
</if>
<if test="commentContent != null">
comment_content = #{commentContent,jdbcType=VARCHAR},
</if>
<if test="commentFile != null">
comment_file = #{commentFile,jdbcType=VARCHAR},
</if>
<if test="comprehensiveScore != null">
comprehensive_score = #{comprehensiveScore,jdbcType=VARCHAR},
</if>
<if test="goodsUrl != null">
goods_url = #{goodsUrl,jdbcType=VARCHAR},
</if>
<if test="browseNumber != null">
browse_number = #{browseNumber,jdbcType=INTEGER},
</if>
<if test="commentNumber != null">
comment_number = #{commentNumber,jdbcType=INTEGER},
</if>
<if test="giveTheThumbsUp != null">
give_the_thumbs_up = #{giveTheThumbsUp,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="attentionNumber != null">
attention_number = #{attentionNumber,jdbcType=INTEGER},
</if>
<if test="fansNumber != null">
fans_number = #{fansNumber,jdbcType=INTEGER},
</if>
<if test="commentId != null">
comment_id = #{commentId,jdbcType=INTEGER},
</if>
<if test="commentHierarchy != null">
comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER},
</if>
<if test="specificationPackaging != null">
specification_packaging = #{specificationPackaging,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfo">
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>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.StuGoodsShareInfo">
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}
</update>
<select id="selectCommentById" resultType="com.sztzjy.trade.entity.StuGoodsShareInfo">
SELECT sharer_name,comment_time,comment_content,user_id,comment_id,comment_hierarchy
from stu_goods_share_info
where comment_id=#{id} and comment_hierarchy!=0
</select>
</mapper>

@ -4,13 +4,11 @@
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuTradeAccountInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="account_name" jdbcType="VARCHAR" property="accountName" />
<result column="sharer_profile" jdbcType="VARCHAR" property="sharerProfile" />
<result column="account_balance" jdbcType="DECIMAL" property="accountBalance" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="reserved_one" jdbcType="VARCHAR" property="reservedOne" />
<result column="reserved_two" jdbcType="VARCHAR" property="reservedTwo" />
<result column="reserved_three" jdbcType="VARCHAR" property="reservedThree" />
<result column="reserved_four" jdbcType="VARCHAR" property="reservedFour" />
<result column="reserved_five" jdbcType="VARCHAR" property="reservedFive" />
<result column="attention_number" jdbcType="INTEGER" property="attentionNumber" />
<result column="fans_number" jdbcType="INTEGER" property="fansNumber" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -71,8 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
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
</sql>
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.StuTradeAccountInfoExample" resultMap="BaseResultMap">
select
@ -105,14 +102,12 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuTradeAccountInfo">
insert into stu_trade_account_info (id, account_name, account_balance,
user_id, reserved_one, reserved_two,
reserved_three, reserved_four, reserved_five
)
values (#{id,jdbcType=INTEGER}, #{accountName,jdbcType=VARCHAR}, #{accountBalance,jdbcType=DECIMAL},
#{userId,jdbcType=VARCHAR}, #{reservedOne,jdbcType=VARCHAR}, #{reservedTwo,jdbcType=VARCHAR},
#{reservedThree,jdbcType=VARCHAR}, #{reservedFour,jdbcType=VARCHAR}, #{reservedFive,jdbcType=VARCHAR}
)
insert into stu_trade_account_info (id, account_name, sharer_profile,
account_balance, user_id, attention_number,
fans_number)
values (#{id,jdbcType=INTEGER}, #{accountName,jdbcType=VARCHAR}, #{sharerProfile,jdbcType=VARCHAR},
#{accountBalance,jdbcType=DECIMAL}, #{userId,jdbcType=VARCHAR}, #{attentionNumber,jdbcType=INTEGER},
#{fansNumber,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuTradeAccountInfo">
insert into stu_trade_account_info
@ -123,26 +118,20 @@
<if test="accountName != null">
account_name,
</if>
<if test="sharerProfile != null">
sharer_profile,
</if>
<if test="accountBalance != null">
account_balance,
</if>
<if test="userId != null">
user_id,
</if>
<if test="reservedOne != null">
reserved_one,
</if>
<if test="reservedTwo != null">
reserved_two,
</if>
<if test="reservedThree != null">
reserved_three,
</if>
<if test="reservedFour != null">
reserved_four,
<if test="attentionNumber != null">
attention_number,
</if>
<if test="reservedFive != null">
reserved_five,
<if test="fansNumber != null">
fans_number,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -152,26 +141,20 @@
<if test="accountName != null">
#{accountName,jdbcType=VARCHAR},
</if>
<if test="sharerProfile != null">
#{sharerProfile,jdbcType=VARCHAR},
</if>
<if test="accountBalance != null">
#{accountBalance,jdbcType=DECIMAL},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="reservedOne != null">
#{reservedOne,jdbcType=VARCHAR},
</if>
<if test="reservedTwo != null">
#{reservedTwo,jdbcType=VARCHAR},
</if>
<if test="reservedThree != null">
#{reservedThree,jdbcType=VARCHAR},
</if>
<if test="reservedFour != null">
#{reservedFour,jdbcType=VARCHAR},
<if test="attentionNumber != null">
#{attentionNumber,jdbcType=INTEGER},
</if>
<if test="reservedFive != null">
#{reservedFive,jdbcType=VARCHAR},
<if test="fansNumber != null">
#{fansNumber,jdbcType=INTEGER},
</if>
</trim>
</insert>
@ -190,26 +173,20 @@
<if test="record.accountName != null">
account_name = #{record.accountName,jdbcType=VARCHAR},
</if>
<if test="record.sharerProfile != null">
sharer_profile = #{record.sharerProfile,jdbcType=VARCHAR},
</if>
<if test="record.accountBalance != null">
account_balance = #{record.accountBalance,jdbcType=DECIMAL},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.reservedOne != null">
reserved_one = #{record.reservedOne,jdbcType=VARCHAR},
</if>
<if test="record.reservedTwo != null">
reserved_two = #{record.reservedTwo,jdbcType=VARCHAR},
</if>
<if test="record.reservedThree != null">
reserved_three = #{record.reservedThree,jdbcType=VARCHAR},
</if>
<if test="record.reservedFour != null">
reserved_four = #{record.reservedFour,jdbcType=VARCHAR},
<if test="record.attentionNumber != null">
attention_number = #{record.attentionNumber,jdbcType=INTEGER},
</if>
<if test="record.reservedFive != null">
reserved_five = #{record.reservedFive,jdbcType=VARCHAR},
<if test="record.fansNumber != null">
fans_number = #{record.fansNumber,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
@ -220,13 +197,11 @@
update stu_trade_account_info
set id = #{record.id,jdbcType=INTEGER},
account_name = #{record.accountName,jdbcType=VARCHAR},
sharer_profile = #{record.sharerProfile,jdbcType=VARCHAR},
account_balance = #{record.accountBalance,jdbcType=DECIMAL},
user_id = #{record.userId,jdbcType=VARCHAR},
reserved_one = #{record.reservedOne,jdbcType=VARCHAR},
reserved_two = #{record.reservedTwo,jdbcType=VARCHAR},
reserved_three = #{record.reservedThree,jdbcType=VARCHAR},
reserved_four = #{record.reservedFour,jdbcType=VARCHAR},
reserved_five = #{record.reservedFive,jdbcType=VARCHAR}
attention_number = #{record.attentionNumber,jdbcType=INTEGER},
fans_number = #{record.fansNumber,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -237,26 +212,20 @@
<if test="accountName != null">
account_name = #{accountName,jdbcType=VARCHAR},
</if>
<if test="sharerProfile != null">
sharer_profile = #{sharerProfile,jdbcType=VARCHAR},
</if>
<if test="accountBalance != null">
account_balance = #{accountBalance,jdbcType=DECIMAL},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="reservedOne != null">
reserved_one = #{reservedOne,jdbcType=VARCHAR},
</if>
<if test="reservedTwo != null">
reserved_two = #{reservedTwo,jdbcType=VARCHAR},
</if>
<if test="reservedThree != null">
reserved_three = #{reservedThree,jdbcType=VARCHAR},
</if>
<if test="reservedFour != null">
reserved_four = #{reservedFour,jdbcType=VARCHAR},
<if test="attentionNumber != null">
attention_number = #{attentionNumber,jdbcType=INTEGER},
</if>
<if test="reservedFive != null">
reserved_five = #{reservedFive,jdbcType=VARCHAR},
<if test="fansNumber != null">
fans_number = #{fansNumber,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
@ -264,13 +233,11 @@
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.StuTradeAccountInfo">
update stu_trade_account_info
set account_name = #{accountName,jdbcType=VARCHAR},
sharer_profile = #{sharerProfile,jdbcType=VARCHAR},
account_balance = #{accountBalance,jdbcType=DECIMAL},
user_id = #{userId,jdbcType=VARCHAR},
reserved_one = #{reservedOne,jdbcType=VARCHAR},
reserved_two = #{reservedTwo,jdbcType=VARCHAR},
reserved_three = #{reservedThree,jdbcType=VARCHAR},
reserved_four = #{reservedFour,jdbcType=VARCHAR},
reserved_five = #{reservedFive,jdbcType=VARCHAR}
attention_number = #{attentionNumber,jdbcType=INTEGER},
fans_number = #{fansNumber,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
Loading…
Cancel
Save