Merge remote-tracking branch 'origin/mark' into yonghui

This commit is contained in:
苏尹岚
2019-12-04 17:56:08 +08:00
22 changed files with 740 additions and 847 deletions

View File

@@ -179,6 +179,7 @@ func GetStoreOrderAfterTime(db *DaoDB, storeID int, orderTime time.Time, lastOrd
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 > ? AND t1.status < ?
AND (t1.flag & ?) = 0
ORDER BY t1.order_created_at DESC, t1.id DESC;
`
sqlParams := []interface{}{
@@ -186,6 +187,7 @@ func GetStoreOrderAfterTime(db *DaoDB, storeID int, orderTime time.Time, lastOrd
orderTime,
lastOrderSeqID,
model.OrderStatusEndBegin,
model.OrderFlagMaskFake,
}
return orderList, GetRows(db, &orderList, sql, sqlParams...)
}
@@ -899,7 +901,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
ORDER BY IF(t1.status < ?, IF(t1.vendor_id = ?, 0, 1), 0), t1.order_created_at DESC`
sqlParams = append(sqlParams, model.OrderStatusEndBegin, model.VendorIDJX)
} else {
if isIncludeSku {
if isIncludeSku && userID == "" {
sql += `
ORDER BY t1.id`
} else {

View File

@@ -206,7 +206,6 @@ func GetDirtyStoreCategories(db *DaoDB, vendorID, storeID int, level int) (cats
}
// 以store_sku_bind为基础来做同步正常情况下使用
// !!! 此函数不要将store_sku_bind中的vendor_price取出来放到StoreSkuSyncInfo.VendorPrice中因为之后会依赖这个VendorPrice进行重算
// 单多门店模式厂商通用
func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty bool) (skus []*StoreSkuSyncInfo, err error) {
if vendorID < 0 {