This commit is contained in:
邹宗楠
2024-10-10 14:51:50 +08:00
parent f2f5f2be40
commit a3451297ad
3 changed files with 6 additions and 6 deletions

View File

@@ -109,7 +109,7 @@ func GetNearSupplyGoodsStoreByStoreID(ctx *jxcontext.Context, storeID int) (stor
return store, err
}
func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, maxRadius int, needWalkDistance, isJds bool, brandID int) (storeList []*Store4User, err error) {
func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, maxRadius int, needWalkDistance, isJds bool, brandID []int) (storeList []*Store4User, err error) {
const (
maxStoreCount4User = 5
)
@@ -140,8 +140,8 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, maxRadius
model.YES,
model.MatterStoreID,
)
if brandID != 0 {
sql += " AND t1.brand_id = ?"
if len(brandID) != 0 {
sql += " AND t1.brand_id IN (" + dao.GenQuestionMarks(len(brandID)) + ")"
sqlParams = append(sqlParams, brandID)
}
sql += `