推荐商品自动关注,修改,以及暂时只整4个小城市
This commit is contained in:
@@ -422,7 +422,7 @@ func GetOpenedStoreCouriersByStoreID(db *DaoDB, storeID, vendorID int) (storeMap
|
||||
return storeMaps, nil
|
||||
}
|
||||
|
||||
func GetStoreList(db *DaoDB, idList []int, mobileList []string, shortRoleName string) (storeList []*model.Store, err error) {
|
||||
func GetStoreList(db *DaoDB, idList, cityCodes, statuss []int, mobileList []string, shortRoleName string) (storeList []*model.Store, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
FROM store t1
|
||||
@@ -434,6 +434,14 @@ func GetStoreList(db *DaoDB, idList []int, mobileList []string, shortRoleName st
|
||||
sql += " AND t1.id IN (" + GenQuestionMarks(len(idList)) + ")"
|
||||
sqlParams = append(sqlParams, idList)
|
||||
}
|
||||
if len(cityCodes) > 0 {
|
||||
sql += " AND t1.city_code IN (" + GenQuestionMarks(len(cityCodes)) + ")"
|
||||
sqlParams = append(sqlParams, cityCodes)
|
||||
}
|
||||
if len(statuss) > 0 {
|
||||
sql += " AND t1.status IN (" + GenQuestionMarks(len(statuss)) + ")"
|
||||
sqlParams = append(sqlParams, statuss)
|
||||
}
|
||||
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