|
@@ -542,7 +542,7 @@ public class OrderInfoServiceImpl implements OrderInfoService {
|
|
|
//购买的碳汇量
|
|
|
BigDecimal carbonVal = good.getCarbonVal();
|
|
|
GoodsInfo goodsInfo = goodsInfoMapper.selectByPrimaryKey(goodsId);
|
|
|
- String guid = goodsInfo.getGuid();
|
|
|
+ String goodsInfoGuid = goodsInfo.getGuid();
|
|
|
//还剩碳汇量
|
|
|
BigDecimal carbonValRe = goodsInfo.getCarbonVal();
|
|
|
if (StringUtils.isEmpty(carbonValRe)) {
|
|
@@ -559,10 +559,12 @@ public class OrderInfoServiceImpl implements OrderInfoService {
|
|
|
sumTotal = sumTotal.add(sum);
|
|
|
|
|
|
carbonTotal = carbonTotal.add(carbonVal);
|
|
|
- //剩余碳汇量
|
|
|
- BigDecimal reCarbonVal = carbonValRe.subtract(carbonVal);
|
|
|
- goodsInfo.setCarbonVal(reCarbonVal);
|
|
|
- goodsInfoMapper.updateByPrimaryKeySelective(goodsInfo);
|
|
|
+// //剩余碳汇量
|
|
|
+// BigDecimal reCarbonVal = carbonValRe.subtract(carbonVal);
|
|
|
+// goodsInfo.setCarbonVal(reCarbonVal);
|
|
|
+// goodsInfoMapper.updateByPrimaryKeySelective(goodsInfo);
|
|
|
+
|
|
|
+ updateGoods(carbonVal,goodsInfoGuid);
|
|
|
|
|
|
//获取小订单
|
|
|
addGoodsOrderDetail(customerId, orderId, dataList, good, goodsInfo, sum);
|