- 重构createWaybillOn3rdProviders
This commit is contained in:
@@ -158,3 +158,23 @@ func GetMissingDadaStores(db *DaoDB, storeID int, isMustHaveJdStore bool) (store
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func GetStoreCourierList(db *DaoDB, storeID, status int) (courierStoreList []*model.StoreCourierMap, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
FROM store_courier_map t1
|
||||
WHERE t1.deleted_at = ? AND t1.store_id = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
storeID,
|
||||
}
|
||||
if status != model.StoreStatusAll {
|
||||
sql += " AND t1.status = ?"
|
||||
sqlParams = append(sqlParams, status)
|
||||
}
|
||||
if err = GetRows(db, &courierStoreList, sql, sqlParams...); err == nil {
|
||||
return courierStoreList, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user