订单简单查询测试
This commit is contained in:
@@ -962,3 +962,27 @@ func RefreshOrdersPriceInfo(ctx *jxcontext.Context, fromTime, toTime time.Time,
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
type GetOrderSimpleInfoResult struct {
|
||||
VendorOrderID string `orm:"column(vendor_order_id)" json:"vendorOrderID"`
|
||||
Status int `json:"status"`
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id)" json:"waybillVendorID"`
|
||||
CourierName string `json:"courierName"`
|
||||
CourierMobile string `json:"courierMobile"`
|
||||
Tel1 string `json:"tel1"`
|
||||
MarketManPhone string `json:"marketManPhone"`
|
||||
}
|
||||
|
||||
func GetOrderSimpleInfo(ctx *jxcontext.Context, vendorOrderID string) (getOrderSimpleInfoResult *GetOrderSimpleInfoResult, err error) {
|
||||
db := dao.GetDB()
|
||||
sql := `
|
||||
SELECT a.vendor_order_id, a.status, b.waybill_vendor_id, b.courier_name, b.courier_mobile, b.tel1, b.market_man_phone
|
||||
FROM goods_order a
|
||||
JOIN store b ON IF(a.store_id <> '', a.store_id, a.jx_store_id) = b.id
|
||||
LEFT JOIN waybill c ON c.vendor_order_id = a.vendor_order_id
|
||||
WHERE a.vendor_order_id = ?
|
||||
`
|
||||
sqlParams := []interface{}{vendorOrderID}
|
||||
err = dao.GetRow(db, &getOrderSimpleInfoResult, sql, sqlParams)
|
||||
return getOrderSimpleInfoResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user