订单评价和回复接口定义以及mapper实现
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package cn.iocoder.mall.order.api;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentReplyPageBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentReplyPageDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论回复模块
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-29 14:30
|
||||
*
|
||||
*/
|
||||
public interface OrderCommentReplyService {
|
||||
|
||||
/**
|
||||
* 分页获取评论回复
|
||||
* @param orderCommentReplyPageDTO
|
||||
* @return
|
||||
*/
|
||||
List<OrderCommentReplyPageBO> getOrderCommentReplyPage(OrderCommentReplyPageDTO orderCommentReplyPageDTO);
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
package cn.iocoder.mall.order.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentCreateBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentInfoBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentInfoAndMerchantReplyBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentPageBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentReplyCreateBO;
|
||||
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;
|
||||
|
||||
/**
|
||||
@@ -21,7 +20,7 @@ public interface OrderCommentService {
|
||||
* @param orderCommentCreateDTO
|
||||
* @return
|
||||
*/
|
||||
CommonResult<OrderCommentCreateBO> createOrderComment(OrderCommentCreateDTO orderCommentCreateDTO);
|
||||
Boolean createOrderComment(OrderCommentCreateDTO orderCommentCreateDTO);
|
||||
|
||||
|
||||
/**
|
||||
@@ -29,22 +28,31 @@ public interface OrderCommentService {
|
||||
* @param orderCommentReplyCreateDTO
|
||||
* @return
|
||||
*/
|
||||
CommonResult<OrderCommentReplyCreateBO> createOrderCommentReply(OrderCommentReplyCreateDTO orderCommentReplyCreateDTO);
|
||||
Boolean createOrderCommentReply(OrderCommentReplyCreateDTO orderCommentReplyCreateDTO);
|
||||
|
||||
/**
|
||||
* 获取评论列表的分页
|
||||
* @param productSpuId
|
||||
* @param orderCommentPageDTO
|
||||
* @return
|
||||
*/
|
||||
CommonResult<OrderCommentPageBO> getOrderCommentPage(Integer productSpuId);
|
||||
OrderCommentPageBO getOrderCommentPage(OrderCommentPageDTO orderCommentPageDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 获取评论详情
|
||||
* 获取评论详情和商家回复
|
||||
* @param commentId
|
||||
* @return
|
||||
*/
|
||||
CommonResult<OrderCommentInfoBO> getOrderCommentInfo(Integer commentId);
|
||||
OrderCommentInfoAndMerchantReplyBO getOrderCommentInfo(Integer commentId, Integer userType);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订单评价超时自动好评
|
||||
* 采用任务的形式执行
|
||||
* @return
|
||||
*/
|
||||
Boolean OrderCommentTimeOutProductCommentTask();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentBo implements Serializable {
|
||||
public class OrderCommentBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 总条数
|
||||
@@ -39,7 +39,7 @@ public class OrderCommentBo implements Serializable {
|
||||
private Integer negativeTotal;
|
||||
|
||||
/**
|
||||
* 评论id
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package cn.iocoder.mall.order.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论创建
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-15 20:35
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentCreateBO {
|
||||
|
||||
/**
|
||||
* 评论id
|
||||
*/
|
||||
private Integer id;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package cn.iocoder.mall.order.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单回复评价详情和商加回复
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-16 18:40
|
||||
*
|
||||
*/
|
||||
public class OrderCommentInfoAndMerchantReplyBO {
|
||||
|
||||
/**
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String userAvatar;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String userNickName;
|
||||
|
||||
/**
|
||||
* 评价星
|
||||
*/
|
||||
private Integer star;
|
||||
|
||||
/**
|
||||
* 评论的内容
|
||||
*/
|
||||
private String commentContent;
|
||||
|
||||
/**
|
||||
* 评论的图片地址
|
||||
*/
|
||||
private String commentPics;
|
||||
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
private Integer collectCount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 商品 sku id
|
||||
*/
|
||||
private int productSkuId;
|
||||
|
||||
/**
|
||||
* 商品 sku 属性
|
||||
*/
|
||||
private String productSkuAttrs;
|
||||
|
||||
/**
|
||||
* 商品 sku 价格
|
||||
*/
|
||||
private String productSkuPrice;
|
||||
|
||||
/**
|
||||
* 商品 sku 地址
|
||||
*/
|
||||
private String productSkuPicUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 商家回复
|
||||
*/
|
||||
List<OrderCommentReplayMerchantItem> orderCommentReplayMerchantItems;
|
||||
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
private static class OrderCommentReplayMerchantItem{
|
||||
/**
|
||||
* 回复的内容
|
||||
*/
|
||||
private String replyContent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
package cn.iocoder.mall.order.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单回复评价详情
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-16 18:40
|
||||
*
|
||||
*/
|
||||
public class OrderCommentInfoBO {
|
||||
|
||||
/**
|
||||
* 评论id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String userAvatar;
|
||||
|
||||
/**
|
||||
* 用户的真实姓名
|
||||
*/
|
||||
private String userNickName;
|
||||
|
||||
/**
|
||||
* 评价星
|
||||
*/
|
||||
private Integer star;
|
||||
|
||||
/**
|
||||
* 评论的内容
|
||||
*/
|
||||
private String commentContent;
|
||||
|
||||
/**
|
||||
* 评论的图片地址
|
||||
*/
|
||||
private String commentPics;
|
||||
|
||||
/**
|
||||
* 回复条数
|
||||
*/
|
||||
private Integer replayCount;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
private Integer collectCount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 商品SKUid
|
||||
*/
|
||||
private int productSkuId;
|
||||
|
||||
/**
|
||||
* 商品SKU属性
|
||||
*/
|
||||
private String productSkuAttrs;
|
||||
|
||||
/**
|
||||
* 商品SKU价格
|
||||
*/
|
||||
private String productSkuPrice;
|
||||
|
||||
/**
|
||||
* 商品SKU地址
|
||||
*/
|
||||
private String productSkuPicUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 商家回复
|
||||
*/
|
||||
List<OrderCommentReplayMerchantItem> orderCommentReplayMerchantItems;
|
||||
|
||||
/**
|
||||
* 用户回复
|
||||
*/
|
||||
List<OrderCommentReplayUserItem> orderCommentReplayUserItems;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
private static class OrderCommentReplayMerchantItem{
|
||||
/**
|
||||
* 回复的内容
|
||||
*/
|
||||
private String replyContent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
private static class OrderCommentReplayUserItem{
|
||||
/**
|
||||
* 回复id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 回复的类型
|
||||
*/
|
||||
private Integer replyType;
|
||||
|
||||
/**
|
||||
* 回复的内容
|
||||
*/
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 回复的用户id
|
||||
*/
|
||||
private int replyUserId;
|
||||
|
||||
/**
|
||||
* 回复用户的真实姓名
|
||||
*/
|
||||
private String replyUserNickName;
|
||||
|
||||
/**
|
||||
* 回复用户的头像
|
||||
*/
|
||||
private String replyUserAvatar;
|
||||
|
||||
/**
|
||||
* 回复的点赞数
|
||||
*/
|
||||
private int replyCollectCount;
|
||||
|
||||
/**
|
||||
* 回复目标用户昵称
|
||||
*/
|
||||
private String parentUserNickName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class OrderCommentPageBO implements Serializable {
|
||||
@Accessors(chain = true)
|
||||
private static class OrderCommentItem{
|
||||
/**
|
||||
* 评论id
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package cn.iocoder.mall.order.api.bo;
|
||||
|
||||
/**
|
||||
*
|
||||
* 评论回复创建
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-16 18:00:00
|
||||
*/
|
||||
public class OrderCommentReplyCreateBO {
|
||||
|
||||
/**
|
||||
* 评论回复的id
|
||||
*/
|
||||
private Integer id;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package cn.iocoder.mall.order.api.bo;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 评论回复分页展示
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-19 14:19
|
||||
*
|
||||
*/
|
||||
public class OrderCommentReplyPageBO {
|
||||
|
||||
private Integer total;
|
||||
|
||||
/**
|
||||
* 用户回复
|
||||
*/
|
||||
List<OrderCommentReplayUserItem> orderCommentReplayUserItems;
|
||||
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
private static class OrderCommentReplayUserItem{
|
||||
/**
|
||||
* 回复 id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 回复的类型
|
||||
*/
|
||||
private Integer replyType;
|
||||
|
||||
/**
|
||||
* 回复的内容
|
||||
*/
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 回复的用户 id
|
||||
*/
|
||||
private int replyUserId;
|
||||
|
||||
/**
|
||||
* 回复用户的真实姓名
|
||||
*/
|
||||
private String replyUserNickName;
|
||||
|
||||
/**
|
||||
* 回复用户的头像
|
||||
*/
|
||||
private String replyUserAvatar;
|
||||
|
||||
/**
|
||||
* 回复的点赞数
|
||||
*/
|
||||
private int replyCollectCount;
|
||||
|
||||
/**
|
||||
* 回复目标用户昵称
|
||||
*/
|
||||
private String parentUserNickName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.iocoder.mall.order.api.constant;
|
||||
|
||||
/**
|
||||
*
|
||||
* 评论回复 - 回复的用户的类型
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-19 15:19
|
||||
*/
|
||||
public enum OrderReplyUserTypeEnum {
|
||||
|
||||
USER(1, "普通用户"),
|
||||
MERCHANT(2, "商家");
|
||||
/**
|
||||
* 状态值
|
||||
*/
|
||||
private Integer value;
|
||||
/**
|
||||
* 状态名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
OrderReplyUserTypeEnum(Integer value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import java.io.Serializable;
|
||||
public class OrderCommentCreateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
* 订单 id
|
||||
*/
|
||||
private int orderId;
|
||||
|
||||
@@ -27,37 +27,37 @@ public class OrderCommentCreateDTO implements Serializable {
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 商品SPU id
|
||||
* 商品 spu id
|
||||
*/
|
||||
private int productSpuId;
|
||||
|
||||
/**
|
||||
* 商品SPU 名字 SPU 这两个属性待考量我认为加入进去以后后期一些分析可能好做一些
|
||||
* 商品 spu 名字 spu 这两个属性待考量我认为加入进去以后后期一些分析可能好做一些
|
||||
*/
|
||||
private String productSpuName;
|
||||
|
||||
/**
|
||||
* 商品SKU id
|
||||
* 商品 sku id
|
||||
*/
|
||||
private int productSkuId;
|
||||
|
||||
/**
|
||||
* 商品SKU属性
|
||||
* 商品 sku 属性
|
||||
*/
|
||||
private String productSkuAttrs;
|
||||
|
||||
/**
|
||||
* 商品SKU价格
|
||||
* 商品 sku 价格
|
||||
*/
|
||||
private int productSkuPrice;
|
||||
|
||||
/**
|
||||
* 商品SKU地址
|
||||
* 商品 sku 地址
|
||||
*/
|
||||
private String productSkuPicUrl;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
* 用户 id
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
@@ -95,4 +95,9 @@ public class OrderCommentCreateDTO implements Serializable {
|
||||
* 评论内容
|
||||
*/
|
||||
private String commentContent;
|
||||
|
||||
/**
|
||||
* 评论图片
|
||||
*/
|
||||
private String commentPics;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.mall.order.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论 query
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentPageDTO {
|
||||
|
||||
/**
|
||||
* 商品 sku id
|
||||
*/
|
||||
private Integer productSkuId;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNo;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package cn.iocoder.mall.order.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
@@ -10,20 +13,22 @@ import java.io.Serializable;
|
||||
* @time 2019-05-16 19:07
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentReplyCreateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 评论id
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer commentId;
|
||||
|
||||
/**
|
||||
* 评论目标对象id
|
||||
* 评论目标对象 id
|
||||
*/
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 评论目标用户id
|
||||
* 评论目标用户 id
|
||||
*/
|
||||
private Integer parentUserId;
|
||||
|
||||
@@ -43,7 +48,7 @@ public class OrderCommentReplyCreateDTO implements Serializable {
|
||||
private String replyContent;
|
||||
|
||||
/**
|
||||
* 回复用户id
|
||||
* 回复用户 id
|
||||
*/
|
||||
private Integer replyUserId;
|
||||
|
||||
@@ -60,6 +65,6 @@ public class OrderCommentReplyCreateDTO implements Serializable {
|
||||
/**
|
||||
* 回复用户类型
|
||||
*/
|
||||
private Integer replyUserType;
|
||||
private Integer userType;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package cn.iocoder.mall.order.api.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* 订单评论信息详情 query
|
||||
*
|
||||
* @author wtz
|
||||
* @time 2019-05-19 10:16
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderCommentReplyPageDTO {
|
||||
|
||||
/**
|
||||
* 评论 id
|
||||
*/
|
||||
private Integer commentId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNo;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user