查找京东商城用户关联的活跃门店

This commit is contained in:
苏尹岚
2019-11-28 08:49:53 +08:00
parent 5cf58c44b0
commit bbc9be5503
5 changed files with 153 additions and 2 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
}