查询订单是否是第一次下单
This commit is contained in:
@@ -1367,3 +1367,17 @@ func RefreshJdShopOrdersEarningPrice(ctx *jxcontext.Context, orderStartTime, ord
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func GetOrderUserBuyFirst(ctx *jxcontext.Context, vendorOrderID string) (orderPay *model.OrderPay, err error) {
|
||||
sql := `
|
||||
SELECT b.*
|
||||
FROM goods_order a, order_pay b
|
||||
WHERE a.vendor_order_id = b.vendor_order_id
|
||||
AND a.vendor_id = b.vendor_id
|
||||
AND b.pay_finished_at <> ''
|
||||
AND a.vendor_order_id = ?
|
||||
`
|
||||
sqlParams := []interface{}{vendorOrderID}
|
||||
err = dao.GetRow(dao.GetDB(), &orderPay, sql, sqlParams)
|
||||
return orderPay, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user