|
|
@@ -711,7 +711,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
} else {
|
|
|
lockKey = "livePayConfirm:lock:" + System.currentTimeMillis();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
boolean lockAcquired = false;
|
|
|
Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
|
|
|
try {
|
|
|
@@ -3738,6 +3738,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
BigDecimal payPrice = fsStoreProduct.getPrice().multiply(new BigDecimal(liveOrder.getTotalNum()));
|
|
|
if (attrValue != null) {
|
|
|
payPrice = attrValue.getPrice().multiply(new BigDecimal(liveOrder.getTotalNum()));
|
|
|
+ fsStoreProduct.setPrice(payPrice);
|
|
|
}
|
|
|
// 直播不需要服务费 0915 1735 左
|
|
|
// String config=configService.selectConfigByKey("store.config");
|
|
|
@@ -3796,11 +3797,13 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
dto.setBarCode(fsStoreProductAttrValue.getBarCode());
|
|
|
dto.setGroupBarCode(fsStoreProductAttrValue.getGroupBarCode());
|
|
|
}
|
|
|
+ dto.setPrice(fsStoreProduct.getPrice());
|
|
|
if (attrValue != null) {
|
|
|
dto.setBarCode(attrValue.getBarCode());
|
|
|
dto.setGroupBarCode(attrValue.getGroupBarCode());
|
|
|
+ dto.setPrice(attrValue.getPrice());
|
|
|
}
|
|
|
- dto.setPrice(fsStoreProduct.getPrice());
|
|
|
+ //dto.setPrice(fsStoreProduct.getPrice());
|
|
|
dto.setProductName(fsStoreProduct.getProductName());
|
|
|
dto.setNum(Long.valueOf(liveOrder.getTotalNum()));
|
|
|
|
|
|
@@ -3812,7 +3815,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
liveOrderItem.setJsonInfo(JSON.toJSONString(dto));
|
|
|
liveOrderItemMapper.insertLiveOrderItem(liveOrderItem);
|
|
|
|
|
|
-
|
|
|
+
|
|
|
redisCache.deleteObject("orderKey:" + liveOrder.getOrderKey());
|
|
|
//添加支付到期时间
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
@@ -4014,19 +4017,19 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
if (product == null) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 如果商品没有设置限购,直接返回
|
|
|
if (product.getPurchaseLimit() == null || product.getPurchaseLimit() <= 0) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 查询用户已购买的数量
|
|
|
FsStoreProductPurchaseLimitScrm purchaseLimit = purchaseLimitService.selectByProductIdAndUserId(productId, userId);
|
|
|
int purchasedNum = 0;
|
|
|
if (purchaseLimit != null) {
|
|
|
purchasedNum = purchaseLimit.getNum();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 检查是否超过限购数量
|
|
|
if (purchasedNum + num > product.getPurchaseLimit()) {
|
|
|
int productTotalNum = purchasedNum + num;
|