...
|
...
|
@@ -16,7 +16,7 @@ type OrderService struct { |
|
|
}
|
|
|
|
|
|
// 取消订单服务
|
|
|
func (orderService *OrderService) Cancel(cancelCommand *command.CancelCommand) (interface{}, error) {
|
|
|
func (orderService *OrderService) Cancel(cancelCommand *command.CancelOrderCommand) (interface{}, error) {
|
|
|
if err := cancelCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -78,8 +78,8 @@ func (orderService *OrderService) CreateOrder(createOrderCommand *command.Create |
|
|
}
|
|
|
|
|
|
// 订单分红服务
|
|
|
func (orderService *OrderService) DarwDividends(darwDividendsCommand *command.DrawDividendsCommand) (interface{}, error) {
|
|
|
if err := darwDividendsCommand.ValidateCommand(); err != nil {
|
|
|
func (orderService *OrderService) DrawDividends(drawDividendsCommand *command.DrawDividendsCommand) (interface{}, error) {
|
|
|
if err := drawDividendsCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
...
|
...
|
@@ -172,7 +172,7 @@ func (orderService *OrderService) ListOrder(listOrderQuery *query.ListOrderQuery |
|
|
}
|
|
|
|
|
|
// 订单收货服务
|
|
|
func (orderService *OrderService) Receiving(receivingCommand *command.ReceivingCommand) (interface{}, error) {
|
|
|
func (orderService *OrderService) Receiving(receivingCommand *command.ReceivingGoodsCommand) (interface{}, error) {
|
|
|
if err := receivingCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -233,7 +233,7 @@ func (orderService *OrderService) RemoveOrder(removeOrderCommand *command.Remove |
|
|
}
|
|
|
|
|
|
// 订单退货服务
|
|
|
func (orderService *OrderService) Return(returnCommand *command.ReturnCommand) (interface{}, error) {
|
|
|
func (orderService *OrderService) Return(returnCommand *command.ReturnGoodsCommand) (interface{}, error) {
|
|
|
if err := returnCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
@@ -254,7 +254,7 @@ func (orderService *OrderService) Return(returnCommand *command.ReturnCommand) ( |
|
|
}
|
|
|
|
|
|
// 订单发货服务
|
|
|
func (orderService *OrderService) Shipping(shippingCommand *command.ShippingCommand) (interface{}, error) {
|
|
|
func (orderService *OrderService) Shipping(shippingCommand *command.ShippingGoodsCommand) (interface{}, error) {
|
|
|
if err := shippingCommand.ValidateCommand(); err != nil {
|
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
...
|
...
|
|