|
@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
+import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.*;
|
|
@@ -48,7 +49,7 @@ public class SysCouponCodeServiceImpl extends BaseServiceImpl<Long, SysCouponCod
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
+ @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_COMMITTED)
|
|
|
public boolean exchangeCoupon(Integer userId, Integer couponId, Long paymentOrderId, Integer exchangeNum) {
|
|
|
if(Objects.isNull(userId)||Objects.isNull(couponId)||Objects.isNull(paymentOrderId)||Objects.isNull(exchangeNum)){
|
|
|
throw new BizException("领取失败");
|