- fk.
This commit is contained in:
@@ -126,6 +126,7 @@ func (c *OrderManager) GetOrderSkuInfo(vendorOrderID string, vendorID int) (skus
|
|||||||
func (c *OrderManager) GetOrderInfo(vendorOrderID string, vendorID int) (order *model.GoodsOrderExt, err error) {
|
func (c *OrderManager) GetOrderInfo(vendorOrderID string, vendorID int) (order *model.GoodsOrderExt, err error) {
|
||||||
globals.SugarLogger.Debugf("GetOrderInfo orderID:%s", vendorOrderID)
|
globals.SugarLogger.Debugf("GetOrderInfo orderID:%s", vendorOrderID)
|
||||||
db := orm.NewOrm()
|
db := orm.NewOrm()
|
||||||
|
order = &model.GoodsOrderExt{}
|
||||||
err = db.Raw(`
|
err = db.Raw(`
|
||||||
SELECT t1.*, t2.status waybill_status, t2.courier_name, t2.courier_mobile
|
SELECT t1.*, t2.status waybill_status, t2.courier_name, t2.courier_mobile
|
||||||
FROM goods_order t1
|
FROM goods_order t1
|
||||||
@@ -142,7 +143,7 @@ func (c *OrderManager) GetOrderInfo(vendorOrderID string, vendorID int) (order *
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *OrderManager) GetOrderWaybillInfo(vendorOrderID string, vendorID int) (bills *[]model.Waybill, err error) {
|
func (c *OrderManager) GetOrderWaybillInfo(vendorOrderID string, vendorID int) (bills []*model.Waybill, err error) {
|
||||||
globals.SugarLogger.Debugf("GetOrderWaybillInfo orderID:%s", vendorOrderID)
|
globals.SugarLogger.Debugf("GetOrderWaybillInfo orderID:%s", vendorOrderID)
|
||||||
db := orm.NewOrm()
|
db := orm.NewOrm()
|
||||||
num, err := db.Raw(`
|
num, err := db.Raw(`
|
||||||
@@ -150,7 +151,7 @@ func (c *OrderManager) GetOrderWaybillInfo(vendorOrderID string, vendorID int) (
|
|||||||
FROM waybill t1
|
FROM waybill t1
|
||||||
WHERE t1.vendor_order_id = ? AND order_vendor_id = ?
|
WHERE t1.vendor_order_id = ? AND order_vendor_id = ?
|
||||||
`, vendorOrderID, vendorID).QueryRows(&bills)
|
`, vendorOrderID, vendorID).QueryRows(&bills)
|
||||||
if err == nil && num > 0 {
|
if err == nil {
|
||||||
return bills, nil
|
return bills, nil
|
||||||
}
|
}
|
||||||
if num == 0 {
|
if num == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user