Commit 6466f3fa by 吕明尚

修改美团门店显示问题

parent a4d37af8
......@@ -407,22 +407,14 @@ public class QPServiceImpl implements QPService {
JSONObject sessionKey = new JSONObject(o);
String session = (String) sessionKey.get("access_token");
String bid = (String) sessionKey.get("bid");
// CustomerKeyShopScopeRequest request = new CustomerKeyShopScopeRequest(APP_KEY, APP_SECRET, "13ff8a38219075fafbbdeea6839450ed6bea1b9b","f1fd23c1c413862137b895bdcfc10ef8");
CustomerKeyShopScopeRequest request = new CustomerKeyShopScopeRequest(APP_KEY, APP_SECRET, session, bid);
CustomerKeyShopScopeQuery shopScopeQuery = new CustomerKeyShopScopeQuery(request);
CustomerKeyShopScopeResponse response = openAPIClient.invoke(shopScopeQuery);
//查询所有门店
List<SStore> list = storeService.list();
//过滤以增加的门店 根据open_shop_uuid
List<CustomerKeyShopScopeResponseEntity> data = response.getData();
List<CustomerKeyShopScopeResponseEntity> collect = data.stream().filter(o1 -> {
Optional<SStore> first = list.stream().filter(o2 -> o2.getOpenShopUuid().equals(o1.getOpen_shop_uuid())).findFirst();
if (first.isPresent()) {
return false;
}
return true;
}).collect(java.util.stream.Collectors.toList());
return collect;
if (response.getCode() != 200) {
logger.error("适用店铺查询接口:{}", response.getMsg());
throw new RuntimeException(response.getMsg());
}
return response.getData();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment