订单评论超时自动评论

This commit is contained in:
wangtongzhou
2019-06-15 16:20:57 +08:00
parent e7c9464804
commit ffd83cc787
10 changed files with 237 additions and 15 deletions

View File

@@ -1,12 +1,13 @@
package cn.iocoder.mall.order.api;
import cn.iocoder.mall.order.api.bo.OrderCommentCreateBO;
import cn.iocoder.mall.order.api.bo.OrderCommentInfoBO;
import cn.iocoder.mall.order.api.bo.OrderCommentPageBO;
import cn.iocoder.mall.order.api.bo.OrderCommentStateInfoPageBO;
import cn.iocoder.mall.order.api.bo.*;
import cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO;
import cn.iocoder.mall.order.api.dto.OrderCommentPageDTO;
import cn.iocoder.mall.order.api.dto.OrderCommentStateInfoPageDTO;
import cn.iocoder.mall.order.api.dto.OrderCommentTimeOutPageDTO;
import java.util.Collection;
import java.util.List;
/**
* 订单评论模块
@@ -49,11 +50,18 @@ public interface OrderCommentService {
OrderCommentStateInfoPageBO getOrderCommentStateInfoPage(OrderCommentStateInfoPageDTO orderCommentStateInfoPageDTO);
/**
* 订单评超时自动好评
* 采用任务的形式执行
* 获取订单评超时分页
* @param orderCommentTimeOutPageDTO
* @return
*/
Boolean OrderCommentTimeOutProductCommentTask();
List<OrderCommentTimeOutBO> getOrderCommentTimeOutPage(OrderCommentTimeOutPageDTO orderCommentTimeOutPageDTO);
/**
* 批量更新订单评论状态
* @param orderCommentTimeOutBOList
*/
void updateBatchOrderCommentState(List<OrderCommentTimeOutBO> orderCommentTimeOutBOList);

View File

@@ -0,0 +1,19 @@
package cn.iocoder.mall.order.api.bo;
import java.io.Serializable;
/**
* 订单评论超时
*
* @author wtz
* @time 2019-06-15 13:52
*/
public class OrderCommentTimeOutBO implements Serializable {
/**
* 评论 id
*/
private Integer id;
}

View File

@@ -0,0 +1,34 @@
package cn.iocoder.mall.order.api.constant;
/**
* 订单评论状态
*
* @author wtz
* @time 2019-06-15 14:26
*/
public enum OrderCommentStatusEnum {
WAIT_COMMENT(0, "待评论"),
SUCCESS_COMMENT(1, "评论成功");
/**
* 状态值
*/
private Integer value;
/**
* 状态名
*/
private String name;
OrderCommentStatusEnum(Integer value, String name) {
this.value = value;
this.name = name;
}
public Integer getValue() {
return value;
}
public String getName() {
return name;
}
}

View File

@@ -0,0 +1,36 @@
package cn.iocoder.mall.order.api.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 订单评论超时
*
* @author wtz
* @time 2019-06-15 10:59
*/
@Data
@Accessors(chain = true)
public class OrderCommentTimeOutPageDTO implements Serializable {
/**
* 超过的天数
*/
private Integer overDay;
/**
* 评论的状态
*/
private Integer commentState;
/**
* 页码
*/
private Integer pageNo;
/**
* 每页条数
*/
private Integer pageSize;
}