Commit 6466f3fa by 吕明尚

修改美团门店显示问题

parent a4d37af8
...@@ -407,22 +407,14 @@ public class QPServiceImpl implements QPService { ...@@ -407,22 +407,14 @@ public class QPServiceImpl implements QPService {
JSONObject sessionKey = new JSONObject(o); JSONObject sessionKey = new JSONObject(o);
String session = (String) sessionKey.get("access_token"); String session = (String) sessionKey.get("access_token");
String bid = (String) sessionKey.get("bid"); 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); CustomerKeyShopScopeRequest request = new CustomerKeyShopScopeRequest(APP_KEY, APP_SECRET, session, bid);
CustomerKeyShopScopeQuery shopScopeQuery = new CustomerKeyShopScopeQuery(request); CustomerKeyShopScopeQuery shopScopeQuery = new CustomerKeyShopScopeQuery(request);
CustomerKeyShopScopeResponse response = openAPIClient.invoke(shopScopeQuery); CustomerKeyShopScopeResponse response = openAPIClient.invoke(shopScopeQuery);
//查询所有门店 if (response.getCode() != 200) {
List<SStore> list = storeService.list(); logger.error("适用店铺查询接口:{}", response.getMsg());
//过滤以增加的门店 根据open_shop_uuid throw new RuntimeException(response.getMsg());
List<CustomerKeyShopScopeResponseEntity> data = response.getData(); }
List<CustomerKeyShopScopeResponseEntity> collect = data.stream().filter(o1 -> { return response.getData();
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;
} }
} }
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