...
|
...
|
@@ -137,7 +137,7 @@ public class BrandWithShopsService implements ApplicationEventPublisherAware { |
|
|
}
|
|
|
JSONObject shop_info = new JSONObject();
|
|
|
List<String> shopIdList = entry.getValue();
|
|
|
JSONArray shop_yoho_list = this.getYohoShopInfo(shopIdList, shopInfoMap);
|
|
|
JSONArray shop_yoho_list = this.getYohoShopInfo(shopIdList, shopInfoMap, brandInfo);
|
|
|
shop_info.put("yoho_shop_list", shop_yoho_list);
|
|
|
shop_info.put("yoho_shop_count", shop_yoho_list.size());
|
|
|
JSONArray global_brand_List = this.getGlobalBrandList(shopIdList, brandId, brandInfoMap);
|
...
|
...
|
@@ -201,8 +201,9 @@ public class BrandWithShopsService implements ApplicationEventPublisherAware { |
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
private JSONArray getYohoShopInfo(List<String> shopIdList, Map<String, Map<String, Object>> shopInfoMap) {
|
|
|
private JSONArray getYohoShopInfo(List<String> shopIdList, Map<String, Map<String, Object>> shopInfoMap, Map<String, Object> brandInfo) {
|
|
|
JSONArray yohoShops = new JSONArray();
|
|
|
Integer configShopInfo = MapUtils.getIntValue(brandInfo, "shop_id", 0);
|
|
|
for (String shopId : shopIdList) {
|
|
|
try {
|
|
|
if (StringUtils.isBlank(shopId)) {
|
...
|
...
|
@@ -212,11 +213,14 @@ public class BrandWithShopsService implements ApplicationEventPublisherAware { |
|
|
if (shopIdInt <= 0) {
|
|
|
continue;
|
|
|
}
|
|
|
if (configShopInfo > 0 && !shopIdInt.equals(configShopInfo)) {
|
|
|
continue;
|
|
|
}
|
|
|
Map<String, Object> shopInfo = shopInfoMap.get(shopId);
|
|
|
if (shopInfo == null) {
|
|
|
continue;
|
|
|
}
|
|
|
if (MapUtils.getIntValue(shopInfo,"status",0)!= 1) {
|
|
|
if (MapUtils.getIntValue(shopInfo, "status", 0) != 1) {
|
|
|
continue;
|
|
|
}
|
|
|
yohoShops.add(shopInfo);
|
...
|
...
|
|