作者 陈志颖

fix:修复代码问题

1 -{"/Users/steve/go/src/partner01/pkg/port/beego":1617679552608984079}  
  1 +{"/Users/steve/go/src/partner01/pkg/port/beego":1617694648836700729}
@@ -15,7 +15,7 @@ import ( @@ -15,7 +15,7 @@ import (
15 type OrderService struct { 15 type OrderService struct {
16 } 16 }
17 17
18 -// 取消订单服务 18 +// 取消订单
19 func (orderService *OrderService) CancelOrder(cancelCommand *command.CancelOrderCommand) (interface{}, error) { 19 func (orderService *OrderService) CancelOrder(cancelCommand *command.CancelOrderCommand) (interface{}, error) {
20 if err := cancelCommand.ValidateCommand(); err != nil { 20 if err := cancelCommand.ValidateCommand(); err != nil {
21 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 21 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
@@ -342,22 +342,27 @@ func (order *Order) Identify() interface{} { @@ -342,22 +342,27 @@ func (order *Order) Identify() interface{} {
342 return order.OrderId 342 return order.OrderId
343 } 343 }
344 344
  345 +// 更新订单
345 func (order *Order) Update(data map[string]interface{}) error { 346 func (order *Order) Update(data map[string]interface{}) error {
346 return order.CurrentStatus.Update(order, data) 347 return order.CurrentStatus.Update(order, data)
347 } 348 }
348 349
  350 +// 发货
349 func (order *Order) Checkout() error { 351 func (order *Order) Checkout() error {
350 return order.CurrentStatus.Checkout(order) 352 return order.CurrentStatus.Checkout(order)
351 } 353 }
352 354
  355 +// 退货
353 func (order *Order) Return() error { 356 func (order *Order) Return() error {
354 return order.CurrentStatus.Return(order) 357 return order.CurrentStatus.Return(order)
355 } 358 }
356 359
  360 +// 收货
357 func (order *Order) Receive() error { 361 func (order *Order) Receive() error {
358 return order.CurrentStatus.Receive(order) 362 return order.CurrentStatus.Receive(order)
359 } 363 }
360 364
  365 +// 取消订单
361 func (order *Order) Cancel() error { 366 func (order *Order) Cancel() error {
362 return order.CurrentStatus.Cancel(order) 367 return order.CurrentStatus.Cancel(order)
363 } 368 }
@@ -13,8 +13,8 @@ type ReturnGoodsService struct { @@ -13,8 +13,8 @@ type ReturnGoodsService struct {
13 transactionContext *pgTransaction.TransactionContext 13 transactionContext *pgTransaction.TransactionContext
14 } 14 }
15 15
16 -func (service *ReceivingGoodsService) Return(orderId int64) (*domain.Order, error) {  
17 - return nil, nil 16 +func (service *ReturnGoodsService) Return(orderId int64) (*domain.Order, error) {
  17 + panic("implement me")
18 } 18 }
19 19
20 func NewReturnGoodsService(transactionContext *pgTransaction.TransactionContext) (*ReturnGoodsService, error) { 20 func NewReturnGoodsService(transactionContext *pgTransaction.TransactionContext) (*ReturnGoodsService, error) {