Commit 33e0970b by 吕明尚

判断团购是否在线

parent f6e9d86e
......@@ -287,6 +287,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
JSONArray products = entries.getJSONArray("products");
products.stream().forEach(item -> {
JSONObject jsonObject = (JSONObject) item;
if (jsonObject.getInt("online_status").equals(YesNoEnum.yes.getIndex())) {
JSONObject sku = jsonObject.getJSONObject("sku");
JSONObject product = jsonObject.getJSONObject("product");
JSONArray pois = product.getJSONArray("pois");
......@@ -317,6 +318,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
sCoupon1.setStoreIds(sCoupon1.getStoreIds() + "," + sStores.stream().filter(store -> store.getPoiId().equals(jsonObject1.getStr("poi_id"))).findFirst().get().getId());
});
}
}
});
return new ArrayList<>(sCouponList.values());
}
......
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