Commit 34dc237d by weijiguang

push

parent ad8f586d
...@@ -93,19 +93,21 @@ public class ApplicationController { ...@@ -93,19 +93,21 @@ public class ApplicationController {
log.info("redisJson1:{}", redisJson.toJSONString()); log.info("redisJson1:{}", redisJson.toJSONString());
log.info("goods1:{}", goodsList.toJSONString()); log.info("goods1:{}", goodsList.toJSONString());
if (!CollectionUtils.isEmpty(goodsList)) { if (!CollectionUtils.isEmpty(goodsList)) {
goodsList.forEach(x -> { for (int i = 0; i < goodsList.size(); i++) {
JSONObject goods = JSON.parseObject(x.toString()); JSONObject goods = goodsList.getJSONObject(i);
JSONObject sku = goods.getJSONObject("sku"); JSONObject sku = goods.getJSONObject("sku");
List<SkuVo> skuList = shopGoodsSkuMapper.selectSkuByGoodAndShop(shop.getId(), goods.getString("goodsId")); List<SkuVo> skuList = shopGoodsSkuMapper.selectSkuByGoodAndShop(shop.getId(), goods.getString("goodsId"));
if (CollectionUtils.isEmpty(skuList)) { if (CollectionUtils.isEmpty(skuList)) {
return; continue;
} }
skuList.forEach(skuVo -> { skuList.forEach(skuVo -> {
if (skuVo.getSkuId().toString().equals(sku.getString("skuId"))) { if (skuVo.getSkuId().toString().equals(sku.getString("skuId"))) {
sku.put("origDiscount", skuVo.getOrigDiscount()); sku.put("origDiscount", skuVo.getOrigDiscount());
} }
}); });
}
goodsList.forEach(x -> {
}); });
} }
log.info("redisJson2:{}", redisJson.toJSONString()); log.info("redisJson2:{}", redisJson.toJSONString());
......
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