dengsixing 3 years ago
parent
commit
99d78f1502

+ 1 - 1
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/SceneFileController.java

@@ -22,7 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
 @Log4j2
 @RestController
 @RequestMapping("/api/scene/file")
-@Transactional(rollbackFor = Exception.class)
+//@Transactional(rollbackFor = Exception.class)
 public class SceneFileController extends BaseController {
 
     @Value("${main.url}")

+ 1 - 0
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/TestController.java

@@ -24,6 +24,7 @@ import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;

+ 0 - 2
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/Scene3dNumServiceImpl.java

@@ -44,7 +44,6 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
     @Autowired
     RedisLockUtil redisLockUtil;
 
-    @Transactional(propagation = Propagation.NOT_SUPPORTED)
     @Override
     public String generateSceneNum(){
         // 从缓存中获取
@@ -53,7 +52,6 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
             return sceneNum;
         }
         // 分布式加锁
-        log.info("redisutil:" + redisUtil.toString());
         Long loading =  redisUtil.incr(RedisLockKey.LOCK_FDKANKAN_SCENE_NUMS, 1);
         if (loading.compareTo(1L) == 0) {
             try {