gzh queryorder
This commit is contained in:
@@ -1173,9 +1173,14 @@ func GetOrderSimpleInfo(ctx *jxcontext.Context, vendorOrderID string) (getOrderS
|
|||||||
FROM goods_order a
|
FROM goods_order a
|
||||||
JOIN store b ON IF(a.store_id <> '', a.store_id, a.jx_store_id) = b.id
|
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
|
LEFT JOIN waybill c ON c.vendor_order_id = a.vendor_order_id
|
||||||
WHERE a.vendor_order_id = ?
|
WHERE (a.vendor_order_id LIKE ? OR a.consignee_mobile LIKE ?)
|
||||||
|
ORDER BY a.order_created_at DESC
|
||||||
|
LIMIT 1
|
||||||
`
|
`
|
||||||
sqlParams := []interface{}{vendorOrderID}
|
sqlParams := []interface{}{
|
||||||
|
"%" + vendorOrderID + "%",
|
||||||
|
"%" + vendorOrderID + "%",
|
||||||
|
}
|
||||||
err = dao.GetRow(db, &getOrderSimpleInfoResult, sql, sqlParams)
|
err = dao.GetRow(db, &getOrderSimpleInfoResult, sql, sqlParams)
|
||||||
if getOrderSimpleInfoResult == nil {
|
if getOrderSimpleInfoResult == nil {
|
||||||
return getOrderSimpleInfoResult, fmt.Errorf("未查询到该订单的信息!")
|
return getOrderSimpleInfoResult, fmt.Errorf("未查询到该订单的信息!")
|
||||||
|
|||||||
Reference in New Issue
Block a user