|
@@ -258,6 +258,9 @@ public class WebsitSalesLogic {
|
|
if (!goodsMap.containsKey(item.getGoodsId())) {
|
|
if (!goodsMap.containsKey(item.getGoodsId())) {
|
|
throw new RemoteServiceException("找不到商品信息:" + item.getGoodsName());
|
|
throw new RemoteServiceException("找不到商品信息:" + item.getGoodsName());
|
|
}
|
|
}
|
|
|
|
+ if (item.getPrice().compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
|
+ throw new RemoteServiceException(item.getGoodsName() + "售价不能为0");
|
|
|
|
+ }
|
|
WebsitGoods goods = goodsMap.get(item.getGoodsId());
|
|
WebsitGoods goods = goodsMap.get(item.getGoodsId());
|
|
item.setGoodsSalesUnit(goods.getGoodsSalesUnit())
|
|
item.setGoodsSalesUnit(goods.getGoodsSalesUnit())
|
|
.setGoodsStockUnit(goods.getGoodsStockUnit())
|
|
.setGoodsStockUnit(goods.getGoodsStockUnit())
|