添加 order 临时提交,写完 api dataObject 和一些定义,为实现

This commit is contained in:
sin
2019-03-16 15:22:24 +08:00
parent c8488fc278
commit d70d1dcc7a
18 changed files with 640 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
package cn.iocoder.mall.order.api;
import cn.iocoder.mall.order.api.bo.OrderBO;
import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
import cn.iocoder.mall.order.api.dto.OrderUpdateDTO;
/**
* 订单 service
*
* @author Sin
* @time 2019-03-16 13:15
*/
public interface OrderService {
/**
* 订单创建
*
* @param orderCreateDTO
* @return
*/
OrderBO createOrder(OrderCreateDTO orderCreateDTO);
/**
* 订单更新
*
* @param orderUpdateDTO
*/
void updateOrder(OrderUpdateDTO orderUpdateDTO);
/**
* 删除订单
*
* @param orderId
*/
void deleteOrder(String orderId);
/**
* 监听支付动作
*
* mq 更新 payStatus
*/
void listenerPayment();
/**
* 监听确认收货
*
* mq 更新 status
*/
void listenerConfirmGoods();
/**
* 监听换货
*
* mq 更新 status
*/
void listenerExchangeGoods();
}

View File

@@ -0,0 +1,12 @@
package cn.iocoder.mall.order.api.bo;
import java.io.Serializable;
/**
* 订单创建 BO
*
* @author Sin
* @time 2019-03-16 14:38
*/
public class OrderBO implements Serializable {
}

View File

@@ -0,0 +1,15 @@
package cn.iocoder.mall.order.api.constants;
/**
* MQ 订阅消息
*
* @author Sin
* @time 2019-03-16 15:04
*/
public class MQConstants {
/**
* 订单 - 创建成功 消息
*/
public static final String ORDER_CREATE_SUCCESS = "order.orderCreateSuccess";
}

View File

@@ -0,0 +1,26 @@
package cn.iocoder.mall.order.api.constants;
/**
* 订单状态 status
*
* @author Sin
* @time 2019-03-16 14:32
*/
public enum OrderPayStatusEnum {
WAITING_PAYMENT(0, "等待支付"),
SUCCESSFUL_PAYMENT(1, "支付成功"),
REFUND_PAYMENT(2, "退款成功"),
;
private final int value;
private final String text;
OrderPayStatusEnum(int value, String text) {
this.value = value;
this.text = text;
}
}

View File

@@ -0,0 +1,36 @@
package cn.iocoder.mall.order.api.constants;
/**
* 订单 - status
*
* @author Sin
* @time 2019-03-16 14:06
*/
public enum OrderStatusEnum {
// 基本状态
WAIT_SHIPMENT(0, "等待发货"),
ALREADY_SHIPMENT(1, "已发货"),
RECEIVED_GOODS(2, "已收货"),
CONFIRM_RECEIPT_GOODS(3, "确认收货"), // 确认收货,也就是交易成功!
// 换货
APPLY_EXCHANGE_GOODS(20, "申请换货"),
EXCHANGE_GOODS(21, "换货中"),
EXCHANGE_GOODS_SUCCESSFUL(22, "换货成功"),
// 退货
APPLY_RETURN_GOODS(40, "申请退货"),
RETURN_GOODS(41, "退货中"),
RETURN_GOODS_SUCCESSFUL(42, "退货成功"),
;
private final int value;
private final String text;
OrderStatusEnum(int value, String text) {
this.value = value;
this.text = text;
}}

View File

@@ -0,0 +1,12 @@
package cn.iocoder.mall.order.api.dto;
import java.io.Serializable;
/**
* 订单创建
*
* @author Sin
* @time 2019-03-16 14:42
*/
public class OrderCreateDTO implements Serializable {
}

View File

@@ -0,0 +1,12 @@
package cn.iocoder.mall.order.api.dto;
import java.io.Serializable;
/**
* 订单更新
*
* @author Sin
* @time 2019-03-16 14:46
*/
public class OrderUpdateDTO implements Serializable {
}

View File

@@ -0,0 +1,7 @@
/**
* 订单 api
*
* @author Sin
* @time 2019-03-16 13:15
*/
package cn.iocoder.mall.order.api;