|
|
@@ -52,7 +52,6 @@ import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
|
-import javax.transaction.Transactional;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.time.LocalDateTime;
|
|
|
@@ -112,7 +111,6 @@ public class OrderService {
|
|
|
return String.valueOf(id);
|
|
|
}
|
|
|
|
|
|
- @Transactional
|
|
|
public Order create(Long userId, Long collectionId, int qty, Long addressId, Long userCouponId, Long invitor, Long id) {
|
|
|
long t = System.currentTimeMillis();
|
|
|
qty = 1;
|
|
|
@@ -471,7 +469,6 @@ public class OrderService {
|
|
|
return restAmount.subtract(divAmount);
|
|
|
}
|
|
|
|
|
|
- @Transactional
|
|
|
public void notifyOrder(Long orderId, PayMethod payMethod, String transactionId) {
|
|
|
log.info("订单回调 orderId: {}, payMethod: {}, transactionId: {}", orderId, payMethod, transactionId);
|
|
|
BoundValueOperations<String, Object> ops = redisTemplate.boundValueOps("orderLock::" + orderId);
|
|
|
@@ -558,11 +555,10 @@ public class OrderService {
|
|
|
.build();
|
|
|
if (e instanceof BusinessException) {
|
|
|
log.error("订单回调出错 orderId: {} {}", orderId, e.getMessage());
|
|
|
- errorOrder.setErrorMessage(e.getMessage());
|
|
|
} else {
|
|
|
log.error("订单回调出错 orderId: " + orderId, e);
|
|
|
- errorOrder.setErrorMessage(e.getMessage());
|
|
|
}
|
|
|
+ errorOrder.setErrorMessage(e.getMessage());
|
|
|
errorOrderRepo.save(errorOrder);
|
|
|
|
|
|
}
|