aa
This commit is contained in:
@@ -514,7 +514,7 @@ func GetOpenedStoreCouriersByStoreID(db *DaoDB, storeID, vendorID int) (storeMap
|
||||
return storeMaps, nil
|
||||
}
|
||||
|
||||
func GetStoreList(db *DaoDB, idList, cityCodes, statuss []int, mobileList []string, shortRoleName string) (storeList []*model.Store, err error) {
|
||||
func GetStoreList(db *DaoDB, idList, cityCodes, statuss, brandIDs []int, mobileList []string, shortRoleName string) (storeList []*model.Store, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
FROM store t1
|
||||
@@ -534,6 +534,10 @@ func GetStoreList(db *DaoDB, idList, cityCodes, statuss []int, mobileList []stri
|
||||
sql += " AND t1.status IN (" + GenQuestionMarks(len(statuss)) + ")"
|
||||
sqlParams = append(sqlParams, statuss)
|
||||
}
|
||||
if len(brandIDs) > 0 {
|
||||
sql += " AND t1.brand_id IN (" + GenQuestionMarks(len(brandIDs)) + ")"
|
||||
sqlParams = append(sqlParams, brandIDs)
|
||||
}
|
||||
if len(mobileList) > 0 {
|
||||
sql += " AND (t1.tel1 IN (" + GenQuestionMarks(len(mobileList)) + ") OR t1.tel2 IN (" + GenQuestionMarks(len(mobileList)) + "))"
|
||||
sqlParams = append(sqlParams, mobileList, mobileList)
|
||||
|
||||
Reference in New Issue
Block a user