mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 03:25:06 +08:00
fix:完善商品评论
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.product.api.comment;
|
||||
|
||||
import cn.iocoder.yudao.module.product.api.comment.dto.CommentCreateReqDTO;
|
||||
|
||||
/**
|
||||
* 产品评论 API 接口
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
public interface ProductCommentApi {
|
||||
|
||||
/**
|
||||
* 创建评论
|
||||
*
|
||||
* @param createReqDTO 评论参数
|
||||
* @param orderId 订单 id
|
||||
* @return 返回评论创建后的 id
|
||||
*/
|
||||
Long createComment(CommentCreateReqDTO createReqDTO, Long orderId);
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package cn.iocoder.yudao.module.product.api.comment.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 评论创建请求 DTO
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Data
|
||||
public class CommentCreateReqDTO {
|
||||
|
||||
/**
|
||||
* 是否匿名
|
||||
*/
|
||||
private Boolean anonymous;
|
||||
|
||||
/**
|
||||
* 交易订单项编号
|
||||
*/
|
||||
private Long orderItemId;
|
||||
|
||||
/**
|
||||
* 商品 SPU 编号
|
||||
*/
|
||||
private Long spuId;
|
||||
|
||||
/**
|
||||
* 商品 SPU 名称
|
||||
*/
|
||||
private String spuName;
|
||||
|
||||
/**
|
||||
* 商品 SKU 编号
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 评分星级 1-5 分
|
||||
*/
|
||||
private Integer scores;
|
||||
|
||||
/**
|
||||
* 描述星级 1-5 分
|
||||
*/
|
||||
private Integer descriptionScores;
|
||||
|
||||
/**
|
||||
* 服务星级 1-5 分
|
||||
*/
|
||||
private Integer benefitScores;
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 评论图片地址数组,以逗号分隔最多上传9张
|
||||
*/
|
||||
private List<String> picUrls;
|
||||
|
||||
/**
|
||||
* 评价人名称
|
||||
*/
|
||||
private String userNickname;
|
||||
|
||||
/**
|
||||
* 评价人头像
|
||||
*/
|
||||
private String userAvatar;
|
||||
|
||||
/**
|
||||
* 评价人
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
}
|
Reference in New Issue
Block a user