项目十二:商品信息管理和销售管理

main
@t2652009480
parent 023927f3a1
commit 3b2b4bfa84

@ -0,0 +1,125 @@
package com.sztzjy.trade.controller.stu;
import com.sztzjy.trade.annotation.AnonymousAccess;
import com.sztzjy.trade.entity.StuGoodsCommentInfo;
import com.sztzjy.trade.entity.dto.StuGoodsInfoDTO;
import com.sztzjy.trade.service.StuGoodsManageCenterService;
import com.sztzjy.trade.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.checkerframework.checker.units.qual.A;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
/**
* @author tz
* @date 2024/11/1 13:20
*/
@RequestMapping("api/stu/manageCenter")
@RestController
@Api(tags = "商品管理中心")
public class StuGoodsManageCenterController {
@Resource
StuGoodsManageCenterService manageCenterService;
@ApiOperation("商品列表展示")
@PostMapping("/getGoodsList")
@AnonymousAccess
public ResultEntity getMyOrderInfo(@ApiParam("用户ID") String userId,
@ApiParam("当前页") Integer index,
@ApiParam("每页条数") Integer size){
return new ResultEntity(HttpStatus.OK,"商品列表展示",manageCenterService.getGoodsList(userId,index,size));
}
@ApiOperation("商品销售管理列表展示")
@PostMapping("/getGoodsSalesManagementList")
@AnonymousAccess
public ResultEntity getGoodsSalesManagementList(@ApiParam("用户ID") String userId,
@ApiParam("当前页") Integer index,
@ApiParam("每页条数") Integer size){
return new ResultEntity(HttpStatus.OK,"商品销售管理列表展示",manageCenterService.getGoodsSalesManagementList(userId,index,size));
}
@ApiOperation("保存")
@PostMapping("/save")
@AnonymousAccess
public ResultEntity save(@RequestBody StuGoodsInfoDTO stuGoodsInfoDTO,
@ApiParam("商品主图片")@RequestParam(required = false) MultipartFile file,
@ApiParam("轮播图集合")@RequestParam(required = false) List<MultipartFile> files){
Integer result = manageCenterService.save(stuGoodsInfoDTO, file, files);
if(result>0){
return new ResultEntity(HttpStatus.OK,"保存成功");
}else {
return new ResultEntity(HttpStatus.OK,"保存失败,请联系管理员");
}
}
@ApiOperation("新增")
@PostMapping("/add")
@AnonymousAccess
public ResultEntity add(@RequestBody StuGoodsInfoDTO stuGoodsInfoDTO,
@ApiParam("商品主图片") MultipartFile file,
@ApiParam("轮播图集合")@RequestParam(required = false) List<MultipartFile> files){
Integer result = manageCenterService.add(stuGoodsInfoDTO, file, files);
if(result>0){
return new ResultEntity(HttpStatus.OK,"新增成功");
}else {
return new ResultEntity(HttpStatus.OK,"新增失败,请联系管理员");
}
}
@ApiOperation("编辑")
@PostMapping("/update")
@AnonymousAccess
public ResultEntity update(@RequestBody StuGoodsInfoDTO stuGoodsInfoDTO,
@ApiParam("商品主图片") MultipartFile file,
@ApiParam("轮播图集合")@RequestParam(required = false) List<MultipartFile> files){
Integer result = manageCenterService.update(stuGoodsInfoDTO, file, files);
if(result>0){
return new ResultEntity(HttpStatus.OK,"编辑成功");
}else {
return new ResultEntity(HttpStatus.OK,"编辑失败,请联系管理员");
}
}
@ApiOperation("下架")
@PostMapping("/remove")
@AnonymousAccess
public ResultEntity remove(Integer id){
Integer result = manageCenterService.remove(id);
if(result>0){
return new ResultEntity(HttpStatus.OK,"上架成功");
}else {
return new ResultEntity(HttpStatus.OK,"上架失败,请联系管理员");
}
}
@ApiOperation("上架")
@PostMapping("/listing")
@AnonymousAccess
public ResultEntity listing(@ApiParam("商品ID") Integer id,
@ApiParam("上架数量") Integer number,
@ApiParam("上架所需资金") String requiredFunds,
@ApiParam("账户余额") String balance){
Integer result = manageCenterService.listing(id,number,requiredFunds,balance);
if(result>0){
return new ResultEntity(HttpStatus.OK,"上架成功");
}else {
return new ResultEntity(HttpStatus.OK,"上架失败,请联系管理员");
}
}
}

@ -1,6 +1,7 @@
package com.sztzjy.trade.controller.stu;
import com.sztzjy.trade.annotation.AnonymousAccess;
import com.sztzjy.trade.entity.StuGoodsCommentInfo;
import com.sztzjy.trade.service.StuGoodsTradingCenterService;
import com.sztzjy.trade.util.ResultEntity;
import com.sztzjy.trade.annotation.AnonymousAccess;
@ -10,12 +11,14 @@ import com.sztzjy.trade.service.StuGoodsTradingCenterService;
import com.sztzjy.trade.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.List;
@ -163,6 +166,20 @@ public class StuGoodsTradingCenterController {
return new ResultEntity(HttpStatus.OK,"我的订单展示",tradingCenterService.getMyOrderInfo(userId,index,size,orderType,name));
}
@ApiOperation("订单评价")
@PostMapping("/orderEvaluation")
@AnonymousAccess
public ResultEntity orderEvaluation(@RequestBody StuGoodsCommentInfo commentInfo,
@RequestParam List<MultipartFile> files){
Integer result = tradingCenterService.orderEvaluation(commentInfo, files);
if(result>0){
return new ResultEntity(HttpStatus.OK,"订单评价成功");
}else {
return new ResultEntity(HttpStatus.OK,"订单评价失败,请联系管理员");
}
}
@ApiOperation("商品排序")
@PostMapping("/goodsOrder")
@ -177,6 +194,22 @@ public class StuGoodsTradingCenterController {
}
@ApiOperation("举报/点赞/回复")
@PostMapping("/operate")
@AnonymousAccess
public ResultEntity operate(@ApiParam("评论ID") Integer id,
@ApiParam("用户ID") String userId,
@ApiParam("操作类型(举报/点赞/回复)") String operateType,
@ApiParam("举报类型(不为举报不传)")@RequestParam(required = false) String reportType,
@ApiParam("举报/回复内容(点赞不传)")@RequestParam(required = false) String content ){
Integer result=tradingCenterService.operate(id,userId,operateType,reportType,content);
if(result>1){return new ResultEntity(HttpStatus.OK,operateType+"成功");}
else {return new ResultEntity(HttpStatus.OK,operateType+"失败,请联系管理员");}
}

