- 重构createWaybillOn3rdProviders

This commit is contained in:
gazebo
2019-03-30 17:11:23 +08:00
parent 10a444c895
commit 96fb2d9535
11 changed files with 127 additions and 100 deletions

View File

@@ -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
}