当前位置: 首页>>代码示例>>Golang>>正文


Golang IShopping.GetOrderByNo方法代码示例

本文整理汇总了Golang中go2o/src/core/domain/interface/shopping.IShopping.GetOrderByNo方法的典型用法代码示例。如果您正苦于以下问题:Golang IShopping.GetOrderByNo方法的具体用法?Golang IShopping.GetOrderByNo怎么用?Golang IShopping.GetOrderByNo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在go2o/src/core/domain/interface/shopping.IShopping的用法示例。


在下文中一共展示了IShopping.GetOrderByNo方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: HandleOrder

func (this *shoppingService) HandleOrder(partnerId int, orderNo string) error {
	var sp shopping.IShopping = this._rep.GetShopping(partnerId)
	order, err := sp.GetOrderByNo(orderNo)
	if err == nil {
		b := order.IsOver()
		if b {
			return errors.New("订单已经完成!")
		}

		status := order.GetValue().Status
		switch status + 1 {
		case enum.ORDER_CONFIRMED:
			err = order.Confirm()
		case enum.ORDER_PROCESSING:
			err = order.Process()
		case enum.ORDER_SENDING:
			err = order.Deliver()
		case enum.ORDER_RECEIVED:
			err = order.SignReceived()
		case enum.ORDER_COMPLETED:
			err = order.Complete()
		}
	}
	return err
}
开发者ID:honj51,项目名称:go2o,代码行数:25,代码来源:shopping_service.go

示例2: CancelOrder

func (this *shoppingService) CancelOrder(partnerId int, orderNo string, reason string) error {
	var sp shopping.IShopping = this._rep.GetShopping(partnerId)
	order, err := sp.GetOrderByNo(orderNo)
	if err == nil {
		err = order.Cancel(reason)
	}
	return err
}
开发者ID:honj51,项目名称:go2o,代码行数:8,代码来源:shopping_service.go

示例3: PayForOrder

func (this *shoppingService) PayForOrder(partnerId int, orderNo string) error {
	var sp shopping.IShopping = this._rep.GetShopping(partnerId)
	order, err := sp.GetOrderByNo(orderNo)
	if err == nil {
		err = order.SignPaid()
	}
	return err
}
开发者ID:honj51,项目名称:go2o,代码行数:8,代码来源:shopping_service.go

示例4: PayForOrderOnlineTrade

// 确认付款
func (this *shoppingService) PayForOrderOnlineTrade(partnerId int, orderNo string, spName string, tradeNo string) error {
	var sp shopping.IShopping = this._rep.GetShopping(partnerId)
	order, err := sp.GetOrderByNo(orderNo)
	if err == nil {
		err = order.PaymentOnlineTrade(spName, tradeNo)
	}
	return err
}
开发者ID:henrylee2cn,项目名称:go2o,代码行数:9,代码来源:shopping_service.go

示例5: PayForOrderByManager

// 人工付款
func (this *shoppingService) PayForOrderByManager(partnerId int, orderNo string) error {
	var sp shopping.IShopping = this._rep.GetShopping(partnerId)
	order, err := sp.GetOrderByNo(orderNo)
	if err == nil {
		err = order.CmPaymentWithBalance()
	}
	return err
}
开发者ID:zoe527,项目名称:go2o,代码行数:9,代码来源:shopping_service.go

示例6: GetOrderByNo

func (this *shoppingService) GetOrderByNo(partnerId int,
	orderNo string) *shopping.ValueOrder {
	var sp shopping.IShopping = this._rep.GetShopping(partnerId)
	order, err := sp.GetOrderByNo(orderNo)
	if err != nil {
		Context.Log().PrintErr(err)
		return nil
	}
	v := order.GetValue()
	return &v
}
开发者ID:honj51,项目名称:go2o,代码行数:11,代码来源:shopping_service.go

示例7: SetDeliverShop

func (this *shoppingService) SetDeliverShop(partnerId int, orderNo string,
	shopId int) error {
	var sp shopping.IShopping = this._rep.GetShopping(partnerId)
	order, err := sp.GetOrderByNo(orderNo)
	if err == nil {
		if err = order.SetShop(shopId); err == nil {
			_, err = order.Save()
		}
	}
	return err
}
开发者ID:zoe527,项目名称:go2o,代码行数:11,代码来源:shopping_service.go


注:本文中的go2o/src/core/domain/interface/shopping.IShopping.GetOrderByNo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。