This commit is contained in:
suyl
2021-09-01 15:57:43 +08:00
parent 0f265afa77
commit aa1561e6b1

View File

@@ -528,6 +528,11 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
if len(storeIDs2) == 0 { if len(storeIDs2) == 0 {
storeIDs2 = append(storeIDs2, -1) storeIDs2 = append(storeIDs2, -1)
} }
} else {
if params["storeID"] != nil {
if storeIDsMap[int(utils.Interface2Int64WithDefault(params["storeID"], 0))] == 0 {
params["storeID"] = nil
}
} else { } else {
if len(storeIDsMap) > 0 { if len(storeIDsMap) > 0 {
for k, _ := range storeIDsMap { for k, _ := range storeIDsMap {
@@ -537,6 +542,7 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
storeIDs2 = append(storeIDs2, -1) storeIDs2 = append(storeIDs2, -1)
} }
} }
}
if data, err := json.Marshal(storeIDs2); err == nil { if data, err := json.Marshal(storeIDs2); err == nil {
params["storeIDs"] = string(data) params["storeIDs"] = string(data)
} }