- first edition of long pulling
This commit is contained in:
25
business/model/dao/dao_order.go
Normal file
25
business/model/dao/dao_order.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
func GetStoreOrderAfterTime(db *DaoDB, storeID int, orderTime time.Time, lastOrderSeqID int64) (orderList []*model.GoodsOrderExt, err error) {
|
||||
sql := `
|
||||
SELECT t1.*,
|
||||
t2.status waybill_status, t2.courier_name, t2.courier_mobile,
|
||||
t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at
|
||||
FROM goods_order t1
|
||||
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id
|
||||
WHERE IF(t1.jx_store_id <> 0, t1.jx_store_id, t1.store_id) = ? AND t1.order_created_at >= ? AND t1.id > ?
|
||||
LIMIT 50;
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
storeID,
|
||||
orderTime,
|
||||
lastOrderSeqID,
|
||||
}
|
||||
return orderList, GetRows(db, &orderList, sql, sqlParams...)
|
||||
}
|
||||
Reference in New Issue
Block a user