|
@@ -20,6 +20,8 @@ import com.fdkankan.contro.util.ZipUtil;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.model.constants.ConstantFilePath;
|
|
import com.fdkankan.model.constants.ConstantFilePath;
|
|
|
import com.fdkankan.model.constants.UploadFilePath;
|
|
import com.fdkankan.model.constants.UploadFilePath;
|
|
|
|
|
+import com.fdkankan.redis.constant.RedisKey;
|
|
|
|
|
+import com.fdkankan.redis.util.RedisUtil;
|
|
|
import com.fdkankan.web.util.RSAEncrypt;
|
|
import com.fdkankan.web.util.RSAEncrypt;
|
|
|
import com.rabbitmq.client.Channel;
|
|
import com.rabbitmq.client.Channel;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -32,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -61,6 +64,9 @@ public class UploadSceneListener {
|
|
|
private ISceneEditControlsService sceneEditControlsService;
|
|
private ISceneEditControlsService sceneEditControlsService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ICommonService commonService;
|
|
private ICommonService commonService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private RedisUtil redisUtil;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -166,6 +172,11 @@ public class UploadSceneListener {
|
|
|
String sceneJsonKey = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json";
|
|
String sceneJsonKey = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json";
|
|
|
fYunFileService.uploadFile(JSON.toJSONString(sceneJsonBean).getBytes(StandardCharsets.UTF_8), sceneJsonKey);
|
|
fYunFileService.uploadFile(JSON.toJSONString(sceneJsonBean).getBytes(StandardCharsets.UTF_8), sceneJsonKey);
|
|
|
|
|
|
|
|
|
|
+ String key = String.format(RedisKey.SCENE_JSON, num);
|
|
|
|
|
+ if(redisUtil.hasKey(key)){
|
|
|
|
|
+ redisUtil.del(key);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//容量统计
|
|
//容量统计
|
|
|
Long space = commonService.getSpace(num);
|
|
Long space = commonService.getSpace(num);
|
|
|
|
|
|