Merge branch 'yonghui' of e.coding.net:rosydev/jx-callback into su

This commit is contained in:
苏尹岚
2019-11-28 09:50:19 +08:00
5 changed files with 286 additions and 7 deletions

View File

@@ -441,3 +441,22 @@ func FreightDeductionPack2Obj(packStr string) (obj *model.FreightDeductionPack)
}
return obj
}
func GetStoreMapsListWithoutDisabled(db *DaoDB, vendorIDs []int, status int) (storeMapList []*model.StoreMap, err error) {
sql := `
SELECT *
FROM store_map
WHERE 1=1
`
sqlParams := []interface{}{}
if len(vendorIDs) > 0 {
sql += " AND vendor_id in (" + GenQuestionMarks(len(vendorIDs)) + ")"
sqlParams = append(sqlParams, vendorIDs)
}
if status != model.StoreStatusAll {
sql += " AND status != ?"
sqlParams = append(sqlParams, status)
}
err = GetRows(db, &storeMapList, sql, sqlParams...)
return storeMapList, err
}