he2802 2 vuotta sitten
vanhempi
commit
d8e1c4f985

+ 4 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/distribution/service/impl/DistributionActivityGoodsServiceImpl.java

@@ -278,6 +278,7 @@ public class DistributionActivityGoodsServiceImpl extends ServiceImpl<Distributi
     private RedisCache redisCache;
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public List<GoodsPullResultBo> pullGoods(GoodsPullTenantBo bo) {
         List<GoodsPullResultBo> result = new ArrayList<>();
         Long newTenantId = bo.getTenantId();
@@ -973,7 +974,7 @@ public class DistributionActivityGoodsServiceImpl extends ServiceImpl<Distributi
             }
             return newQuestionId;
         }
-        return null;
+        return 0L;
     }
 
     private Long getNewModuleId(Long oldModuleId, Long newTenantId) {
@@ -1028,7 +1029,7 @@ public class DistributionActivityGoodsServiceImpl extends ServiceImpl<Distributi
             }
             return newModuleId;
         }
-        return null;
+        return 0L;
     }
 
     private Long getNewChapterId(Long oldChapterId, Long newTenantId) {
@@ -1082,7 +1083,7 @@ public class DistributionActivityGoodsServiceImpl extends ServiceImpl<Distributi
 
             return newChapterId;
         }
-        return null;
+        return 0L;
     }
 
     private Long getNewSectionId(Long oldSectionId, Long newTenantId) {

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/distribution/service/impl/DistributionActivityServiceImpl.java

@@ -430,6 +430,7 @@ public class DistributionActivityServiceImpl extends ServiceImpl<DistributionAct
         } catch (Exception e) {
             e.printStackTrace();
             log.error("商品增量报错:" + e.getMessage());
+            throw new CustomException(e.getMessage());
         }finally {
             //释放
             redisCache.deleteObject(key);