- GetOrders容错
This commit is contained in:
@@ -352,8 +352,12 @@ func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku bool, from
|
||||
return nil, 0, err
|
||||
}
|
||||
if len(storeIDs) > 0 {
|
||||
sqlWhere += " AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, model.VendorIDWSC, storeIDs)
|
||||
if storeIDs[0] == 0 { // 容错
|
||||
sqlWhere += " AND 1 = 0"
|
||||
} else {
|
||||
sqlWhere += " AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, model.VendorIDWSC, storeIDs)
|
||||
}
|
||||
}
|
||||
}
|
||||
if params["statuss"] != nil {
|
||||
|
||||
Reference in New Issue
Block a user