实现增加评论接口和一些实体和mapper更改
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package cn.iocoder.mall.order.api;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentReplyPageBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentReplyPageDTO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -21,4 +23,12 @@ public interface OrderCommentReplyService {
|
||||
* @return
|
||||
*/
|
||||
List<OrderCommentReplyPageBO> getOrderCommentReplyPage(OrderCommentReplyPageDTO orderCommentReplyPageDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 评论回复创建
|
||||
* @param orderCommentReplyCreateDTO
|
||||
* @return
|
||||
*/
|
||||
OrderCommentReplyCreateBO createOrderCommentReply(OrderCommentReplyCreateDTO orderCommentReplyCreateDTO);
|
||||
}
|
||||
|
||||
@@ -3,10 +3,8 @@ package cn.iocoder.mall.order.api;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentCreateBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentInfoAndMerchantReplyBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentPageBO;
|
||||
import cn.iocoder.mall.order.api.constant.OrderReplyUserTypeEnum;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentPageDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentReplyCreateDTO;
|
||||
|
||||
/**
|
||||
* 订单评论模块
|
||||
@@ -24,12 +22,6 @@ public interface OrderCommentService {
|
||||
OrderCommentCreateBO createOrderComment(OrderCommentCreateDTO orderCommentCreateDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 评论回复创建
|
||||
* @param orderCommentReplyCreateDTO
|
||||
* @return
|
||||
*/
|
||||
Boolean createOrderCommentReply(OrderCommentReplyCreateDTO orderCommentReplyCreateDTO);
|
||||
|
||||
/**
|
||||
* 获取评论列表的分页
|
||||
|
||||
@@ -5,7 +5,6 @@ import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package cn.iocoder.mall.order.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论创建
|
||||
@@ -8,10 +13,12 @@ package cn.iocoder.mall.order.api.bo;
|
||||
* @time 2019-05-19 18:32
|
||||
*
|
||||
*/
|
||||
public class OrderCommentCreateBO {
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentCreateBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单评论 id
|
||||
*/
|
||||
private Integer commentId;
|
||||
private Integer id;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class OrderCommentInfoAndMerchantReplyBO {
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
private static class OrderCommentReplayMerchantItem{
|
||||
public static class OrderCommentReplayMerchantItem{
|
||||
/**
|
||||
* 回复的内容
|
||||
*/
|
||||
|
||||
@@ -24,20 +24,21 @@ public class OrderCommentPageBO implements Serializable {
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
/**
|
||||
* 好评
|
||||
*/
|
||||
private Integer positiveTotal;
|
||||
|
||||
/**
|
||||
* 中评
|
||||
*/
|
||||
private Integer moderateTotal;
|
||||
|
||||
/**
|
||||
* 差评
|
||||
*/
|
||||
private Integer negativeTotal;
|
||||
// 评论标签化等等在做
|
||||
// /**
|
||||
// * 好评
|
||||
// */
|
||||
// private Integer positiveTotal;
|
||||
//
|
||||
// /**
|
||||
// * 中评
|
||||
// */
|
||||
// private Integer moderateTotal;
|
||||
//
|
||||
// /**
|
||||
// * 差评
|
||||
// */
|
||||
// private Integer negativeTotal;
|
||||
|
||||
/**
|
||||
* 评论列表
|
||||
@@ -47,7 +48,7 @@ public class OrderCommentPageBO implements Serializable {
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
private static class OrderCommentItem{
|
||||
public static class OrderCommentItem{
|
||||
/**
|
||||
* 评论 id
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package cn.iocoder.mall.order.api.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
@@ -12,92 +16,70 @@ import java.io.Serializable;
|
||||
* @time 2019-05-15 20:42
|
||||
*
|
||||
*/
|
||||
@ApiModel("订单创建 DTO")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentCreateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单 id
|
||||
*/
|
||||
private int orderId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@ApiModelProperty(value = "订单 id", required = true)
|
||||
@NotNull(message = "订单 id 不能为空")
|
||||
private Integer orderId;
|
||||
|
||||
@ApiModelProperty(value = "订单编号", required = true)
|
||||
@NotEmpty(message = "订单编号不能为空")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 商品 spu id
|
||||
*/
|
||||
private int productSpuId;
|
||||
@ApiModelProperty(value = "商品 spu id", required = true)
|
||||
@NotNull(message = "商品的 spu id 不能为空")
|
||||
private Integer productSpuId;
|
||||
|
||||
/**
|
||||
* 商品 spu 名字 spu 这两个属性待考量我认为加入进去以后后期一些分析可能好做一些
|
||||
*/
|
||||
@ApiModelProperty(value = "商品 spu name", required = true)
|
||||
@NotEmpty(message = "商品的 spu name 不能为空")
|
||||
private String productSpuName;
|
||||
|
||||
/**
|
||||
* 商品 sku id
|
||||
*/
|
||||
private int productSkuId;
|
||||
@ApiModelProperty(value = "商品 sku id", required = true)
|
||||
@NotNull(message = "商品的 sku id 不能为空")
|
||||
private Integer productSkuId;
|
||||
|
||||
/**
|
||||
* 商品 sku 属性
|
||||
*/
|
||||
@ApiModelProperty(value = "商品 sku attrs", required = true)
|
||||
@NotEmpty(message = "商品的 sku attrs 不能为空")
|
||||
private String productSkuAttrs;
|
||||
|
||||
/**
|
||||
* 商品 sku 价格
|
||||
*/
|
||||
private int productSkuPrice;
|
||||
@ApiModelProperty(value = "商品 sku price", required = true)
|
||||
@NotNull(message = "商品的 sku price 不能为空")
|
||||
private Integer productSkuPrice;
|
||||
|
||||
/**
|
||||
* 商品 sku 地址
|
||||
*/
|
||||
@ApiModelProperty(value = "商品 sku url", required = true)
|
||||
@NotEmpty(message = "商品的 sku url 不能为空")
|
||||
private String productSkuPicUrl;
|
||||
|
||||
/**
|
||||
* 用户 id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户 id", required = true)
|
||||
@NotNull(message = "用户 id 不能为空")
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
@ApiModelProperty(value = "用户头像", required = true)
|
||||
private String userAvatar;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
@ApiModelProperty(value = "用户昵称", required = true)
|
||||
@NotEmpty(message = "用户昵称不能为空")
|
||||
private String userNickName;
|
||||
|
||||
/**
|
||||
* 星
|
||||
*/
|
||||
@ApiModelProperty(value = "评价星级", required = true,example = "1-5")
|
||||
private Integer star;
|
||||
|
||||
/**
|
||||
* 产品描述
|
||||
*/
|
||||
@ApiModelProperty(value = "商品描述星级", required = true,example = "1-5")
|
||||
private Integer productDescriptionStar;
|
||||
|
||||
/**
|
||||
* 物流评价
|
||||
*/
|
||||
@ApiModelProperty(value = "物流评价星级", required = true,example = "1-5")
|
||||
private Integer logisticsStar;
|
||||
|
||||
/**
|
||||
* 商家评价
|
||||
*/
|
||||
@ApiModelProperty(value = "商家评价星级", required = true,example = "1-5")
|
||||
private Integer merchantStar;
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
@ApiModelProperty(value = "商家评价内容", required = true,example = "1-5")
|
||||
private String commentContent;
|
||||
|
||||
/**
|
||||
* 评论图片
|
||||
*/
|
||||
@ApiModelProperty(value = "评价图片", required = true)
|
||||
private String commentPics;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user