...
|
...
|
@@ -15,8 +15,8 @@ import ( |
|
|
type OrderService struct {
|
|
|
}
|
|
|
|
|
|
// 取消订单服务
|
|
|
func (orderService *OrderService) Cancel(cancelCommand *command.CancelOrderCommand) (interface{}, error) {
|
|
|
// 取消订单
|
|
|
func (orderService *OrderService) CancelOrder(cancelCommand *command.CancelOrderCommand) (interface{}, error) {
|
|
|
if err := cancelCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -172,7 +172,7 @@ func (orderService *OrderService) ListOrder(listOrderQuery *query.ListOrderQuery |
|
|
}
|
|
|
|
|
|
// 订单收货服务
|
|
|
func (orderService *OrderService) Receiving(receivingCommand *command.ReceivingGoodsCommand) (interface{}, error) {
|
|
|
func (orderService *OrderService) ReceiveGoods(receivingCommand *command.ReceiveGoodsCommand) (interface{}, error) {
|
|
|
if err := receivingCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -233,8 +233,8 @@ func (orderService *OrderService) RemoveOrder(removeOrderCommand *command.Remove |
|
|
}
|
|
|
|
|
|
// 订单退货服务
|
|
|
func (orderService *OrderService) Return(returnCommand *command.ReturnGoodsCommand) (interface{}, error) {
|
|
|
if err := returnCommand.ValidateCommand(); err != nil {
|
|
|
func (orderService *OrderService) ReturnGoods(returnGoodsCommand *command.ReturnGoodsCommand) (interface{}, error) {
|
|
|
if err := returnGoodsCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
...
|
...
|
@@ -254,8 +254,8 @@ func (orderService *OrderService) Return(returnCommand *command.ReturnGoodsComma |
|
|
}
|
|
|
|
|
|
// 订单发货服务
|
|
|
func (orderService *OrderService) Shipping(shippingCommand *command.ShippingGoodsCommand) (interface{}, error) {
|
|
|
if err := shippingCommand.ValidateCommand(); err != nil {
|
|
|
func (orderService *OrderService) ShippingGoods(shippingGoodsCommand *command.ShippingGoodsCommand) (interface{}, error) {
|
|
|
if err := shippingGoodsCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
...
|
...
|
|