Commit 4d207ea7 authored by 张永's avatar 张永

1

parent 723d22c4
......@@ -194,9 +194,17 @@ public class GoodsServiceImpl implements GoodsService {
}
Rjx rjx = Rjx.jsonOk();
if( specList.size() > 0) {
Map<String, Map<String, Object>> specMap = Util.listToMM(specList, ";", "sSpecName", "sSpec");
Set<String> specNames = specList.stream().map(o -> (String)o.get("sSpecName")).collect(Collectors.toSet());
Set<String> specs = specList.stream().map(o -> (String)o.get("sSpec")).collect(Collectors.toSet());
rjx.set("specList", specList).set("specMap", specMap).set("specNames", specNames).set("specs", specs);
}else {
rjx.set("specList", null).set("specMap", null).set("specNames", null).set("specs", null);
}
BigDecimal nMarketPrice = (BigDecimal)detail.get("nMarketPrice");
BigDecimal nRealSalePrice = (BigDecimal)detail.get("nRealSalePrice");
BigDecimal nProfitMargin = BigDecimal.ZERO;
......@@ -234,7 +242,7 @@ public class GoodsServiceImpl implements GoodsService {
detail.put("promoList", promoList);
Rjx rjx = Rjx.jsonOk().set("goodsDetail", detail).set("specList", specList).set("specMap", specMap).set("specNames", specNames).set("specs", specs);
rjx.set("goodsDetail", detail);
rjx.putAll(picList);
return rjx.toJson();
}
......
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