自动关注
This commit is contained in:
@@ -1052,7 +1052,7 @@ func GetWayBillByOrderID(db *DaoDB, orderStatus, vendorID, waybillVendorID int,
|
||||
return wayBillList, err
|
||||
}
|
||||
|
||||
func GetOrdersSupplement(db *DaoDB, storIDs, vendorIDs []int, vendorOrderID string, fromTime, toTime time.Time, status, stype, offset, pageSize int) (orderSupplementFee []*model.OrderSupplementFee, totalCount int, err error) {
|
||||
func GetOrdersSupplement(db *DaoDB, storIDs, vendorIDs []int, vendorOrderID string, fromTime, toTime time.Time, status, stype, IsReverse, offset, pageSize int) (orderSupplementFee []*model.OrderSupplementFee, totalCount int, err error) {
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS *
|
||||
FROM order_supplement_fee
|
||||
@@ -1075,7 +1075,7 @@ func GetOrdersSupplement(db *DaoDB, storIDs, vendorIDs []int, vendorOrderID stri
|
||||
sqlParams = append(sqlParams, storIDs)
|
||||
}
|
||||
if len(vendorIDs) > 0 {
|
||||
sql += " AND store_id IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
|
||||
sql += " AND vendor_id IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
|
||||
sqlParams = append(sqlParams, vendorIDs)
|
||||
}
|
||||
if vendorOrderID != "" {
|
||||
@@ -1090,6 +1090,11 @@ func GetOrdersSupplement(db *DaoDB, storIDs, vendorIDs []int, vendorOrderID stri
|
||||
sql += " AND type = ?"
|
||||
sqlParams = append(sqlParams, stype)
|
||||
}
|
||||
if IsReverse == -1 {
|
||||
sql += " AND link_id = 0"
|
||||
} else if IsReverse == 1 {
|
||||
sql += " AND link_id <> 0"
|
||||
}
|
||||
sql += `
|
||||
LIMIT ? OFFSET ?`
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
|
||||
Reference in New Issue
Block a user