@ -0,0 +1,83 @@
package com.sztzjy.trade.entity;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
*
*
* @author whb
* stu_comment_report_info
*/
public class StuCommentReportInfo {
@ApiModelProperty(notes = "ID")
private Integer id;
@ApiModelProperty(notes = "评论ID")
private Integer commentId;
@ApiModelProperty(notes = "举报类型")
private String reportType;
@ApiModelProperty(notes = "举报原因")
private String reportReason;
@ApiModelProperty(notes = "用户ID")
private String userId;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@ApiModelProperty(notes = "创建时间")
private Date createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCommentId() {
return commentId;
}
public void setCommentId(Integer commentId) {
this.commentId = commentId;
}
public String getReportType() {
return reportType;
}
public void setReportType(String reportType) {
this.reportType = reportType == null ? null : reportType.trim();
}
public String getReportReason() {
return reportReason;
}
public void setReportReason(String reportReason) {
this.reportReason = reportReason == null ? null : reportReason.trim();
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId == null ? null : userId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,590 @@
package com.sztzjy.trade.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class StuCommentReportInfoExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public StuCommentReportInfoExample() {
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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 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<Integer> values) {
addCriterion("comment_id in", values, "commentId");
return (Criteria) this;
}
public Criteria andCommentIdNotIn(List<Integer> 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 andReportTypeIsNull() {
addCriterion("report_type is null");
return (Criteria) this;
}
public Criteria andReportTypeIsNotNull() {
addCriterion("report_type is not null");
return (Criteria) this;
}
public Criteria andReportTypeEqualTo(String value) {
addCriterion("report_type =", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeNotEqualTo(String value) {
addCriterion("report_type <>", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeGreaterThan(String value) {
addCriterion("report_type >", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeGreaterThanOrEqualTo(String value) {
addCriterion("report_type >=", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeLessThan(String value) {
addCriterion("report_type <", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeLessThanOrEqualTo(String value) {
addCriterion("report_type <=", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeLike(String value) {
addCriterion("report_type like", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeNotLike(String value) {
addCriterion("report_type not like", value, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeIn(List<String> values) {
addCriterion("report_type in", values, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeNotIn(List<String> values) {
addCriterion("report_type not in", values, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeBetween(String value1, String value2) {
addCriterion("report_type between", value1, value2, "reportType");
return (Criteria) this;
}
public Criteria andReportTypeNotBetween(String value1, String value2) {
addCriterion("report_type not between", value1, value2, "reportType");
return (Criteria) this;
}
public Criteria andReportReasonIsNull() {
addCriterion("report_reason is null");
return (Criteria) this;
}
public Criteria andReportReasonIsNotNull() {
addCriterion("report_reason is not null");
return (Criteria) this;
}
public Criteria andReportReasonEqualTo(String value) {
addCriterion("report_reason =", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonNotEqualTo(String value) {
addCriterion("report_reason <>", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonGreaterThan(String value) {
addCriterion("report_reason >", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonGreaterThanOrEqualTo(String value) {
addCriterion("report_reason >=", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonLessThan(String value) {
addCriterion("report_reason <", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonLessThanOrEqualTo(String value) {
addCriterion("report_reason <=", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonLike(String value) {
addCriterion("report_reason like", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonNotLike(String value) {
addCriterion("report_reason not like", value, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonIn(List<String> values) {
addCriterion("report_reason in", values, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonNotIn(List<String> values) {
addCriterion("report_reason not in", values, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonBetween(String value1, String value2) {
addCriterion("report_reason between", value1, value2, "reportReason");
return (Criteria) this;
}
public Criteria andReportReasonNotBetween(String value1, String value2) {
addCriterion("report_reason not between", value1, value2, "reportReason");
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<String> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<String> 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 andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
}
public 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);
}
}
}

@ -37,6 +37,18 @@ public class StuGoodsCommentInfo {
@ApiModelProperty(notes = "商品ID")
private Integer goodsId;
@ApiModelProperty(notes = "关联评论id")
private Integer commentId;
@ApiModelProperty(notes = "点赞次数 (默认为0 未点赞)")
private Integer giveTheThumbsUp;
@ApiModelProperty(notes = "回复次数 (默认为0 未回复)")
private Integer replyFrequency;
@ApiModelProperty(notes = "举报次数 (默认为0 未举报)")
private Integer reportFrequency;
@ApiModelProperty(notes = "电脑传图 json类型type,url")
private String imageUpload;
@ -112,6 +124,38 @@ public class StuGoodsCommentInfo {
this.goodsId = goodsId;
}
public Integer getCommentId() {
return commentId;
}
public void setCommentId(Integer commentId) {
this.commentId = commentId;
}
public Integer getGiveTheThumbsUp() {
return giveTheThumbsUp;
}
public void setGiveTheThumbsUp(Integer giveTheThumbsUp) {
this.giveTheThumbsUp = giveTheThumbsUp;
}
public Integer getReplyFrequency() {
return replyFrequency;
}
public void setReplyFrequency(Integer replyFrequency) {
this.replyFrequency = replyFrequency;
}
public Integer getReportFrequency() {
return reportFrequency;
}
public void setReportFrequency(Integer reportFrequency) {
this.reportFrequency = reportFrequency;
}
public String getImageUpload() {
return imageUpload;
}

@ -674,6 +674,246 @@ public class StuGoodsCommentInfoExample {
addCriterion("goods_id not between", value1, value2, "goodsId");
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<Integer> values) {
addCriterion("comment_id in", values, "commentId");
return (Criteria) this;
}
public Criteria andCommentIdNotIn(List<Integer> 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 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<Integer> values) {
addCriterion("give_the_thumbs_up in", values, "giveTheThumbsUp");
return (Criteria) this;
}
public Criteria andGiveTheThumbsUpNotIn(List<Integer> 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 andReplyFrequencyIsNull() {
addCriterion("reply_frequency is null");
return (Criteria) this;
}
public Criteria andReplyFrequencyIsNotNull() {
addCriterion("reply_frequency is not null");
return (Criteria) this;
}
public Criteria andReplyFrequencyEqualTo(Integer value) {
addCriterion("reply_frequency =", value, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyNotEqualTo(Integer value) {
addCriterion("reply_frequency <>", value, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyGreaterThan(Integer value) {
addCriterion("reply_frequency >", value, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyGreaterThanOrEqualTo(Integer value) {
addCriterion("reply_frequency >=", value, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyLessThan(Integer value) {
addCriterion("reply_frequency <", value, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyLessThanOrEqualTo(Integer value) {
addCriterion("reply_frequency <=", value, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyIn(List<Integer> values) {
addCriterion("reply_frequency in", values, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyNotIn(List<Integer> values) {
addCriterion("reply_frequency not in", values, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyBetween(Integer value1, Integer value2) {
addCriterion("reply_frequency between", value1, value2, "replyFrequency");
return (Criteria) this;
}
public Criteria andReplyFrequencyNotBetween(Integer value1, Integer value2) {
addCriterion("reply_frequency not between", value1, value2, "replyFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyIsNull() {
addCriterion("report_frequency is null");
return (Criteria) this;
}
public Criteria andReportFrequencyIsNotNull() {
addCriterion("report_frequency is not null");
return (Criteria) this;
}
public Criteria andReportFrequencyEqualTo(Integer value) {
addCriterion("report_frequency =", value, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyNotEqualTo(Integer value) {
addCriterion("report_frequency <>", value, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyGreaterThan(Integer value) {
addCriterion("report_frequency >", value, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyGreaterThanOrEqualTo(Integer value) {
addCriterion("report_frequency >=", value, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyLessThan(Integer value) {
addCriterion("report_frequency <", value, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyLessThanOrEqualTo(Integer value) {
addCriterion("report_frequency <=", value, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyIn(List<Integer> values) {
addCriterion("report_frequency in", values, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyNotIn(List<Integer> values) {
addCriterion("report_frequency not in", values, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyBetween(Integer value1, Integer value2) {
addCriterion("report_frequency between", value1, value2, "reportFrequency");
return (Criteria) this;
}
public Criteria andReportFrequencyNotBetween(Integer value1, Integer value2) {
addCriterion("report_frequency not between", value1, value2, "reportFrequency");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

@ -31,6 +31,9 @@ public class StuGoodsInfo {
@ApiModelProperty(notes = "毛利率")
private String grossMargin;
@ApiModelProperty(notes = "商品单价")
private BigDecimal goodsUnitPrice;
@ApiModelProperty(notes = "商品主图片")
private String goodsMainImage;
@ -91,6 +94,9 @@ public class StuGoodsInfo {
@ApiModelProperty(notes = "学校ID")
private String schoolId;
@ApiModelProperty(notes = "提交状态0未提交 1已提交")
private Integer submitState;
@ApiModelProperty(notes = "商品介绍")
private String goodsIntroduction;
@ -153,6 +159,14 @@ public class StuGoodsInfo {
this.grossMargin = grossMargin == null ? null : grossMargin.trim();
}
public BigDecimal getGoodsUnitPrice() {
return goodsUnitPrice;
}
public void setGoodsUnitPrice(BigDecimal goodsUnitPrice) {
this.goodsUnitPrice = goodsUnitPrice;
}
public String getGoodsMainImage() {
return goodsMainImage;
}
@ -313,6 +327,14 @@ public class StuGoodsInfo {
this.schoolId = schoolId == null ? null : schoolId.trim();
}
public Integer getSubmitState() {
return submitState;
}
public void setSubmitState(Integer submitState) {
this.submitState = submitState;
}
public String getGoodsIntroduction() {
return goodsIntroduction;
}

@ -576,6 +576,66 @@ public class StuGoodsInfoExample {
return (Criteria) this;
}
public Criteria andGoodsUnitPriceIsNull() {
addCriterion("goods_unit_price is null");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceIsNotNull() {
addCriterion("goods_unit_price is not null");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceEqualTo(BigDecimal value) {
addCriterion("goods_unit_price =", value, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceNotEqualTo(BigDecimal value) {
addCriterion("goods_unit_price <>", value, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceGreaterThan(BigDecimal value) {
addCriterion("goods_unit_price >", value, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("goods_unit_price >=", value, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceLessThan(BigDecimal value) {
addCriterion("goods_unit_price <", value, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("goods_unit_price <=", value, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceIn(List<BigDecimal> values) {
addCriterion("goods_unit_price in", values, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceNotIn(List<BigDecimal> values) {
addCriterion("goods_unit_price not in", values, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_unit_price between", value1, value2, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsUnitPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_unit_price not between", value1, value2, "goodsUnitPrice");
return (Criteria) this;
}
public Criteria andGoodsMainImageIsNull() {
addCriterion("goods_main_image is null");
return (Criteria) this;
@ -1895,6 +1955,66 @@ public class StuGoodsInfoExample {
addCriterion("school_id not between", value1, value2, "schoolId");
return (Criteria) this;
}
public Criteria andSubmitStateIsNull() {
addCriterion("submit_state is null");
return (Criteria) this;
}
public Criteria andSubmitStateIsNotNull() {
addCriterion("submit_state is not null");
return (Criteria) this;
}
public Criteria andSubmitStateEqualTo(Integer value) {
addCriterion("submit_state =", value, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateNotEqualTo(Integer value) {
addCriterion("submit_state <>", value, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateGreaterThan(Integer value) {
addCriterion("submit_state >", value, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateGreaterThanOrEqualTo(Integer value) {
addCriterion("submit_state >=", value, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateLessThan(Integer value) {
addCriterion("submit_state <", value, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateLessThanOrEqualTo(Integer value) {
addCriterion("submit_state <=", value, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateIn(List<Integer> values) {
addCriterion("submit_state in", values, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateNotIn(List<Integer> values) {
addCriterion("submit_state not in", values, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateBetween(Integer value1, Integer value2) {
addCriterion("submit_state between", value1, value2, "submitState");
return (Criteria) this;
}
public Criteria andSubmitStateNotBetween(Integer value1, Integer value2) {
addCriterion("submit_state not between", value1, value2, "submitState");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

@ -0,0 +1,100 @@
package com.sztzjy.trade.entity;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
/**
*
*
* @author whb
* stu_goods_promotion_pricing
*/
public class StuGoodsPromotionPricing {
@ApiModelProperty(notes = "ID")
private Integer id;
@ApiModelProperty(notes = "商品ID")
private Integer goodsId;
@ApiModelProperty(notes = "促销名称")
private String promotionName;
@ApiModelProperty(notes = "重量")
private BigDecimal weight;
@ApiModelProperty(notes = "促销成本价")
private BigDecimal promotionCostPrice;
@ApiModelProperty(notes = "最高价")
private BigDecimal maximumPrice;
@ApiModelProperty(notes = "促销定价")
private BigDecimal fixAPrice;
@ApiModelProperty(notes = "用户ID")
private String userId;
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 getPromotionName() {
return promotionName;
}
public void setPromotionName(String promotionName) {
this.promotionName = promotionName == null ? null : promotionName.trim();
}
public BigDecimal getWeight() {
return weight;
}
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
public BigDecimal getPromotionCostPrice() {
return promotionCostPrice;
}
public void setPromotionCostPrice(BigDecimal promotionCostPrice) {
this.promotionCostPrice = promotionCostPrice;
}
public BigDecimal getMaximumPrice() {
return maximumPrice;
}
public void setMaximumPrice(BigDecimal maximumPrice) {
this.maximumPrice = maximumPrice;
}
public BigDecimal getFixAPrice() {
return fixAPrice;
}
public void setFixAPrice(BigDecimal fixAPrice) {
this.fixAPrice = fixAPrice;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId == null ? null : userId.trim();
}
}

@ -0,0 +1,700 @@
package com.sztzjy.trade.entity;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class StuGoodsPromotionPricingExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public StuGoodsPromotionPricingExample() {
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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<Integer> values) {
addCriterion("\" goods_id\" in", values, "goodsId");
return (Criteria) this;
}
public Criteria andGoodsIdNotIn(List<Integer> 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 andPromotionNameIsNull() {
addCriterion("promotion_name is null");
return (Criteria) this;
}
public Criteria andPromotionNameIsNotNull() {
addCriterion("promotion_name is not null");
return (Criteria) this;
}
public Criteria andPromotionNameEqualTo(String value) {
addCriterion("promotion_name =", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameNotEqualTo(String value) {
addCriterion("promotion_name <>", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameGreaterThan(String value) {
addCriterion("promotion_name >", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameGreaterThanOrEqualTo(String value) {
addCriterion("promotion_name >=", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameLessThan(String value) {
addCriterion("promotion_name <", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameLessThanOrEqualTo(String value) {
addCriterion("promotion_name <=", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameLike(String value) {
addCriterion("promotion_name like", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameNotLike(String value) {
addCriterion("promotion_name not like", value, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameIn(List<String> values) {
addCriterion("promotion_name in", values, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameNotIn(List<String> values) {
addCriterion("promotion_name not in", values, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameBetween(String value1, String value2) {
addCriterion("promotion_name between", value1, value2, "promotionName");
return (Criteria) this;
}
public Criteria andPromotionNameNotBetween(String value1, String value2) {
addCriterion("promotion_name not between", value1, value2, "promotionName");
return (Criteria) this;
}
public Criteria andWeightIsNull() {
addCriterion("weight is null");
return (Criteria) this;
}
public Criteria andWeightIsNotNull() {
addCriterion("weight is not null");
return (Criteria) this;
}
public Criteria andWeightEqualTo(BigDecimal value) {
addCriterion("weight =", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotEqualTo(BigDecimal value) {
addCriterion("weight <>", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThan(BigDecimal value) {
addCriterion("weight >", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("weight >=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThan(BigDecimal value) {
addCriterion("weight <", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThanOrEqualTo(BigDecimal value) {
addCriterion("weight <=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightIn(List<BigDecimal> values) {
addCriterion("weight in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightNotIn(List<BigDecimal> values) {
addCriterion("weight not in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("weight between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andWeightNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("weight not between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andPromotionCostPriceIsNull() {
addCriterion("promotion_cost_price is null");
return (Criteria) this;
}
public Criteria andPromotionCostPriceIsNotNull() {
addCriterion("promotion_cost_price is not null");
return (Criteria) this;
}
public Criteria andPromotionCostPriceEqualTo(BigDecimal value) {
addCriterion("promotion_cost_price =", value, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceNotEqualTo(BigDecimal value) {
addCriterion("promotion_cost_price <>", value, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceGreaterThan(BigDecimal value) {
addCriterion("promotion_cost_price >", value, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("promotion_cost_price >=", value, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceLessThan(BigDecimal value) {
addCriterion("promotion_cost_price <", value, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("promotion_cost_price <=", value, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceIn(List<BigDecimal> values) {
addCriterion("promotion_cost_price in", values, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceNotIn(List<BigDecimal> values) {
addCriterion("promotion_cost_price not in", values, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("promotion_cost_price between", value1, value2, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andPromotionCostPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("promotion_cost_price not between", value1, value2, "promotionCostPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceIsNull() {
addCriterion("maximum_price is null");
return (Criteria) this;
}
public Criteria andMaximumPriceIsNotNull() {
addCriterion("maximum_price is not null");
return (Criteria) this;
}
public Criteria andMaximumPriceEqualTo(BigDecimal value) {
addCriterion("maximum_price =", value, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceNotEqualTo(BigDecimal value) {
addCriterion("maximum_price <>", value, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceGreaterThan(BigDecimal value) {
addCriterion("maximum_price >", value, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("maximum_price >=", value, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceLessThan(BigDecimal value) {
addCriterion("maximum_price <", value, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("maximum_price <=", value, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceIn(List<BigDecimal> values) {
addCriterion("maximum_price in", values, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceNotIn(List<BigDecimal> values) {
addCriterion("maximum_price not in", values, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("maximum_price between", value1, value2, "maximumPrice");
return (Criteria) this;
}
public Criteria andMaximumPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("maximum_price not between", value1, value2, "maximumPrice");
return (Criteria) this;
}
public Criteria andFixAPriceIsNull() {
addCriterion("fix_a_price is null");
return (Criteria) this;
}
public Criteria andFixAPriceIsNotNull() {
addCriterion("fix_a_price is not null");
return (Criteria) this;
}
public Criteria andFixAPriceEqualTo(BigDecimal value) {
addCriterion("fix_a_price =", value, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceNotEqualTo(BigDecimal value) {
addCriterion("fix_a_price <>", value, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceGreaterThan(BigDecimal value) {
addCriterion("fix_a_price >", value, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("fix_a_price >=", value, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceLessThan(BigDecimal value) {
addCriterion("fix_a_price <", value, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("fix_a_price <=", value, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceIn(List<BigDecimal> values) {
addCriterion("fix_a_price in", values, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceNotIn(List<BigDecimal> values) {
addCriterion("fix_a_price not in", values, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("fix_a_price between", value1, value2, "fixAPrice");
return (Criteria) this;
}
public Criteria andFixAPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("fix_a_price not between", value1, value2, "fixAPrice");
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<String> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<String> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(String value1, String value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(String value1, String value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -2,7 +2,10 @@ package com.sztzjy.trade.entity;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
*
*
@ -53,6 +56,8 @@ public class StuGoodsSalesManage {
private Integer numberOfShares;
@ApiModelProperty(notes = "上架时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date onlineTime;
@ApiModelProperty(notes = "是否展示1上架展示 0下架不展示")

@ -45,6 +45,12 @@ public class StuShoppingCartInfo {
@ApiModelProperty(notes = "用户ID")
private String userId;
@ApiModelProperty(notes = "是否为促销购买0否 1是")
private Integer promotionState;
@ApiModelProperty(notes = "促销ID")
private Integer promotionId;
@ApiModelProperty(notes = "商品规格")
private String goodsSpecification;
@ -144,6 +150,22 @@ public class StuShoppingCartInfo {
this.userId = userId == null ? null : userId.trim();
}
public Integer getPromotionState() {
return promotionState;
}
public void setPromotionState(Integer promotionState) {
this.promotionState = promotionState;
}
public Integer getPromotionId() {
return promotionId;
}
public void setPromotionId(Integer promotionId) {
this.promotionId = promotionId;
}
public String getGoodsSpecification() {
return goodsSpecification;
}

@ -884,6 +884,126 @@ public class StuShoppingCartInfoExample {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andPromotionStateIsNull() {
addCriterion("promotion_state is null");
return (Criteria) this;
}
public Criteria andPromotionStateIsNotNull() {
addCriterion("promotion_state is not null");
return (Criteria) this;
}
public Criteria andPromotionStateEqualTo(Integer value) {
addCriterion("promotion_state =", value, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateNotEqualTo(Integer value) {
addCriterion("promotion_state <>", value, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateGreaterThan(Integer value) {
addCriterion("promotion_state >", value, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateGreaterThanOrEqualTo(Integer value) {
addCriterion("promotion_state >=", value, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateLessThan(Integer value) {
addCriterion("promotion_state <", value, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateLessThanOrEqualTo(Integer value) {
addCriterion("promotion_state <=", value, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateIn(List<Integer> values) {
addCriterion("promotion_state in", values, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateNotIn(List<Integer> values) {
addCriterion("promotion_state not in", values, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateBetween(Integer value1, Integer value2) {
addCriterion("promotion_state between", value1, value2, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionStateNotBetween(Integer value1, Integer value2) {
addCriterion("promotion_state not between", value1, value2, "promotionState");
return (Criteria) this;
}
public Criteria andPromotionIdIsNull() {
addCriterion("promotion_id is null");
return (Criteria) this;
}
public Criteria andPromotionIdIsNotNull() {
addCriterion("promotion_id is not null");
return (Criteria) this;
}
public Criteria andPromotionIdEqualTo(Integer value) {
addCriterion("promotion_id =", value, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdNotEqualTo(Integer value) {
addCriterion("promotion_id <>", value, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdGreaterThan(Integer value) {
addCriterion("promotion_id >", value, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdGreaterThanOrEqualTo(Integer value) {
addCriterion("promotion_id >=", value, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdLessThan(Integer value) {
addCriterion("promotion_id <", value, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdLessThanOrEqualTo(Integer value) {
addCriterion("promotion_id <=", value, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdIn(List<Integer> values) {
addCriterion("promotion_id in", values, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdNotIn(List<Integer> values) {
addCriterion("promotion_id not in", values, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdBetween(Integer value1, Integer value2) {
addCriterion("promotion_id between", value1, value2, "promotionId");
return (Criteria) this;
}
public Criteria andPromotionIdNotBetween(Integer value1, Integer value2) {
addCriterion("promotion_id not between", value1, value2, "promotionId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

@ -0,0 +1,75 @@
package com.sztzjy.trade.entity.dto;
import com.sztzjy.trade.entity.StuGoodsPromotionPricing;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* @author tz
* @date 2024/11/1 16:33
*/
@Data
public class StuGoodsInfoDTO {
@ApiModelProperty(notes = "ID")
private Integer id;
@ApiModelProperty(notes = "商品名称")
private String goodsName;
@ApiModelProperty(notes = "商品类型")
private String goodsType;
@ApiModelProperty(notes = "商品小类")
private String goodsSubclass;
@ApiModelProperty(notes = "计价单位")
private String pricingUnit;
@ApiModelProperty(notes = "单位成本价")
private BigDecimal unitCostPrice;
@ApiModelProperty(notes = "毛利率")
private String grossMargin;
@ApiModelProperty(notes = "匹配群体")
private String matchingGroups;
@ApiModelProperty(notes = "商品主图片")
private String goodsMainImage;
@ApiModelProperty(notes = "轮播图(多个逗号隔开)")
private String carouselImage;
@ApiModelProperty(notes = "分享数")
private Integer numberOfShares;
@ApiModelProperty(notes = "分享折扣")
private String shareDiscounts;
@ApiModelProperty(notes = "分享分销提成")
private String shareCommission;
@ApiModelProperty(notes = "短视频分销提成")
private String shortVideoCommission;
@ApiModelProperty(notes = "内容分销提成")
private String contentCommission;
@ApiModelProperty(notes = "产品关键字(多个逗号隔开)")
private String[] productKeyword;
@ApiModelProperty(notes = "商品介绍")
private String goodsIntroduction;
@ApiModelProperty(notes = "规格与包装")
private String specificationPackaging;
@ApiModelProperty(notes = "商品定价促销种类集合")
private List<StuGoodsPromotionPricing> promotionPricingList;
@ApiModelProperty(notes = "用户ID")
private String userId;
}

@ -0,0 +1,30 @@
package com.sztzjy.trade.mapper;
import com.sztzjy.trade.entity.StuCommentReportInfo;
import com.sztzjy.trade.entity.StuCommentReportInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface StuCommentReportInfoMapper {
long countByExample(StuCommentReportInfoExample example);
int deleteByExample(StuCommentReportInfoExample example);
int deleteByPrimaryKey(Integer id);
int insert(StuCommentReportInfo record);
int insertSelective(StuCommentReportInfo record);
List<StuCommentReportInfo> selectByExample(StuCommentReportInfoExample example);
StuCommentReportInfo selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") StuCommentReportInfo record, @Param("example") StuCommentReportInfoExample example);
int updateByExample(@Param("record") StuCommentReportInfo record, @Param("example") StuCommentReportInfoExample example);
int updateByPrimaryKeySelective(StuCommentReportInfo record);
int updateByPrimaryKey(StuCommentReportInfo record);
}

@ -0,0 +1,30 @@
package com.sztzjy.trade.mapper;
import com.sztzjy.trade.entity.StuGoodsPromotionPricing;
import com.sztzjy.trade.entity.StuGoodsPromotionPricingExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface StuGoodsPromotionPricingMapper {
long countByExample(StuGoodsPromotionPricingExample example);
int deleteByExample(StuGoodsPromotionPricingExample example);
int deleteByPrimaryKey(Integer id);
int insert(StuGoodsPromotionPricing record);
int insertSelective(StuGoodsPromotionPricing record);
List<StuGoodsPromotionPricing> selectByExample(StuGoodsPromotionPricingExample example);
StuGoodsPromotionPricing selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") StuGoodsPromotionPricing record, @Param("example") StuGoodsPromotionPricingExample example);
int updateByExample(@Param("record") StuGoodsPromotionPricing record, @Param("example") StuGoodsPromotionPricingExample example);
int updateByPrimaryKeySelective(StuGoodsPromotionPricing record);
int updateByPrimaryKey(StuGoodsPromotionPricing record);
}

@ -3,10 +3,8 @@ package com.sztzjy.trade.mapper;
import com.sztzjy.trade.entity.StuShoppingCartInfo;
import com.sztzjy.trade.entity.StuShoppingCartInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface StuShoppingCartInfoMapper {
long countByExample(StuShoppingCartInfoExample example);

@ -0,0 +1,29 @@
package com.sztzjy.trade.service;
import com.github.pagehelper.PageInfo;
import com.sztzjy.trade.entity.StuGoodSalesManage;
import com.sztzjy.trade.entity.StuGoodsInfo;
import com.sztzjy.trade.entity.dto.StuGoodsInfoDTO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* @author tz
* @date 2024/11/1 13:21
*/
public interface StuGoodsManageCenterService {
PageInfo<StuGoodsInfo> getGoodsList(String userId, Integer index, Integer size);
PageInfo<StuGoodSalesManage> getGoodsSalesManagementList(String userId, Integer index, Integer size);
Integer save(StuGoodsInfoDTO stuGoodsInfoDTO, MultipartFile file, List<MultipartFile> files);
Integer add(StuGoodsInfoDTO stuGoodsInfoDTO, MultipartFile file, List<MultipartFile> files);
Integer update(StuGoodsInfoDTO stuGoodsInfoDTO, MultipartFile file, List<MultipartFile> files);
Integer remove(Integer id);
Integer listing(Integer id, Integer number, String requiredFunds,String balance);
}

@ -1,6 +1,7 @@
package com.sztzjy.trade.service;
import com.github.pagehelper.PageInfo;
import com.sztzjy.trade.entity.StuGoodsCommentInfo;
import com.sztzjy.trade.entity.StuGoodsOrderInfo;
import com.sztzjy.trade.entity.StuShoppingCartInfo;
import com.sztzjy.trade.entity.dto.StuSettlementDTO;
@ -8,6 +9,7 @@ import org.springframework.security.core.parameters.P;
import java.util.List;
import com.sztzjy.trade.util.ResultEntity;
import org.springframework.web.multipart.MultipartFile;
/**
* @author tz
@ -47,4 +49,8 @@ public interface StuGoodsTradingCenterService {
//商品排序
ResultEntity goodsOrder(String keyword, String userId, Integer index, Integer size,Integer type);
Integer orderEvaluation(StuGoodsCommentInfo commentInfo, List<MultipartFile> files);
Integer operate(Integer id,String userId, String operateType, String reportType, String content);
}

@ -0,0 +1,317 @@
package com.sztzjy.trade.service.impl;
import com.github.pagehelper.PageInfo;
import com.sztzjy.trade.config.exception.handler.ServiceException;
import com.sztzjy.trade.entity.*;
import com.sztzjy.trade.entity.dto.StuGoodsInfoDTO;
import com.sztzjy.trade.mapper.StuGoodsInfoMapper;
import com.sztzjy.trade.mapper.StuGoodsPromotionPricingMapper;
import com.sztzjy.trade.mapper.StuGoodsSalesManageMapper;
import com.sztzjy.trade.service.StuGoodsManageCenterService;
import com.sztzjy.trade.util.ConvertUtil;
import com.sztzjy.trade.util.PageUtil;
import com.sztzjy.trade.util.file.IFileUtil;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* @author tz
* @date 2024/11/1 13:21
*/
@Service
public class StuGoodsManageCenterServiceImpl implements StuGoodsManageCenterService {
@Resource
StuGoodsInfoMapper goodsInfoMapper;
@Resource
StuGoodsSalesManageMapper salesManageMapper;
@Resource
IFileUtil fileUtil;
@Resource
ConvertUtil convertUtil;
@Resource
StuGoodsPromotionPricingMapper promotionPricingMapper;
@Override
public PageInfo getGoodsList(String userId, Integer index, Integer size) {
//查询默认商品和用户新增商品信息
StuGoodsInfoExample goodsInfoExample=new StuGoodsInfoExample();
goodsInfoExample.createCriteria()
.andUserIdEqualTo(userId)
.andSubmitStateEqualTo(1);
List<StuGoodsInfo> stuGoodsInfos = goodsInfoMapper.selectByExample(goodsInfoExample);
return PageUtil.pageHelper(stuGoodsInfos,index,size);
}
@Override
public PageInfo getGoodsSalesManagementList(String userId, Integer index, Integer size) {
StuGoodsSalesManageExample goodsSalesManageExample=new StuGoodsSalesManageExample();
goodsSalesManageExample.createCriteria()
.andUserIdEqualTo(userId);
List<StuGoodsSalesManage> stuGoodsSalesManages = salesManageMapper.selectByExample(goodsSalesManageExample);
return PageUtil.pageHelper(stuGoodsSalesManages,index,size);
}
@Override
public Integer save(StuGoodsInfoDTO stuGoodsInfoDTO, MultipartFile file, List<MultipartFile> files) {
//主图片上传
String upload="";
if(!file.isEmpty()){
upload = fileUtil.upload(file);
}
stuGoodsInfoDTO.setGoodsMainImage(upload);
//轮播图批量上传
StuGoodsInfoDTO stuGoodsInfoDTO1=new StuGoodsInfoDTO();
if(!files.isEmpty()){
stuGoodsInfoDTO1 = insertBatch(stuGoodsInfoDTO, files);
}
//关键词拼接
String join = String.join(",", stuGoodsInfoDTO1.getProductKeyword());
StuGoodsInfo stuGoodsInfo = convertUtil.DTOToEntity(stuGoodsInfoDTO1, StuGoodsInfo.class);
stuGoodsInfo.setProductKeyword(join);
List<StuGoodsPromotionPricing> promotionPricingList = stuGoodsInfoDTO.getPromotionPricingList();
//判断是否已有保存但未提交的数据
if(stuGoodsInfoDTO.getId()==null){ //第一次保存 添加数据
Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode();
uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空
stuGoodsInfo.setId(uuid);
//商品定价促销信息添加
if(!promotionPricingList.isEmpty()){
for (int i = 0; i < promotionPricingList.size(); i++) {
StuGoodsPromotionPricing stuGoodsPromotionPricing = promotionPricingList.get(i);
Integer proId= UUID.randomUUID().toString().replaceAll("-","").hashCode();
proId = proId < 0 ? -proId : proId;//String.hashCode() 值会为空
stuGoodsPromotionPricing.setId(proId);
stuGoodsPromotionPricing.setGoodsId(uuid);
stuGoodsPromotionPricing.setUserId(stuGoodsInfoDTO.getUserId());
promotionPricingMapper.insert(stuGoodsPromotionPricing);
}
}
//设置提交状态
stuGoodsInfo.setSubmitState(0);
//商品信息添加
return goodsInfoMapper.insert(stuGoodsInfo);
}else { //不是第一次保存 修改信息
//判断商品定价促销信息是否已有保存信息
if(!promotionPricingList.isEmpty()){
for (int i = 0; i < promotionPricingList.size(); i++) {
StuGoodsPromotionPricing stuGoodsPromotionPricing = promotionPricingList.get(i);
if(stuGoodsPromotionPricing.getId()==null){ //第一次保存 添加数据
Integer proId= UUID.randomUUID().toString().replaceAll("-","").hashCode();
proId = proId < 0 ? -proId : proId;//String.hashCode() 值会为空
stuGoodsPromotionPricing.setId(proId);
stuGoodsPromotionPricing.setGoodsId(stuGoodsInfoDTO.getId());
stuGoodsPromotionPricing.setUserId(stuGoodsInfoDTO.getUserId());
promotionPricingMapper.insert(stuGoodsPromotionPricing);
}else { //更新数据
stuGoodsPromotionPricing.setGoodsId(stuGoodsInfoDTO.getId());
stuGoodsPromotionPricing.setUserId(stuGoodsInfoDTO.getUserId());
promotionPricingMapper.updateByPrimaryKey(stuGoodsPromotionPricing);
}
}
}
return goodsInfoMapper.updateByPrimaryKey(stuGoodsInfo);
}
}
@Override
public Integer add(StuGoodsInfoDTO stuGoodsInfoDTO, MultipartFile file, List<MultipartFile> files) {
//主图片上传
String upload= fileUtil.upload(file);
stuGoodsInfoDTO.setGoodsMainImage(upload);
//轮播图批量上传
StuGoodsInfoDTO stuGoodsInfoDTO1 = insertBatch(stuGoodsInfoDTO, files);
//关键词拼接
String join = String.join(",", stuGoodsInfoDTO1.getProductKeyword());
StuGoodsInfo stuGoodsInfo = convertUtil.DTOToEntity(stuGoodsInfoDTO1, StuGoodsInfo.class);
stuGoodsInfo.setProductKeyword(join);
List<StuGoodsPromotionPricing> promotionPricingList = stuGoodsInfoDTO.getPromotionPricingList();
//判断是否已有保存但未提交的数据
if(stuGoodsInfoDTO.getId()==null){ //第一次提交 添加数据
Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode();
uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空
stuGoodsInfo.setId(uuid);
//商品定价促销信息添加
if(!promotionPricingList.isEmpty()){
for (int i = 0; i < promotionPricingList.size(); i++) {
StuGoodsPromotionPricing stuGoodsPromotionPricing = promotionPricingList.get(i);
Integer proId= UUID.randomUUID().toString().replaceAll("-","").hashCode();
proId = proId < 0 ? -proId : proId;//String.hashCode() 值会为空
stuGoodsPromotionPricing.setId(proId);
stuGoodsPromotionPricing.setGoodsId(uuid);
stuGoodsPromotionPricing.setUserId(stuGoodsInfoDTO.getUserId());
promotionPricingMapper.insert(stuGoodsPromotionPricing);
}
}
//设置提交状态
stuGoodsInfo.setSubmitState(1);
//商品信息添加
return goodsInfoMapper.insert(stuGoodsInfo);
}else { //已有保存信息,则更新信息
//判断商品定价促销信息是否已有保存信息
if(!promotionPricingList.isEmpty()){
for (int i = 0; i < promotionPricingList.size(); i++) {
StuGoodsPromotionPricing stuGoodsPromotionPricing = promotionPricingList.get(i);
if(stuGoodsPromotionPricing.getId()==null){ //第一次保存 添加数据
Integer proId= UUID.randomUUID().toString().replaceAll("-","").hashCode();
proId = proId < 0 ? -proId : proId;//String.hashCode() 值会为空
stuGoodsPromotionPricing.setId(proId);
stuGoodsPromotionPricing.setGoodsId(stuGoodsInfoDTO.getId());
stuGoodsPromotionPricing.setUserId(stuGoodsInfoDTO.getUserId());
promotionPricingMapper.insert(stuGoodsPromotionPricing);
}else { //更新数据
stuGoodsPromotionPricing.setGoodsId(stuGoodsInfoDTO.getId());
stuGoodsPromotionPricing.setUserId(stuGoodsInfoDTO.getUserId());
promotionPricingMapper.updateByPrimaryKey(stuGoodsPromotionPricing);
}
}
}
}
stuGoodsInfo.setSubmitState(1);
return goodsInfoMapper.updateByPrimaryKey(stuGoodsInfo);
}
@Override
public Integer update(StuGoodsInfoDTO stuGoodsInfoDTO, MultipartFile file, List<MultipartFile> files) {
//主图片上传
String upload= fileUtil.upload(file);
stuGoodsInfoDTO.setGoodsMainImage(upload);
//轮播图批量上传
StuGoodsInfoDTO stuGoodsInfoDTO1 = insertBatch(stuGoodsInfoDTO, files);
//关键词拼接
String join = String.join(",", stuGoodsInfoDTO1.getProductKeyword());
StuGoodsInfo stuGoodsInfo = convertUtil.DTOToEntity(stuGoodsInfoDTO1, StuGoodsInfo.class);
stuGoodsInfo.setProductKeyword(join);
//更新商品定价促销信息
List<StuGoodsPromotionPricing> promotionPricingList = stuGoodsInfoDTO.getPromotionPricingList();
for (int i = 0; i < promotionPricingList.size(); i++) {
promotionPricingMapper.updateByPrimaryKey(promotionPricingList.get(i));
}
return goodsInfoMapper.updateByPrimaryKey(stuGoodsInfo);
}
@Override
public Integer remove(Integer id) {
StuGoodsInfo stuGoodsInfo = goodsInfoMapper.selectByPrimaryKey(id);
//下架商品,将商品销售管理表中该商品信息隐藏
StuGoodsSalesManageExample salesManageExample=new StuGoodsSalesManageExample();
salesManageExample.createCriteria().andGoodsIdEqualTo(id);
List<StuGoodsSalesManage> stuGoodsSalesManages = salesManageMapper.selectByExample(salesManageExample);
stuGoodsSalesManages.get(0).setState(0);
salesManageMapper.updateByPrimaryKey(stuGoodsSalesManages.get(0));
//更新商品上下架状态
stuGoodsInfo.setOnlineState(0);
return goodsInfoMapper.updateByPrimaryKey(stuGoodsInfo);
}
@Override
public Integer listing(Integer id, Integer number, String requiredFunds,String balance) {
StuGoodsInfo stuGoodsInfo = goodsInfoMapper.selectByPrimaryKey(id);
//判断商品是否已上架
if(stuGoodsInfo.getOnlineState()==1){
throw new ServiceException(HttpStatus.ACCEPTED,"商品已上架,请勿重复上架");
}
//去掉末尾的0比较精度
BigDecimal bigDecimal = BigDecimal.valueOf(Double.parseDouble(requiredFunds)).stripTrailingZeros(); //所需资金
BigDecimal bigDecimal1 = BigDecimal.valueOf(Double.parseDouble(balance)).stripTrailingZeros(); //账户余额
if(bigDecimal1.compareTo(bigDecimal)<0){
throw new ServiceException(HttpStatus.ACCEPTED,"余额不足");
}
StuGoodsSalesManageExample salesManageExample=new StuGoodsSalesManageExample();
salesManageExample.createCriteria().andGoodsIdEqualTo(id);
List<StuGoodsSalesManage> stuGoodsSalesManages = salesManageMapper.selectByExample(salesManageExample);
//判断该商品是否已有上架记录
if(!stuGoodsSalesManages.isEmpty()){
StuGoodsSalesManage stuGoodsSalesManage = stuGoodsSalesManages.get(0);
//只需更新上架数量、库存数量
stuGoodsSalesManage.setOnlineTotal(number);
stuGoodsSalesManage.setAvailableInventoryQuantity(number);
stuGoodsSalesManage.setState(1);
return salesManageMapper.updateByPrimaryKey(stuGoodsSalesManage);
}else {
//添加完整数据
StuGoodsSalesManage stuGoodsSalesManage=new StuGoodsSalesManage();
Integer uuId= UUID.randomUUID().toString().replaceAll("-","").hashCode();
uuId = uuId < 0 ? -uuId : uuId;//String.hashCode() 值会为空
stuGoodsSalesManage.setId(uuId);
stuGoodsSalesManage.setGoodsId(id);
stuGoodsSalesManage.setGoodsName(stuGoodsInfo.getGoodsName());
stuGoodsSalesManage.setGoodsType(stuGoodsInfo.getGoodsType());
stuGoodsSalesManage.setGoodsSubclass(stuGoodsInfo.getGoodsSubclass());
stuGoodsSalesManage.setOnlineTotal(number);
stuGoodsSalesManage.setAvailableInventoryQuantity(number);
stuGoodsSalesManage.setSoldQuantity("0");
stuGoodsSalesManage.setSalesVolume("0");
stuGoodsSalesManage.setGrossMargin("0");
stuGoodsSalesManage.setNumberOfComments(0);
stuGoodsSalesManage.setNumberOfLikes(0);
stuGoodsSalesManage.setNumberOfCollections(0);
stuGoodsSalesManage.setNumberOfShares(0);
stuGoodsSalesManage.setOnlineTime(new Date());
stuGoodsSalesManage.setState(1);
stuGoodsSalesManage.setUserId(stuGoodsInfo.getUserId());
return salesManageMapper.insert(stuGoodsSalesManage);
}
}
/**
* -
* @param stuGoodsInfoDTO
* @param files
*/
private StuGoodsInfoDTO insertBatch(StuGoodsInfoDTO stuGoodsInfoDTO, 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(",");
}
}
stuGoodsInfoDTO.setCarouselImage(imageUpload.toString());
return stuGoodsInfoDTO;
}
}

@ -12,12 +12,15 @@ import com.sztzjy.trade.mapper.*;
import com.sztzjy.trade.service.StuGoodsTradingCenterService;
import com.sztzjy.trade.util.BigDecimalUtils;
import com.sztzjy.trade.util.ResultEntity;
import com.sztzjy.trade.util.file.IFileUtil;
import org.apache.tomcat.util.http.fileupload.FileUpload;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import com.sztzjy.trade.util.PageUtil;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.util.*;
import javax.annotation.Resource;
@ -64,6 +67,13 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
BigDecimalUtils bigDecimalUtils;
@Resource
StuGoodsOrderInfoMapper orderInfoMapper;
@Resource
IFileUtil fileUtil;
@Resource
StuCommentReportInfoMapper reportInfoMapper;
@Resource
StuGoodsPromotionPricingMapper promotionPricingMapper;
//小广告位招租
@Override
@ -193,14 +203,16 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
//根据商品ID查询商品库存是否足够
StuGoodsSalesManageExample salesManageExample=new StuGoodsSalesManageExample();
salesManageExample.createCriteria().andGoodsIdEqualTo(stuShoppingCartInfo.getGoodsId());
salesManageExample.createCriteria()
.andGoodsIdEqualTo(stuShoppingCartInfo.getGoodsId())
.andUserIdEqualTo(stuSettlementDTO.getUserId());
List<StuGoodsSalesManage> stuGoodsSalesManages = goodsSalesManageMapper.selectByExample(salesManageExample);
if(stuGoodsSalesManages.get(0).getOnlineTotal()<stuShoppingCartInfo.getNumber()){
throw new ServiceException(HttpStatus.ACCEPTED,stuGoodsInfo.getGoodsName()+"商品已售完,请重新选择结算商品");
if(stuGoodsSalesManages.get(0).getAvailableInventoryQuantity()<stuShoppingCartInfo.getNumber()){
throw new ServiceException(HttpStatus.ACCEPTED,stuGoodsInfo.getGoodsName()+"商品库存不足,请重新选择结算商品");
}
}
// TODO: 2024/10/28 3、生成订单信息并删除所结算商品在购物车中的信息
// TODO: 2024/10/28 3、生成订单信息并删除所结算商品在购物车中的信息,商品管理信息更新
for (StuShoppingCartInfo stuShoppingCartInfo:shoppingCartInfos) {
//生成订单信息
StuGoodsOrderInfo stuGoodsOrderInfo=new StuGoodsOrderInfo();
@ -229,6 +241,48 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
orderInfoMapper.insert(stuGoodsOrderInfo);
//该商品库存减少,已售数量增加,销售额增加,毛利额增加
StuGoodsSalesManageExample salesManageExample=new StuGoodsSalesManageExample();
salesManageExample.createCriteria()
.andUserIdEqualTo(stuSettlementDTO.getUserId())
.andGoodsIdEqualTo(stuShoppingCartInfo.getGoodsId());
List<StuGoodsSalesManage> stuGoodsSalesManages = goodsSalesManageMapper.selectByExample(salesManageExample);
//取到该商品管理信息
StuGoodsSalesManage stuGoodsSalesManage = stuGoodsSalesManages.get(0);
//可用库存减少
Integer sub=stuGoodsSalesManage.getAvailableInventoryQuantity()-stuShoppingCartInfo.getNumber();
stuGoodsSalesManage.setAvailableInventoryQuantity(sub);
//已售数量增加
Integer add=Integer.getInteger(stuGoodsSalesManage.getSoldQuantity())+stuShoppingCartInfo.getNumber();
stuGoodsSalesManage.setSoldQuantity(String.valueOf(add));
//销售额增加 销售额=已售数量×商品单价
BigDecimal mul = bigDecimalUtils.mul(stuGoodsSalesManage.getSoldQuantity(), stuShoppingCartInfo.getUnitPrice().toString());
stuGoodsSalesManage.setSalesVolume(String.valueOf(mul));
//毛利额增加 毛利额=销售额−销售成本
//判断是否为促销购买
if(stuShoppingCartInfo.getPromotionState()==0){ //否 按照正常成本价计算
StuGoodsInfo stuGoodsInfo = stuGoodsInfoMapper.selectByPrimaryKey(stuShoppingCartInfo.getGoodsId());
//取出正常成本价×数量=销售成本
BigDecimal mul1 = bigDecimalUtils.mul(stuGoodsInfo.getUnitCostPrice().toString(), stuShoppingCartInfo.getNumber().toString());
BigDecimal profitMargin = bigDecimalUtils.sub(mul.toString(), mul1.toString()); //毛利额
stuGoodsSalesManage.setGrossMargin(profitMargin.toString());
}else { //是 按照促销成本价计算
StuGoodsPromotionPricing stuGoodsPromotionPricing = promotionPricingMapper.selectByPrimaryKey(stuShoppingCartInfo.getPromotionId());
//取出促销成本价×数量=销售成本
BigDecimal mul1 = bigDecimalUtils.mul(stuGoodsPromotionPricing.getPromotionCostPrice().toString(), stuShoppingCartInfo.getNumber().toString());
BigDecimal profitMargin = bigDecimalUtils.sub(mul.toString(), mul1.toString()); //毛利额
stuGoodsSalesManage.setGrossMargin(profitMargin.toString());
}
//商品管理信息更新
stuGoodsSalesManageMapper.updateByPrimaryKey(stuGoodsSalesManage);
//删除所结算商品在购物车中的信息
shoppingCartInfoMapper.deleteByPrimaryKey(stuShoppingCartInfo.getId());
}
@ -410,7 +464,96 @@ public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterSe
return null;
}
@Override
public Integer orderEvaluation(StuGoodsCommentInfo commentInfo, List<MultipartFile> files) {
//批量上传
StuGoodsCommentInfo stuGoodsCommentInfo = insertBatch(commentInfo, files);
//评论时间
stuGoodsCommentInfo.setCreateTime(new Date());
// 判断此次评价为第一次评价还是追评
StuGoodsCommentInfoExample commentInfoExample=new StuGoodsCommentInfoExample();
commentInfoExample.createCriteria()
.andUserIdEqualTo(commentInfo.getUserId())
.andGoodsIdEqualTo(commentInfo.getGoodsId())
.andCommentHierarchyEqualTo(0);
List<StuGoodsCommentInfo> stuGoodsCommentInfos = stuGoodsCommentInfoMapper.selectByExample(commentInfoExample);
Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode();
uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空
stuGoodsCommentInfo.setId(uuid);
if(stuGoodsCommentInfos.isEmpty()){ //则为第一次评论
stuGoodsCommentInfo.setCommentHierarchy(0);
return stuGoodsCommentInfoMapper.insert(stuGoodsCommentInfo);
}else { //则为追评
stuGoodsCommentInfo.setCommentHierarchy(1);
stuGoodsCommentInfo.setCommentId(stuGoodsCommentInfos.get(0).getCommentId());
return stuGoodsCommentInfoMapper.insert(stuGoodsCommentInfo);
}
}
@Override
public Integer operate(Integer id,String userId, String operateType, String reportType, String content) {
StuGoodsCommentInfo stuGoodsCommentInfo = stuGoodsCommentInfoMapper.selectByPrimaryKey(id);
Integer uuid= UUID.randomUUID().toString().replaceAll("-","").hashCode();
uuid = uuid < 0 ? -uuid : uuid;//String.hashCode() 值会为空
if(operateType.equals("举报")){
StuCommentReportInfo reportInfo=new StuCommentReportInfo();
reportInfo.setId(uuid);
reportInfo.setCommentId(id);
reportInfo.setReportType(reportType);
reportInfo.setUserId(userId);
reportInfo.setCreateTime(new Date());
reportInfoMapper.insert(reportInfo);
//举报次数+1
Integer report=stuGoodsCommentInfo.getReportFrequency()+1;
stuGoodsCommentInfo.setReportFrequency(report);
}
if(operateType.equals("点赞")){
//点赞次数+1
Integer giveTheThumbsUp=stuGoodsCommentInfo.getGiveTheThumbsUp()+1;
stuGoodsCommentInfo.setGiveTheThumbsUp(giveTheThumbsUp);
}
if(operateType.equals("回复")){
StuGoodsCommentInfo commentInfo=new StuGoodsCommentInfo();
commentInfo.setId(uuid);
commentInfo.setCreateTime(new Date());
commentInfo.setCommentHierarchy(2);
commentInfo.setUserId(userId);
commentInfo.setGoodsId(stuGoodsCommentInfo.getGoodsId());
commentInfo.setCommentId(stuGoodsCommentInfo.getId());
stuGoodsCommentInfoMapper.insert(commentInfo);
//回复次数+1
Integer replyFrequency=stuGoodsCommentInfo.getReplyFrequency()+1;
stuGoodsCommentInfo.setReplyFrequency(replyFrequency);
}
return stuGoodsCommentInfoMapper.updateByPrimaryKey(stuGoodsCommentInfo);
}
/**
* -
* @param commentInfo
* @param files
*/
private StuGoodsCommentInfo insertBatch(StuGoodsCommentInfo commentInfo, 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(",");
}
}
commentInfo.setImageUpload(imageUpload.toString());
return commentInfo;
}
}

@ -0,0 +1,228 @@
<?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.StuCommentReportInfoMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuCommentReportInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="comment_id" jdbcType="INTEGER" property="commentId" />
<result column="report_type" jdbcType="VARCHAR" property="reportType" />
<result column="report_reason" jdbcType="VARCHAR" property="reportReason" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</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, comment_id, report_type, report_reason, user_id, create_time
</sql>
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.StuCommentReportInfoExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_comment_report_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_comment_report_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_comment_report_info
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.StuCommentReportInfoExample">
delete from stu_comment_report_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuCommentReportInfo">
insert into stu_comment_report_info (id, comment_id, report_type,
report_reason, user_id, create_time
)
values (#{id,jdbcType=INTEGER}, #{commentId,jdbcType=INTEGER}, #{reportType,jdbcType=VARCHAR},
#{reportReason,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuCommentReportInfo">
insert into stu_comment_report_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="commentId != null">
comment_id,
</if>
<if test="reportType != null">
report_type,
</if>
<if test="reportReason != null">
report_reason,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="commentId != null">
#{commentId,jdbcType=INTEGER},
</if>
<if test="reportType != null">
#{reportType,jdbcType=VARCHAR},
</if>
<if test="reportReason != null">
#{reportReason,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.trade.entity.StuCommentReportInfoExample" resultType="java.lang.Long">
select count(*) from stu_comment_report_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_comment_report_info
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.commentId != null">
comment_id = #{record.commentId,jdbcType=INTEGER},
</if>
<if test="record.reportType != null">
report_type = #{record.reportType,jdbcType=VARCHAR},
</if>
<if test="record.reportReason != null">
report_reason = #{record.reportReason,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update stu_comment_report_info
set id = #{record.id,jdbcType=INTEGER},
comment_id = #{record.commentId,jdbcType=INTEGER},
report_type = #{record.reportType,jdbcType=VARCHAR},
report_reason = #{record.reportReason,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.StuCommentReportInfo">
update stu_comment_report_info
<set>
<if test="commentId != null">
comment_id = #{commentId,jdbcType=INTEGER},
</if>
<if test="reportType != null">
report_type = #{reportType,jdbcType=VARCHAR},
</if>
<if test="reportReason != null">
report_reason = #{reportReason,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.StuCommentReportInfo">
update stu_comment_report_info
set comment_id = #{commentId,jdbcType=INTEGER},
report_type = #{reportType,jdbcType=VARCHAR},
report_reason = #{reportReason,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -11,6 +11,10 @@
<result column="comment_hierarchy" jdbcType="INTEGER" property="commentHierarchy" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="comment_id" jdbcType="INTEGER" property="commentId" />
<result column="give_the_thumbs_up" jdbcType="INTEGER" property="giveTheThumbsUp" />
<result column="reply_frequency" jdbcType="INTEGER" property="replyFrequency" />
<result column="report_frequency" jdbcType="INTEGER" property="reportFrequency" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.trade.entity.StuGoodsCommentInfo">
<result column="image_upload" jdbcType="LONGVARCHAR" property="imageUpload" />
@ -75,7 +79,8 @@
</sql>
<sql id="Base_Column_List">
id, order_number, goods_rating, goods_comment, anonymous_evaluation, create_time,
comment_hierarchy, user_id, goods_id
comment_hierarchy, user_id, goods_id, comment_id, give_the_thumbs_up, reply_frequency,
report_frequency
</sql>
<sql id="Blob_Column_List">
image_upload
@ -132,11 +137,13 @@
insert into stu_goods_comment_info (id, order_number, goods_rating,
goods_comment, anonymous_evaluation, create_time,
comment_hierarchy, user_id, goods_id,
image_upload)
comment_id, give_the_thumbs_up, reply_frequency,
report_frequency, image_upload)
values (#{id,jdbcType=INTEGER}, #{orderNumber,jdbcType=VARCHAR}, #{goodsRating,jdbcType=INTEGER},
#{goodsComment,jdbcType=VARCHAR}, #{anonymousEvaluation,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{commentHierarchy,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, #{goodsId,jdbcType=INTEGER},
#{imageUpload,jdbcType=LONGVARCHAR})
#{commentId,jdbcType=INTEGER}, #{giveTheThumbsUp,jdbcType=INTEGER}, #{replyFrequency,jdbcType=INTEGER},
#{reportFrequency,jdbcType=INTEGER}, #{imageUpload,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuGoodsCommentInfo">
insert into stu_goods_comment_info
@ -168,6 +175,18 @@
<if test="goodsId != null">
goods_id,
</if>
<if test="commentId != null">
comment_id,
</if>
<if test="giveTheThumbsUp != null">
give_the_thumbs_up,
</if>
<if test="replyFrequency != null">
reply_frequency,
</if>
<if test="reportFrequency != null">
report_frequency,
</if>
<if test="imageUpload != null">
image_upload,
</if>
@ -200,6 +219,18 @@
<if test="goodsId != null">
#{goodsId,jdbcType=INTEGER},
</if>
<if test="commentId != null">
#{commentId,jdbcType=INTEGER},
</if>
<if test="giveTheThumbsUp != null">
#{giveTheThumbsUp,jdbcType=INTEGER},
</if>
<if test="replyFrequency != null">
#{replyFrequency,jdbcType=INTEGER},
</if>
<if test="reportFrequency != null">
#{reportFrequency,jdbcType=INTEGER},
</if>
<if test="imageUpload != null">
#{imageUpload,jdbcType=LONGVARCHAR},
</if>
@ -241,6 +272,18 @@
<if test="record.goodsId != null">
goods_id = #{record.goodsId,jdbcType=INTEGER},
</if>
<if test="record.commentId != null">
comment_id = #{record.commentId,jdbcType=INTEGER},
</if>
<if test="record.giveTheThumbsUp != null">
give_the_thumbs_up = #{record.giveTheThumbsUp,jdbcType=INTEGER},
</if>
<if test="record.replyFrequency != null">
reply_frequency = #{record.replyFrequency,jdbcType=INTEGER},
</if>
<if test="record.reportFrequency != null">
report_frequency = #{record.reportFrequency,jdbcType=INTEGER},
</if>
<if test="record.imageUpload != null">
image_upload = #{record.imageUpload,jdbcType=LONGVARCHAR},
</if>
@ -260,6 +303,10 @@
comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR},
goods_id = #{record.goodsId,jdbcType=INTEGER},
comment_id = #{record.commentId,jdbcType=INTEGER},
give_the_thumbs_up = #{record.giveTheThumbsUp,jdbcType=INTEGER},
reply_frequency = #{record.replyFrequency,jdbcType=INTEGER},
report_frequency = #{record.reportFrequency,jdbcType=INTEGER},
image_upload = #{record.imageUpload,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -275,7 +322,11 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP},
comment_hierarchy = #{record.commentHierarchy,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR},
goods_id = #{record.goodsId,jdbcType=INTEGER}
goods_id = #{record.goodsId,jdbcType=INTEGER},
comment_id = #{record.commentId,jdbcType=INTEGER},
give_the_thumbs_up = #{record.giveTheThumbsUp,jdbcType=INTEGER},
reply_frequency = #{record.replyFrequency,jdbcType=INTEGER},
report_frequency = #{record.reportFrequency,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -307,6 +358,18 @@
<if test="goodsId != null">
goods_id = #{goodsId,jdbcType=INTEGER},
</if>
<if test="commentId != null">
comment_id = #{commentId,jdbcType=INTEGER},
</if>
<if test="giveTheThumbsUp != null">
give_the_thumbs_up = #{giveTheThumbsUp,jdbcType=INTEGER},
</if>
<if test="replyFrequency != null">
reply_frequency = #{replyFrequency,jdbcType=INTEGER},
</if>
<if test="reportFrequency != null">
report_frequency = #{reportFrequency,jdbcType=INTEGER},
</if>
<if test="imageUpload != null">
image_upload = #{imageUpload,jdbcType=LONGVARCHAR},
</if>
@ -323,6 +386,10 @@
comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
goods_id = #{goodsId,jdbcType=INTEGER},
comment_id = #{commentId,jdbcType=INTEGER},
give_the_thumbs_up = #{giveTheThumbsUp,jdbcType=INTEGER},
reply_frequency = #{replyFrequency,jdbcType=INTEGER},
report_frequency = #{reportFrequency,jdbcType=INTEGER},
image_upload = #{imageUpload,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
@ -335,7 +402,11 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
comment_hierarchy = #{commentHierarchy,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
goods_id = #{goodsId,jdbcType=INTEGER}
goods_id = #{goodsId,jdbcType=INTEGER},
comment_id = #{commentId,jdbcType=INTEGER},
give_the_thumbs_up = #{giveTheThumbsUp,jdbcType=INTEGER},
reply_frequency = #{replyFrequency,jdbcType=INTEGER},
report_frequency = #{reportFrequency,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -9,6 +9,7 @@
<result column="pricing_unit" jdbcType="VARCHAR" property="pricingUnit" />
<result column="unit_cost_price" jdbcType="DECIMAL" property="unitCostPrice" />
<result column="gross_margin" jdbcType="VARCHAR" property="grossMargin" />
<result column="goods_unit_price" jdbcType="DECIMAL" property="goodsUnitPrice" />
<result column="goods_main_image" jdbcType="VARCHAR" property="goodsMainImage" />
<result column="carousel_image" jdbcType="VARCHAR" property="carouselImage" />
<result column="pricing_category_name" jdbcType="VARCHAR" property="pricingCategoryName" />
@ -29,6 +30,7 @@
<result column="online_state" jdbcType="INTEGER" property="onlineState" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
<result column="submit_state" jdbcType="INTEGER" property="submitState" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.trade.entity.StuGoodsInfo">
<result column="goods_Introduction" jdbcType="LONGVARCHAR" property="goodsIntroduction" />
@ -94,10 +96,10 @@
</sql>
<sql id="Base_Column_List">
id, goods_name, goods_type, goods_subclass, pricing_unit, unit_cost_price, gross_margin,
goods_main_image, carousel_image, pricing_category_name, weight, promotion_cost_price,
maximum_price, fix_a_price, matching_groups, goods_url, number_of_shares, share_discounts,
share_commission, short_video_commission, content_commission, product_keyword, create_time,
update_time, online_state, user_id, school_id
goods_unit_price, goods_main_image, carousel_image, pricing_category_name, weight,
promotion_cost_price, maximum_price, fix_a_price, matching_groups, goods_url, number_of_shares,
share_discounts, share_commission, short_video_commission, content_commission, product_keyword,
create_time, update_time, online_state, user_id, school_id, submit_state
</sql>
<sql id="Blob_Column_List">
goods_Introduction, specification_packaging
@ -153,26 +155,26 @@
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuGoodsInfo">
insert into stu_goods_info (id, goods_name, goods_type,
goods_subclass, pricing_unit, unit_cost_price,
gross_margin, goods_main_image, carousel_image,
pricing_category_name, weight, promotion_cost_price,
maximum_price, fix_a_price, matching_groups,
goods_url, number_of_shares, share_discounts,
share_commission, short_video_commission,
gross_margin, goods_unit_price, goods_main_image,
carousel_image, pricing_category_name, weight,
promotion_cost_price, maximum_price, fix_a_price,
matching_groups, goods_url, number_of_shares,
share_discounts, share_commission, short_video_commission,
content_commission, product_keyword, create_time,
update_time, online_state, user_id,
school_id, goods_Introduction, specification_packaging
)
school_id, submit_state, goods_Introduction,
specification_packaging)
values (#{id,jdbcType=INTEGER}, #{goodsName,jdbcType=VARCHAR}, #{goodsType,jdbcType=VARCHAR},
#{goodsSubclass,jdbcType=VARCHAR}, #{pricingUnit,jdbcType=VARCHAR}, #{unitCostPrice,jdbcType=DECIMAL},
#{grossMargin,jdbcType=VARCHAR}, #{goodsMainImage,jdbcType=VARCHAR}, #{carouselImage,jdbcType=VARCHAR},
#{pricingCategoryName,jdbcType=VARCHAR}, #{weight,jdbcType=DOUBLE}, #{promotionCostPrice,jdbcType=DECIMAL},
#{maximumPrice,jdbcType=DECIMAL}, #{fixAPrice,jdbcType=DECIMAL}, #{matchingGroups,jdbcType=VARCHAR},
#{goodsUrl,jdbcType=VARCHAR}, #{numberOfShares,jdbcType=INTEGER}, #{shareDiscounts,jdbcType=VARCHAR},
#{shareCommission,jdbcType=VARCHAR}, #{shortVideoCommission,jdbcType=VARCHAR},
#{grossMargin,jdbcType=VARCHAR}, #{goodsUnitPrice,jdbcType=DECIMAL}, #{goodsMainImage,jdbcType=VARCHAR},
#{carouselImage,jdbcType=VARCHAR}, #{pricingCategoryName,jdbcType=VARCHAR}, #{weight,jdbcType=DOUBLE},
#{promotionCostPrice,jdbcType=DECIMAL}, #{maximumPrice,jdbcType=DECIMAL}, #{fixAPrice,jdbcType=DECIMAL},
#{matchingGroups,jdbcType=VARCHAR}, #{goodsUrl,jdbcType=VARCHAR}, #{numberOfShares,jdbcType=INTEGER},
#{shareDiscounts,jdbcType=VARCHAR}, #{shareCommission,jdbcType=VARCHAR}, #{shortVideoCommission,jdbcType=VARCHAR},
#{contentCommission,jdbcType=VARCHAR}, #{productKeyword,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{onlineState,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR},
#{schoolId,jdbcType=VARCHAR}, #{goodsIntroduction,jdbcType=LONGVARCHAR}, #{specificationPackaging,jdbcType=LONGVARCHAR}
)
#{schoolId,jdbcType=VARCHAR}, #{submitState,jdbcType=INTEGER}, #{goodsIntroduction,jdbcType=LONGVARCHAR},
#{specificationPackaging,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuGoodsInfo">
insert into stu_goods_info
@ -198,6 +200,9 @@
<if test="grossMargin != null">
gross_margin,
</if>
<if test="goodsUnitPrice != null">
goods_unit_price,
</if>
<if test="goodsMainImage != null">
goods_main_image,
</if>
@ -258,6 +263,9 @@
<if test="schoolId != null">
school_id,
</if>
<if test="submitState != null">
submit_state,
</if>
<if test="goodsIntroduction != null">
goods_Introduction,
</if>
@ -287,6 +295,9 @@
<if test="grossMargin != null">
#{grossMargin,jdbcType=VARCHAR},
</if>
<if test="goodsUnitPrice != null">
#{goodsUnitPrice,jdbcType=DECIMAL},
</if>
<if test="goodsMainImage != null">
#{goodsMainImage,jdbcType=VARCHAR},
</if>
@ -347,6 +358,9 @@
<if test="schoolId != null">
#{schoolId,jdbcType=VARCHAR},
</if>
<if test="submitState != null">
#{submitState,jdbcType=INTEGER},
</if>
<if test="goodsIntroduction != null">
#{goodsIntroduction,jdbcType=LONGVARCHAR},
</if>
@ -385,6 +399,9 @@
<if test="record.grossMargin != null">
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
</if>
<if test="record.goodsUnitPrice != null">
goods_unit_price = #{record.goodsUnitPrice,jdbcType=DECIMAL},
</if>
<if test="record.goodsMainImage != null">
goods_main_image = #{record.goodsMainImage,jdbcType=VARCHAR},
</if>
@ -445,6 +462,9 @@
<if test="record.schoolId != null">
school_id = #{record.schoolId,jdbcType=VARCHAR},
</if>
<if test="record.submitState != null">
submit_state = #{record.submitState,jdbcType=INTEGER},
</if>
<if test="record.goodsIntroduction != null">
goods_Introduction = #{record.goodsIntroduction,jdbcType=LONGVARCHAR},
</if>
@ -465,6 +485,7 @@
pricing_unit = #{record.pricingUnit,jdbcType=VARCHAR},
unit_cost_price = #{record.unitCostPrice,jdbcType=DECIMAL},
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
goods_unit_price = #{record.goodsUnitPrice,jdbcType=DECIMAL},
goods_main_image = #{record.goodsMainImage,jdbcType=VARCHAR},
carousel_image = #{record.carouselImage,jdbcType=VARCHAR},
pricing_category_name = #{record.pricingCategoryName,jdbcType=VARCHAR},
@ -485,6 +506,7 @@
online_state = #{record.onlineState,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR},
school_id = #{record.schoolId,jdbcType=VARCHAR},
submit_state = #{record.submitState,jdbcType=INTEGER},
goods_Introduction = #{record.goodsIntroduction,jdbcType=LONGVARCHAR},
specification_packaging = #{record.specificationPackaging,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
@ -500,6 +522,7 @@
pricing_unit = #{record.pricingUnit,jdbcType=VARCHAR},
unit_cost_price = #{record.unitCostPrice,jdbcType=DECIMAL},
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
goods_unit_price = #{record.goodsUnitPrice,jdbcType=DECIMAL},
goods_main_image = #{record.goodsMainImage,jdbcType=VARCHAR},
carousel_image = #{record.carouselImage,jdbcType=VARCHAR},
pricing_category_name = #{record.pricingCategoryName,jdbcType=VARCHAR},
@ -519,7 +542,8 @@
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
online_state = #{record.onlineState,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR},
school_id = #{record.schoolId,jdbcType=VARCHAR}
school_id = #{record.schoolId,jdbcType=VARCHAR},
submit_state = #{record.submitState,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -545,6 +569,9 @@
<if test="grossMargin != null">
gross_margin = #{grossMargin,jdbcType=VARCHAR},
</if>
<if test="goodsUnitPrice != null">
goods_unit_price = #{goodsUnitPrice,jdbcType=DECIMAL},
</if>
<if test="goodsMainImage != null">
goods_main_image = #{goodsMainImage,jdbcType=VARCHAR},
</if>
@ -605,6 +632,9 @@
<if test="schoolId != null">
school_id = #{schoolId,jdbcType=VARCHAR},
</if>
<if test="submitState != null">
submit_state = #{submitState,jdbcType=INTEGER},
</if>
<if test="goodsIntroduction != null">
goods_Introduction = #{goodsIntroduction,jdbcType=LONGVARCHAR},
</if>
@ -622,6 +652,7 @@
pricing_unit = #{pricingUnit,jdbcType=VARCHAR},
unit_cost_price = #{unitCostPrice,jdbcType=DECIMAL},
gross_margin = #{grossMargin,jdbcType=VARCHAR},
goods_unit_price = #{goodsUnitPrice,jdbcType=DECIMAL},
goods_main_image = #{goodsMainImage,jdbcType=VARCHAR},
carousel_image = #{carouselImage,jdbcType=VARCHAR},
pricing_category_name = #{pricingCategoryName,jdbcType=VARCHAR},
@ -642,6 +673,7 @@
online_state = #{onlineState,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=VARCHAR},
submit_state = #{submitState,jdbcType=INTEGER},
goods_Introduction = #{goodsIntroduction,jdbcType=LONGVARCHAR},
specification_packaging = #{specificationPackaging,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
@ -654,6 +686,7 @@
pricing_unit = #{pricingUnit,jdbcType=VARCHAR},
unit_cost_price = #{unitCostPrice,jdbcType=DECIMAL},
gross_margin = #{grossMargin,jdbcType=VARCHAR},
goods_unit_price = #{goodsUnitPrice,jdbcType=DECIMAL},
goods_main_image = #{goodsMainImage,jdbcType=VARCHAR},
carousel_image = #{carouselImage,jdbcType=VARCHAR},
pricing_category_name = #{pricingCategoryName,jdbcType=VARCHAR},
@ -673,7 +706,8 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
online_state = #{onlineState,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
school_id = #{schoolId,jdbcType=VARCHAR}
school_id = #{schoolId,jdbcType=VARCHAR},
submit_state = #{submitState,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -0,0 +1,259 @@
<?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.StuGoodsPromotionPricingMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuGoodsPromotionPricing">
<id column="id" jdbcType="INTEGER" property="id" />
<result column=" goods_id" jdbcType="INTEGER" property="goodsId" />
<result column="promotion_name" jdbcType="VARCHAR" property="promotionName" />
<result column="weight" jdbcType="DECIMAL" property="weight" />
<result column="promotion_cost_price" jdbcType="DECIMAL" property="promotionCostPrice" />
<result column="maximum_price" jdbcType="DECIMAL" property="maximumPrice" />
<result column="fix_a_price" jdbcType="DECIMAL" property="fixAPrice" />
<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, " goods_id", promotion_name, weight, promotion_cost_price, maximum_price, fix_a_price,
user_id
</sql>
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.StuGoodsPromotionPricingExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from stu_goods_promotion_pricing
<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_promotion_pricing
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from stu_goods_promotion_pricing
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.StuGoodsPromotionPricingExample">
delete from stu_goods_promotion_pricing
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuGoodsPromotionPricing">
insert into stu_goods_promotion_pricing (id, " goods_id", promotion_name,
weight, promotion_cost_price, maximum_price,
fix_a_price, user_id)
values (#{id,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{promotionName,jdbcType=VARCHAR},
#{weight,jdbcType=DECIMAL}, #{promotionCostPrice,jdbcType=DECIMAL}, #{maximumPrice,jdbcType=DECIMAL},
#{fixAPrice,jdbcType=DECIMAL}, #{userId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuGoodsPromotionPricing">
insert into stu_goods_promotion_pricing
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="goodsId != null">
" goods_id",
</if>
<if test="promotionName != null">
promotion_name,
</if>
<if test="weight != null">
weight,
</if>
<if test="promotionCostPrice != null">
promotion_cost_price,
</if>
<if test="maximumPrice != null">
maximum_price,
</if>
<if test="fixAPrice != null">
fix_a_price,
</if>
<if test="userId != null">
user_id,
</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="promotionName != null">
#{promotionName,jdbcType=VARCHAR},
</if>
<if test="weight != null">
#{weight,jdbcType=DECIMAL},
</if>
<if test="promotionCostPrice != null">
#{promotionCostPrice,jdbcType=DECIMAL},
</if>
<if test="maximumPrice != null">
#{maximumPrice,jdbcType=DECIMAL},
</if>
<if test="fixAPrice != null">
#{fixAPrice,jdbcType=DECIMAL},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.trade.entity.StuGoodsPromotionPricingExample" resultType="java.lang.Long">
select count(*) from stu_goods_promotion_pricing
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update stu_goods_promotion_pricing
<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.promotionName != null">
promotion_name = #{record.promotionName,jdbcType=VARCHAR},
</if>
<if test="record.weight != null">
weight = #{record.weight,jdbcType=DECIMAL},
</if>
<if test="record.promotionCostPrice != null">
promotion_cost_price = #{record.promotionCostPrice,jdbcType=DECIMAL},
</if>
<if test="record.maximumPrice != null">
maximum_price = #{record.maximumPrice,jdbcType=DECIMAL},
</if>
<if test="record.fixAPrice != null">
fix_a_price = #{record.fixAPrice,jdbcType=DECIMAL},
</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_promotion_pricing
set id = #{record.id,jdbcType=INTEGER},
" goods_id" = #{record.goodsId,jdbcType=INTEGER},
promotion_name = #{record.promotionName,jdbcType=VARCHAR},
weight = #{record.weight,jdbcType=DECIMAL},
promotion_cost_price = #{record.promotionCostPrice,jdbcType=DECIMAL},
maximum_price = #{record.maximumPrice,jdbcType=DECIMAL},
fix_a_price = #{record.fixAPrice,jdbcType=DECIMAL},
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.StuGoodsPromotionPricing">
update stu_goods_promotion_pricing
<set>
<if test="goodsId != null">
" goods_id" = #{goodsId,jdbcType=INTEGER},
</if>
<if test="promotionName != null">
promotion_name = #{promotionName,jdbcType=VARCHAR},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=DECIMAL},
</if>
<if test="promotionCostPrice != null">
promotion_cost_price = #{promotionCostPrice,jdbcType=DECIMAL},
</if>
<if test="maximumPrice != null">
maximum_price = #{maximumPrice,jdbcType=DECIMAL},
</if>
<if test="fixAPrice != null">
fix_a_price = #{fixAPrice,jdbcType=DECIMAL},
</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.StuGoodsPromotionPricing">
update stu_goods_promotion_pricing
set " goods_id" = #{goodsId,jdbcType=INTEGER},
promotion_name = #{promotionName,jdbcType=VARCHAR},
weight = #{weight,jdbcType=DECIMAL},
promotion_cost_price = #{promotionCostPrice,jdbcType=DECIMAL},
maximum_price = #{maximumPrice,jdbcType=DECIMAL},
fix_a_price = #{fixAPrice,jdbcType=DECIMAL},
user_id = #{userId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -14,6 +14,8 @@
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
<result column="attention_state" jdbcType="INTEGER" property="attentionState" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="promotion_state" jdbcType="INTEGER" property="promotionState" />
<result column="promotion_id" jdbcType="INTEGER" property="promotionId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.trade.entity.StuShoppingCartInfo">
<result column="goods_specification" jdbcType="LONGVARCHAR" property="goodsSpecification" />
@ -78,7 +80,7 @@
</sql>
<sql id="Base_Column_List">
id, goods_id, goods_name, goods_type, goods_image, goods_url, unit_price, number,
subtotal, shop_name, attention_state, user_id
subtotal, shop_name, attention_state, user_id, promotion_state, promotion_id
</sql>
<sql id="Blob_Column_List">
goods_specification
@ -136,12 +138,14 @@
goods_type, goods_image, goods_url,
unit_price, number, subtotal,
shop_name, attention_state, user_id,
goods_specification)
promotion_state, promotion_id, goods_specification
)
values (#{id,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{goodsName,jdbcType=VARCHAR},
#{goodsType,jdbcType=VARCHAR}, #{goodsImage,jdbcType=VARCHAR}, #{goodsUrl,jdbcType=VARCHAR},
#{unitPrice,jdbcType=DECIMAL}, #{number,jdbcType=INTEGER}, #{subtotal,jdbcType=DECIMAL},
#{shopName,jdbcType=VARCHAR}, #{attentionState,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR},
#{goodsSpecification,jdbcType=LONGVARCHAR})
#{promotionState,jdbcType=INTEGER}, #{promotionId,jdbcType=INTEGER}, #{goodsSpecification,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuShoppingCartInfo">
insert into stu_shopping_cart_info
@ -182,6 +186,12 @@
<if test="userId != null">
user_id,
</if>
<if test="promotionState != null">
promotion_state,
</if>
<if test="promotionId != null">
promotion_id,
</if>
<if test="goodsSpecification != null">
goods_specification,
</if>
@ -223,6 +233,12 @@
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="promotionState != null">
#{promotionState,jdbcType=INTEGER},
</if>
<if test="promotionId != null">
#{promotionId,jdbcType=INTEGER},
</if>
<if test="goodsSpecification != null">
#{goodsSpecification,jdbcType=LONGVARCHAR},
</if>
@ -273,6 +289,12 @@
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.promotionState != null">
promotion_state = #{record.promotionState,jdbcType=INTEGER},
</if>
<if test="record.promotionId != null">
promotion_id = #{record.promotionId,jdbcType=INTEGER},
</if>
<if test="record.goodsSpecification != null">
goods_specification = #{record.goodsSpecification,jdbcType=LONGVARCHAR},
</if>
@ -295,6 +317,8 @@
shop_name = #{record.shopName,jdbcType=VARCHAR},
attention_state = #{record.attentionState,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR},
promotion_state = #{record.promotionState,jdbcType=INTEGER},
promotion_id = #{record.promotionId,jdbcType=INTEGER},
goods_specification = #{record.goodsSpecification,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -313,7 +337,9 @@
subtotal = #{record.subtotal,jdbcType=DECIMAL},
shop_name = #{record.shopName,jdbcType=VARCHAR},
attention_state = #{record.attentionState,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=VARCHAR}
user_id = #{record.userId,jdbcType=VARCHAR},
promotion_state = #{record.promotionState,jdbcType=INTEGER},
promotion_id = #{record.promotionId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -354,6 +380,12 @@
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="promotionState != null">
promotion_state = #{promotionState,jdbcType=INTEGER},
</if>
<if test="promotionId != null">
promotion_id = #{promotionId,jdbcType=INTEGER},
</if>
<if test="goodsSpecification != null">
goods_specification = #{goodsSpecification,jdbcType=LONGVARCHAR},
</if>
@ -373,6 +405,8 @@
shop_name = #{shopName,jdbcType=VARCHAR},
attention_state = #{attentionState,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
promotion_state = #{promotionState,jdbcType=INTEGER},
promotion_id = #{promotionId,jdbcType=INTEGER},
goods_specification = #{goodsSpecification,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
@ -388,7 +422,9 @@
subtotal = #{subtotal,jdbcType=DECIMAL},
shop_name = #{shopName,jdbcType=VARCHAR},
attention_state = #{attentionState,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR}
user_id = #{userId,jdbcType=VARCHAR},
promotion_state = #{promotionState,jdbcType=INTEGER},
promotion_id = #{promotionId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
Loading…
Cancel
Save