Bladeren bron

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 4 jaren geleden
bovenliggende
commit
d5120c3423

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsServiceImpl.java

@@ -465,7 +465,7 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 	}
 
 	@Override
-	@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_COMMITTED)
+	@Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED)
 	public List<SellOrder> subtractStock(List<Integer> goodsIds, AccountType accountType) {
 		if(CollectionUtils.isEmpty(goodsIds)){
 			return Collections.emptyList();

+ 4 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SellOrderServiceImpl.java

@@ -13,6 +13,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
@@ -43,6 +44,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
 
 
     @Override
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public List<SellOrder> addSellOrder(Long orderId, String musicGroupId, List<Integer> goodsIds, BigDecimal totalAmount, BigDecimal balance) {
         if (goodsIds == null || goodsIds.size() <= 0) {
             return null;
@@ -158,6 +160,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public List<SellOrder> addOrderDetail2SellOrder(List<StudentPaymentOrderDetail> orderDetails, StudentPaymentOrder studentPaymentOrder, MusicGroup musicGroup) {
         List<SellOrder> sellOrders = new ArrayList<>();
         //总余额支付
@@ -299,7 +302,7 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public List<SellOrder> refund(List<SellOrder> sellOrders, Boolean reBackFee) {
         Date nowDate = new Date();
         for (SellOrder sellOrder : sellOrders) {

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentRouteOrderServiceImpl.java

@@ -21,6 +21,7 @@ import com.ym.mec.util.collection.MapUtil;
 import org.apache.ibatis.javassist.expr.NewArray;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
@@ -86,7 +87,7 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public StudentPaymentRouteOrderDto addOutOrder(StudentPaymentRouteOrderDto studentPaymentRouteOrderDto) {
         Date nowDate = new Date();
         String orderNo = idGeneratorService.generatorId("payment") + "";

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

@@ -107,7 +107,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
     }
 
     @Override
-    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
+    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public Map addGoodsSellOrder(StudentGoodsSell studentGoodsSell) throws Exception {
         //关闭老订单
         if (StringUtils.isNotEmpty(studentGoodsSell.getOrderNo())) {
@@ -743,6 +743,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
         return pageInfo;
     }
 
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public void saveSellOrder(String orderNo) {
         StudentPaymentOrder orderByOrderNo = studentPaymentOrderService.findOrderByOrderNo(orderNo);
         StudentGoodsSell studentGoodsSell = studentGoodsSellDao.findByOrderNo(orderNo);

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectChangeServiceImpl.java

@@ -18,6 +18,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
@@ -584,6 +585,7 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public List<SellOrder> addSellOrder(Long orderId, String musicGroupId, List<Integer> goodsIds, BigDecimal totalAmount, BigDecimal balance, KitGroupPurchaseTypeEnum kitGroupPurchaseType) {
         if (goodsIds == null || goodsIds.size() <= 0) {
             return null;