作者 陈志颖

fix:修复代码问题

{"/Users/steve/go/src/partner01/pkg/port/beego":1617679552608984079}
\ No newline at end of file
{"/Users/steve/go/src/partner01/pkg/port/beego":1617694648836700729}
\ No newline at end of file
... ...
... ... @@ -15,7 +15,7 @@ import (
type OrderService struct {
}
// 取消订单服务
// 取消订单
func (orderService *OrderService) CancelOrder(cancelCommand *command.CancelOrderCommand) (interface{}, error) {
if err := cancelCommand.ValidateCommand(); err != nil {
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
... ...
... ... @@ -342,22 +342,27 @@ func (order *Order) Identify() interface{} {
return order.OrderId
}
// 更新订单
func (order *Order) Update(data map[string]interface{}) error {
return order.CurrentStatus.Update(order, data)
}
// 发货
func (order *Order) Checkout() error {
return order.CurrentStatus.Checkout(order)
}
// 退货
func (order *Order) Return() error {
return order.CurrentStatus.Return(order)
}
// 收货
func (order *Order) Receive() error {
return order.CurrentStatus.Receive(order)
}
// 取消订单
func (order *Order) Cancel() error {
return order.CurrentStatus.Cancel(order)
}
... ...
... ... @@ -13,8 +13,8 @@ type ReturnGoodsService struct {
transactionContext *pgTransaction.TransactionContext
}
func (service *ReceivingGoodsService) Return(orderId int64) (*domain.Order, error) {
return nil, nil
func (service *ReturnGoodsService) Return(orderId int64) (*domain.Order, error) {
panic("implement me")
}
func NewReturnGoodsService(transactionContext *pgTransaction.TransactionContext) (*ReturnGoodsService, error) {
... ...