dengsixing 10 months ago
parent
commit
9b255931d2

+ 22 - 22
src/main/java/com/fdkankan/scene/controller/SceneEditController.java

@@ -127,8 +127,8 @@ public class SceneEditController{
      * @return com.fdkankan.web.response.ResultData
      * @return com.fdkankan.web.response.ResultData
      **/
      **/
     @PostMapping(value = "/tag/list")
     @PostMapping(value = "/tag/list")
-    public ResultData listTags(@RequestParam(value = "num") String num) throws Exception {
-        return sceneProService.listTags(num);
+    public ResultData listTags(@RequestParam(value = "num") String num, @RequestParam(value = "subgroup", defaultValue = "0") Integer subgroup) throws Exception {
+        return sceneProService.listTags(num, subgroup);
     }
     }
 
 
     /**
     /**
@@ -280,8 +280,8 @@ public class SceneEditController{
      * @return com.fdkankan.web.response.ResultData
      * @return com.fdkankan.web.response.ResultData
      **/
      **/
     @PostMapping(value = "/linkPan/list")
     @PostMapping(value = "/linkPan/list")
-    public ResultData listLinkPan(@RequestParam(value = "num") String num) throws Exception {
-        return sceneEditInfoService.listLinkPan(num);
+    public ResultData listLinkPan(@RequestParam(value = "num") String num, @RequestParam(value = "subgroup", defaultValue = "0") Integer subgroup) throws Exception {
+        return sceneEditInfoService.listLinkPan(num, subgroup);
     }
     }
 
 
     /**
     /**
@@ -338,8 +338,8 @@ public class SceneEditController{
      * @return
      * @return
      **/
      **/
     @PostMapping(value = "/cad/reset")
     @PostMapping(value = "/cad/reset")
-    public ResultData resetCad(@RequestParam(value = "num") String num) throws Exception {
-        return sceneEditInfoService.resetCad(num);
+    public ResultData resetCad(@RequestParam(value = "num") String num, @RequestParam(value = "subgroup", defaultValue = "0") Integer subgroup) throws Exception {
+        return sceneEditInfoService.resetCad(num, subgroup);
     }
     }
 
 
     /**
     /**
@@ -506,8 +506,9 @@ public class SceneEditController{
         @RequestParam(value = "files",required = false) MultipartFile[] files,
         @RequestParam(value = "files",required = false) MultipartFile[] files,
         @RequestParam(value = "num",required = false) String num,
         @RequestParam(value = "num",required = false) String num,
         @RequestParam(value = "type",required = false,defaultValue = "1") Integer type,
         @RequestParam(value = "type",required = false,defaultValue = "1") Integer type,
-        @RequestParam(value = "uploadPath",required = false) String uploadPath) throws Exception {
-        return sceneUploadService.uploads(base64,fileName,bizType,files,num,type,uploadPath);
+        @RequestParam(value = "uploadPath",required = false) String uploadPath,
+        @RequestParam(value = "subgroup",defaultValue = "0") Integer subgroup) throws Exception {
+        return sceneUploadService.uploads(base64,fileName,bizType,files,num,type,uploadPath, subgroup);
     }
     }
 
 
 //    /**
 //    /**
@@ -524,20 +525,19 @@ public class SceneEditController{
 //        return sceneUploadService.uploadContent(param);
 //        return sceneUploadService.uploadContent(param);
 //    }
 //    }
 //
 //
-//    /**
-//     * <p>
-//            删除文件
-//     * </p>
-//     * @author dengsixing
-//     * @date 2022/2/23
-//     * @param paramVO
-//     * @return com.fdkankan.web.response.ResultData
-//     **/
-//    @CheckPermit
-//    @PostMapping("/delete/file")
-//    public ResultData delete(@RequestBody @Validated DeleteFileParamVO paramVO) throws Exception{
-//        return sceneUploadService.delete(paramVO);
-//    }
+    /**
+     * <p>
+            删除文件
+     * </p>
+     * @author dengsixing
+     * @date 2022/2/23
+     * @param paramVO
+     * @return com.fdkankan.web.response.ResultData
+     **/
+    @PostMapping("/delete/file")
+    public ResultData delete(@RequestBody @Validated DeleteFileParamVO paramVO) throws Exception{
+        return sceneUploadService.delete(paramVO);
+    }
 //
 //
 //    /**
 //    /**
 //     * <p>
 //     * <p>

+ 4 - 2
src/main/java/com/fdkankan/scene/service/FYunFileService.java

@@ -4,10 +4,12 @@ import java.io.IOException;
 
 
 public interface FYunFileService {
 public interface FYunFileService {
 
 
-    String getFileContent(String key) throws IOException;
+    String getFileContent(String key, Integer subgroup) throws IOException;
 
 
     void uploadFile(String num, Integer subgroup, byte[] data, String key);
     void uploadFile(String num, Integer subgroup, byte[] data, String key);
 
 
-    void uploadFile(String num, String path, String key);
+    void uploadFile(String num, Integer subgroup, String path, String key);
+
+    void deleteFile(String num, Integer subgroup, String key);
 
 
 }
 }

+ 1 - 1
src/main/java/com/fdkankan/scene/service/ISceneProService.java

@@ -21,7 +21,7 @@ public interface ISceneProService{
 
 
     ResultData deleteIcons(DeleteHotIconParamVO param) throws Exception;
     ResultData deleteIcons(DeleteHotIconParamVO param) throws Exception;
 
 
-    ResultData listTags(String num) throws Exception;
+    ResultData listTags(String num, Integer subgroup) throws Exception;
 
 
     ResultData saveRoam(BaseDataParamVO param) throws Exception;
     ResultData saveRoam(BaseDataParamVO param) throws Exception;
 
 

+ 4 - 2
src/main/java/com/fdkankan/scene/service/ISceneUploadService.java

@@ -1,5 +1,7 @@
 package com.fdkankan.scene.service;
 package com.fdkankan.scene.service;
 
 
+import com.fdkankan.scene.bean.ResultData;
+import com.fdkankan.scene.vo.DeleteFileParamVO;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 
 
 /**
 /**
@@ -13,9 +15,9 @@ import org.springframework.web.multipart.MultipartFile;
 public interface ISceneUploadService{
 public interface ISceneUploadService{
 
 
     String uploads(String imgData, String fileName,String blzType,MultipartFile[] files,
     String uploads(String imgData, String fileName,String blzType,MultipartFile[] files,
-        String sceneCode, Integer type, String uploadPath) throws Exception;
+        String sceneCode, Integer type, String uploadPath, Integer subgroup) throws Exception;
 
 
-//    ResultData delete(DeleteFileParamVO param) throws Exception;
+    ResultData delete(DeleteFileParamVO param) throws Exception;
 //
 //
 //    String uploadContent(UploadContentParamVO param) throws Exception;
 //    String uploadContent(UploadContentParamVO param) throws Exception;
 }
 }

+ 3 - 3
src/main/java/com/fdkankan/scene/service/SceneEditInfoService.java

@@ -38,7 +38,7 @@ public interface SceneEditInfoService extends IService<SceneEditInfo> {
 //
 //
 //    ResultData downloadDxf(String num) throws Exception;
 //    ResultData downloadDxf(String num) throws Exception;
 
 
-    ResultData resetCad(String num) throws IOException;
+    ResultData resetCad(String num, Integer subgroup) throws IOException;
 
 
     ResultData renameCad(RenameCadParamVO param) throws IOException;
     ResultData renameCad(RenameCadParamVO param) throws IOException;
 //
 //
@@ -78,7 +78,7 @@ public interface SceneEditInfoService extends IService<SceneEditInfo> {
 //
 //
 //    ResultData saveLinkPan(SaveLinkPanParamVO param) throws Exception;
 //    ResultData saveLinkPan(SaveLinkPanParamVO param) throws Exception;
 
 
-    ResultData listLinkPan(String num) throws Exception;
+    ResultData listLinkPan(String num, Integer subgroup) throws Exception;
 //
 //
 //    ResultData deleteLinkPan(DeleteLinkPanParamVO param) throws Exception;
 //    ResultData deleteLinkPan(DeleteLinkPanParamVO param) throws Exception;
 //
 //
@@ -86,7 +86,7 @@ public interface SceneEditInfoService extends IService<SceneEditInfo> {
 
 
     ResultData deleteMosaics(DeleteMosaicParamVO param) throws Exception;
     ResultData deleteMosaics(DeleteMosaicParamVO param) throws Exception;
 
 
-    List<JSONObject> getMosaicList(String num) throws Exception;
+    List<JSONObject> getMosaicList(String num, Integer subgroup) throws Exception;
 
 
     ResultData addWaterMark(BaseFileParamVO param) throws Exception;
     ResultData addWaterMark(BaseFileParamVO param) throws Exception;
 
 

+ 2 - 2
src/main/java/com/fdkankan/scene/service/SceneFileMappingService.java

@@ -13,8 +13,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
  */
 public interface SceneFileMappingService extends IService<SceneFileMapping> {
 public interface SceneFileMappingService extends IService<SceneFileMapping> {
 
 
-    SceneFileMapping getByKey(String key);
+    SceneFileMapping getByKey(String key, Integer subgroup);
 
 
-    void delByNumAndKey(String num, String key);
+    void delByNumAndKey(String num, Integer subgroup, String key);
 
 
 }
 }

+ 10 - 4
src/main/java/com/fdkankan/scene/service/impl/FYunFileServiceImpl.java

@@ -31,8 +31,8 @@ public class FYunFileServiceImpl implements FYunFileService {
 
 
 
 
     @Override
     @Override
-    public String getFileContent(String key) throws IOException {
-        SceneFileMapping sceneFileMapping = sceneFileMappingService.getByKey(key);
+    public String getFileContent(String key, Integer subgroup) throws IOException {
+        SceneFileMapping sceneFileMapping = sceneFileMappingService.getByKey(key, subgroup);
         String content = null;
         String content = null;
         try (InputStream inputStream = customHttpClient.downloadFileToInputStream(sceneFileMapping.getUrl())){
         try (InputStream inputStream = customHttpClient.downloadFileToInputStream(sceneFileMapping.getUrl())){
             content =  IoUtil.read(inputStream, StandardCharsets.UTF_8);
             content =  IoUtil.read(inputStream, StandardCharsets.UTF_8);
@@ -60,10 +60,10 @@ public class FYunFileServiceImpl implements FYunFileService {
     }
     }
 
 
     @Override
     @Override
-    public void uploadFile(String num, String path, String key) {
+    public void uploadFile(String num, Integer subgroup, String path, String key) {
         Map<String, String> mapping = fdfsUtil.uploadFile(path);
         Map<String, String> mapping = fdfsUtil.uploadFile(path);
         //添加记录
         //添加记录
-        SceneFileMapping sceneFileMapping =  sceneFileMappingService.getByKey(key);
+        SceneFileMapping sceneFileMapping =  sceneFileMappingService.getByKey(key,subgroup);
         if(Objects.isNull(sceneFileMapping)){
         if(Objects.isNull(sceneFileMapping)){
             sceneFileMapping = new SceneFileMapping();
             sceneFileMapping = new SceneFileMapping();
         }
         }
@@ -71,9 +71,15 @@ public class FYunFileServiceImpl implements FYunFileService {
         sceneFileMapping.setFileid(mapping.get("file_id"));
         sceneFileMapping.setFileid(mapping.get("file_id"));
         sceneFileMapping.setUrl(mapping.get("http_url"));
         sceneFileMapping.setUrl(mapping.get("http_url"));
         sceneFileMapping.setKey(key);
         sceneFileMapping.setKey(key);
+        sceneFileMapping.setSubgroup(subgroup);
         sceneFileMappingService.saveOrUpdate(sceneFileMapping);
         sceneFileMappingService.saveOrUpdate(sceneFileMapping);
     }
     }
 
 
+    @Override
+    public void deleteFile(String num, Integer subgroup, String key) {
+        sceneFileMappingService.delByNumAndKey(num, subgroup, key);
+    }
+
     public static void main(String[] args) {
     public static void main(String[] args) {
         String suffix = "." + FileUtil.getSuffix("/sxx/ttt/adf.json");
         String suffix = "." + FileUtil.getSuffix("/sxx/ttt/adf.json");
         File tempFile = FileUtil.createTempFile(UUID.fastUUID().toString(), suffix, new File("D:\\test2"), true);
         File tempFile = FileUtil.createTempFile(UUID.fastUUID().toString(), suffix, new File("D:\\test2"), true);

+ 35 - 37
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -393,10 +393,10 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
         switch (sceneInfoReqType){
         switch (sceneInfoReqType){
             //如果是编辑页面请求,查数据库
             //如果是编辑页面请求,查数据库
             case EDIT:
             case EDIT:
-                return this.getSceneInfo4Edit(param.getNum());
+                return this.getSceneInfo4Edit(param.getNum(), param.getSubgroup());
             //如果是查看页面请求,查redis
             //如果是查看页面请求,查redis
             case VIEW:
             case VIEW:
-                return this.getSceneInfo4Edit(param.getNum());
+                return this.getSceneInfo4Edit(param.getNum(), param.getSubgroup());
         }
         }
         return null;
         return null;
     }
     }
@@ -410,9 +410,9 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
      * @param num
      * @param num
      * @return com.fdkankan.scene.vo.SceneInfoVO
      * @return com.fdkankan.scene.vo.SceneInfoVO
      **/
      **/
-    private SceneInfoVO getSceneInfo4Edit(String num) throws Exception{
+    private SceneInfoVO getSceneInfo4Edit(String num, Integer subgroup) throws Exception{
 
 
-        Scene scenePlus = sceneService.getByNum(num);
+        Scene scenePlus = sceneService.getByNum(num, subgroup);
         if(Objects.isNull(scenePlus)){
         if(Objects.isNull(scenePlus)){
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
         }
         }
@@ -441,37 +441,37 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
         sceneInfoVO.setSceneKind(scenePlus.getScenekind());
         sceneInfoVO.setSceneKind(scenePlus.getScenekind());
         sceneInfoVO.setModelKind(scenePlus.getModelkind());
         sceneInfoVO.setModelKind(scenePlus.getModelkind());
         if(CommonStatus.YES.code().intValue() == sceneEditInfoExt.getMosaic()){
         if(CommonStatus.YES.code().intValue() == sceneEditInfoExt.getMosaic()){
-            sceneInfoVO.setMosaicList(this.getMosaicList(num));
+            sceneInfoVO.setMosaicList(this.getMosaicList(num, subgroup));
         }
         }
         sceneInfoVO.setSns(JSON.parseObject(sceneEditInfoExt.getSnsInfo()));
         sceneInfoVO.setSns(JSON.parseObject(sceneEditInfoExt.getSnsInfo()));
         sceneInfoVO.setStarted(JSON.parseObject(sceneEditInfoExt.getStarted()));
         sceneInfoVO.setStarted(JSON.parseObject(sceneEditInfoExt.getStarted()));
 
 
 //        this.SortBoxVideos(sceneInfoVO);
 //        this.SortBoxVideos(sceneInfoVO);
 
 
-        Set<String> keySet = new HashSet<>();
-        Set<Long> deleteIds = new HashSet<>();
-        List<SceneFileMapping> mappings = new ArrayList<>();
-        List<SceneFileMapping> mappingList = sceneFileMappingService.list(new LambdaQueryWrapper<SceneFileMapping>().eq(SceneFileMapping::getNum, num).orderByDesc(SceneFileMapping::getId));
-        for (SceneFileMapping mapping : mappingList) {
-            if(keySet.contains(mapping.getKey())){
-                deleteIds.add(mapping.getId());
-            }else{
-                keySet.add(mapping.getKey());
-                mappings.add(mapping);
-            }
-        }
-        if(CollUtil.isNotEmpty(deleteIds)){
-            sceneFileMappingService.removeByIds(deleteIds);
-        }
+//        Set<String> keySet = new HashSet<>();
+//        Set<Long> deleteIds = new HashSet<>();
+//        List<SceneFileMapping> mappings = new ArrayList<>();
+//        List<SceneFileMapping> mappingList = sceneFileMappingService.list(new LambdaQueryWrapper<SceneFileMapping>().eq(SceneFileMapping::getNum, num).orderByDesc(SceneFileMapping::getId));
+//        for (SceneFileMapping mapping : mappingList) {
+//            if(keySet.contains(mapping.getKey())){
+//                deleteIds.add(mapping.getId());
+//            }else{
+//                keySet.add(mapping.getKey());
+//                mappings.add(mapping);
+//            }
+//        }
+//        if(CollUtil.isNotEmpty(deleteIds)){
+//            sceneFileMappingService.removeByIds(deleteIds);
+//        }
 
 
-        Map<String, String> keyMap = new HashMap<>();
-        for (SceneFileMapping sceneFileMapping : mappings) {
-            keyMap.put(sceneFileMapping.getKey(), "service/scene/file?key=" + sceneFileMapping.getKey());
-        }
+//        Map<String, String> keyMap = new HashMap<>();
+//        for (SceneFileMapping sceneFileMapping : mappings) {
+//            keyMap.put(sceneFileMapping.getKey(), "service/scene/file?key=" + sceneFileMapping.getKey());
+//        }
 //        sceneInfoVO.setMapping(keyMap);
 //        sceneInfoVO.setMapping(keyMap);
 
 
         //马赛克列表
         //马赛克列表
-        sceneInfoVO.setMosaicList(this.getMosaicList(num));
+//        sceneInfoVO.setMosaicList(this.getMosaicList(num));
 
 
         return sceneInfoVO;
         return sceneInfoVO;
     }
     }
@@ -596,12 +596,11 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
     public ResultData saveCad(BaseDataParamVO param) throws Exception {
     public ResultData saveCad(BaseDataParamVO param) throws Exception {
 
 
         String num = param.getNum();
         String num = param.getNum();
-        Scene scenePlus = sceneService.getByNum(num);
+        Scene scenePlus = sceneService.getByNum(num, param.getSubgroup());
         if(Objects.isNull(scenePlus))
         if(Objects.isNull(scenePlus))
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
 
 
         String editUserPath = String.format(UploadFilePath.USER_VIEW_PATH, num);
         String editUserPath = String.format(UploadFilePath.USER_VIEW_PATH, num);
-        String localDataPath = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num);
 
 
         JSONObject fileInfoJson = JSON.parseObject(param.getData());
         JSONObject fileInfoJson = JSON.parseObject(param.getData());
         Float angel = null;
         Float angel = null;
@@ -615,7 +614,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
 
 
         //处理户型图数据
         //处理户型图数据
         //上传floorplan_user.json文件
         //上传floorplan_user.json文件
-        fYunFileService.uploadFile(num, floorJsonData.getBytes(StandardCharsets.UTF_8), editUserPath + "floorplan.json");
+        fYunFileService.uploadFile(num, param.getSubgroup(), floorJsonData.getBytes(StandardCharsets.UTF_8), editUserPath + "floorplan.json");
 
 
         //写入数据库
         //写入数据库
         Integer floorPlanUser = null;
         Integer floorPlanUser = null;
@@ -651,7 +650,6 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
         }
         }
         sceneEditInfoExtService.saveOrUpdate(sceneEditInfoExt);
         sceneEditInfoExtService.saveOrUpdate(sceneEditInfoExt);
 
 
-
         return ResultData.ok();
         return ResultData.ok();
 
 
     }
     }
@@ -723,9 +721,9 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
 //    }
 //    }
 
 
     @Override
     @Override
-    public ResultData resetCad(String num) throws IOException {
+    public ResultData resetCad(String num, Integer subgroup) throws IOException {
 
 
-        Scene scenePlus = sceneService.getByNum(num);
+        Scene scenePlus = sceneService.getByNum(num, subgroup);
         if(Objects.isNull(scenePlus))
         if(Objects.isNull(scenePlus))
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
 
 
@@ -871,13 +869,13 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
     @Override
     @Override
     public ResultData renameCad(RenameCadParamVO param) throws IOException {
     public ResultData renameCad(RenameCadParamVO param) throws IOException {
 
 
-        Scene scenePlus = sceneService.getByNum(param.getNum());
+        Scene scenePlus = sceneService.getByNum(param.getNum(), param.getSubgroup());
         if(Objects.isNull(scenePlus)){
         if(Objects.isNull(scenePlus)){
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
         }
         }
 
 
         String key = String.format(UploadFilePath.USER_VIEW_PATH, param.getNum()) + "floorplan.json";
         String key = String.format(UploadFilePath.USER_VIEW_PATH, param.getNum()) + "floorplan.json";
-        String floorplanJson = fYunFileService.getFileContent(key);
+        String floorplanJson = fYunFileService.getFileContent(key, param.getSubgroup());
         if(StrUtil.isEmpty(floorplanJson)){
         if(StrUtil.isEmpty(floorplanJson)){
             return ResultData.ok();
             return ResultData.ok();
         }
         }
@@ -902,7 +900,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
             }
             }
             item.put("name", name);
             item.put("name", name);
         }
         }
-        fYunFileService.uploadFile(param.getNum(), jsonObject.toJSONString().getBytes(), key);
+        fYunFileService.uploadFile(param.getNum(), param.getSubgroup(), jsonObject.toJSONString().getBytes(), key);
         return ResultData.ok();
         return ResultData.ok();
     }
     }
 
 
@@ -2154,7 +2152,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
 //    }
 //    }
 
 
     @Override
     @Override
-    public ResultData listLinkPan(String num) throws Exception {
+    public ResultData listLinkPan(String num, Integer subgroup) throws Exception {
 
 
 //        this.syncLinPanFromFileToRedis(num);
 //        this.syncLinPanFromFileToRedis(num);
 
 
@@ -2681,9 +2679,9 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<SceneEditInfoMapper, S
     }
     }
 
 
     @Override
     @Override
-    public List<JSONObject> getMosaicList(String num) throws Exception {
+    public List<JSONObject> getMosaicList(String num, Integer subgroup) throws Exception {
 
 
-        String key = String.format(RedisKey.SCENE_MOSAIC_DATA, num);
+        String key = String.format(RedisKey.SCENE_MOSAIC_DATA, RedisKey.getNumStr(num, subgroup));
         Map<String, String> map = redisClient.hmget(key);
         Map<String, String> map = redisClient.hmget(key);
         if(CollUtil.isEmpty(map)){
         if(CollUtil.isEmpty(map)){
             ResultData.ok(new String[0]);
             ResultData.ok(new String[0]);

+ 4 - 4
src/main/java/com/fdkankan/scene/service/impl/SceneFileMappingServiceImpl.java

@@ -19,12 +19,12 @@ import org.springframework.stereotype.Service;
 public class SceneFileMappingServiceImpl extends ServiceImpl<SceneFileMappingMapper, SceneFileMapping> implements SceneFileMappingService {
 public class SceneFileMappingServiceImpl extends ServiceImpl<SceneFileMappingMapper, SceneFileMapping> implements SceneFileMappingService {
 
 
     @Override
     @Override
-    public void delByNumAndKey(String num, String key) {
-        this.remove(new LambdaQueryWrapper<SceneFileMapping>().eq(SceneFileMapping::getNum, num).eq(SceneFileMapping::getKey, key));
+    public void delByNumAndKey(String num, Integer subgroup, String key) {
+        this.remove(new LambdaQueryWrapper<SceneFileMapping>().eq(SceneFileMapping::getNum, num).eq(SceneFileMapping::getKey, key).eq(SceneFileMapping::getSubgroup, subgroup));
     }
     }
 
 
     @Override
     @Override
-    public SceneFileMapping getByKey(String key) {
-        return this.getOne(new LambdaQueryWrapper<SceneFileMapping>().eq(SceneFileMapping::getKey, key));
+    public SceneFileMapping getByKey(String key, Integer subgroup) {
+        return this.getOne(new LambdaQueryWrapper<SceneFileMapping>().eq(SceneFileMapping::getKey, key).eq(SceneFileMapping::getSubgroup, subgroup));
     }
     }
 }
 }

+ 23 - 23
src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java

@@ -135,7 +135,7 @@ public class SceneProServiceImpl implements ISceneProService {
         sceneEditInfoService.saveTagsToSceneEditInfo(param.getNum(), sceneEditInfo);
         sceneEditInfoService.saveTagsToSceneEditInfo(param.getNum(), sceneEditInfo);
         sceneEditInfoService.updateById(sceneEditInfo);
         sceneEditInfoService.updateById(sceneEditInfo);
 
 
-        this.publicHotData(param.getNum());
+        this.publicHotData(param.getNum(), param.getSubgroup());
 
 
         return ResultData.ok();
         return ResultData.ok();
     }
     }
@@ -167,17 +167,17 @@ public class SceneProServiceImpl implements ISceneProService {
     @Override
     @Override
     public ResultData deleteTag(DeleteHotParamVO param) throws Exception {
     public ResultData deleteTag(DeleteHotParamVO param) throws Exception {
 
 
-        Scene scenePlus = scenePlusService.getByNum(param.getNum());
+        Scene scenePlus = scenePlusService.getByNum(param.getNum(), param.getSubgroup());
         if (scenePlus == null)
         if (scenePlus == null)
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
 
 
         List<String> deleteSidList = param.getSidList();
         List<String> deleteSidList = param.getSidList();
 
 
         //处理删除状态数据
         //处理删除状态数据
-        this.deleteHotData(param.getNum(), deleteSidList);
+        this.deleteHotData(param.getNum(), param.getSubgroup(), deleteSidList);
 
 
         //删除导览中的热点数据
         //删除导览中的热点数据
-        this.deleteHotDataFromTourJson(param.getNum(), param.getSidList());
+        this.deleteHotDataFromTourJson(param.getNum(), param.getSubgroup(), param.getSidList());
 
 
 //        //写入本地文件,作为备份
 //        //写入本地文件,作为备份
 //        this.writeHotJson(param.getNum());
 //        this.writeHotJson(param.getNum());
@@ -187,14 +187,14 @@ public class SceneProServiceImpl implements ISceneProService {
         sceneEditInfoService.saveTagsToSceneEditInfo(param.getNum(), sceneEditInfo);
         sceneEditInfoService.saveTagsToSceneEditInfo(param.getNum(), sceneEditInfo);
         sceneEditInfoService.updateById(sceneEditInfo);
         sceneEditInfoService.updateById(sceneEditInfo);
 
 
-        this.publicHotData(param.getNum());
+        this.publicHotData(param.getNum(), param.getSubgroup());
 
 
         return ResultData.ok();
         return ResultData.ok();
     }
     }
 
 
-    private void deleteHotDataFromTourJson(String num, List<String> sidList) throws IOException {
+    private void deleteHotDataFromTourJson(String num, Integer subgroup, List<String> sidList) throws IOException {
         String key = String.format(UploadFilePath.USER_VIEW_PATH, num) + "tour.json";
         String key = String.format(UploadFilePath.USER_VIEW_PATH, num) + "tour.json";
-        String tourJson = fYunFileService.getFileContent(key);
+        String tourJson = fYunFileService.getFileContent(key, subgroup);
         if(StrUtil.isEmpty(tourJson)){
         if(StrUtil.isEmpty(tourJson)){
             return;
             return;
         }
         }
@@ -213,13 +213,13 @@ public class SceneProServiceImpl implements ISceneProService {
                 }
                 }
             });
             });
         });
         });
-        fYunFileService.uploadFile(num, jsonArray.toJSONString().getBytes(StandardCharsets.UTF_8), key);
+        fYunFileService.uploadFile(num, subgroup, jsonArray.toJSONString().getBytes(StandardCharsets.UTF_8), key);
     }
     }
 
 
     @Override
     @Override
     public ResultData deleteIcons(DeleteHotIconParamVO param) throws Exception {
     public ResultData deleteIcons(DeleteHotIconParamVO param) throws Exception {
 
 
-        Scene scenePlus = scenePlusService.getByNum(param.getNum());
+        Scene scenePlus = scenePlusService.getByNum(param.getNum(), param.getSubgroup());
         if (scenePlus == null)
         if (scenePlus == null)
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
 
 
@@ -227,7 +227,7 @@ public class SceneProServiceImpl implements ISceneProService {
 
 
 //        this.syncIconsFromFileToRedis(param.getNum());
 //        this.syncIconsFromFileToRedis(param.getNum());
 
 
-        String key = String.format(RedisKey.SCENE_HOT_ICONS, param.getNum());
+        String key = String.format(RedisKey.SCENE_HOT_ICONS, RedisKey.getNumStr(param.getNum(), param.getSubgroup()));
         redisClient.setRemove(key, new HashSet<>(fileNameList));
         redisClient.setRemove(key, new HashSet<>(fileNameList));
 
 
         //写入本地文件,作为备份
         //写入本地文件,作为备份
@@ -237,7 +237,7 @@ public class SceneProServiceImpl implements ISceneProService {
     }
     }
 
 
     @Override
     @Override
-    public ResultData listTags(String num) throws Exception{
+    public ResultData listTags(String num, Integer subgroup) throws Exception{
 
 
         //保证热点数据安全性,当redis宕机导致热点数据丢失时,可以从文件中读取,恢复到redis
         //保证热点数据安全性,当redis宕机导致热点数据丢失时,可以从文件中读取,恢复到redis
 //        this.syncHotFromFileToRedis(num);
 //        this.syncHotFromFileToRedis(num);
@@ -248,7 +248,7 @@ public class SceneProServiceImpl implements ISceneProService {
         JSONObject result = new JSONObject();
         JSONObject result = new JSONObject();
 
 
         //查询缓存是否包含热点数据
         //查询缓存是否包含热点数据
-        String key = String.format(RedisKey.SCENE_HOT_DATA, num);
+        String key = String.format(RedisKey.SCENE_HOT_DATA, RedisKey.getNumStr(num, subgroup));
         Map<String, String> allTagsMap = redisClient.hmget(key);
         Map<String, String> allTagsMap = redisClient.hmget(key);
         List<JSONObject> tags = Lists.newArrayList();
         List<JSONObject> tags = Lists.newArrayList();
         List<TagBean> tagBeanList = new ArrayList<>();
         List<TagBean> tagBeanList = new ArrayList<>();
@@ -273,7 +273,7 @@ public class SceneProServiceImpl implements ISceneProService {
         result.put("tags", tags);
         result.put("tags", tags);
 
 
         //查询缓存是否包含icons
         //查询缓存是否包含icons
-        key = String.format(RedisKey.SCENE_HOT_ICONS, num);
+        key = String.format(RedisKey.SCENE_HOT_ICONS, RedisKey.getNumStr(num, subgroup));
         Set<String> icons = redisClient.sGet(key);
         Set<String> icons = redisClient.sGet(key);
         if(icons == null){
         if(icons == null){
             icons = Sets.newHashSet();
             icons = Sets.newHashSet();
@@ -331,7 +331,7 @@ public class SceneProServiceImpl implements ISceneProService {
         }
         }
 
 
         String hotJsonPath = String.format(UploadFilePath.USER_VIEW_PATH, sceneNum) + "hot.json";
         String hotJsonPath = String.format(UploadFilePath.USER_VIEW_PATH, sceneNum) + "hot.json";
-        fYunFileService.uploadFile(sceneNum, tags.toString().getBytes(StandardCharsets.UTF_8), hotJsonPath);
+        fYunFileService.uploadFile(sceneNum, subgroup, tags.toString().getBytes(StandardCharsets.UTF_8), hotJsonPath);
     }
     }
 //
 //
 //    /**
 //    /**
@@ -486,7 +486,7 @@ public class SceneProServiceImpl implements ISceneProService {
     }
     }
 
 
 
 
-    private void deleteHotData(String num, List<String> deleteSidList) throws Exception {
+    private void deleteHotData(String num, Integer subgroup, List<String> deleteSidList) throws Exception {
 
 
 //        this.syncHotFromFileToRedis(num);
 //        this.syncHotFromFileToRedis(num);
 
 
@@ -495,7 +495,7 @@ public class SceneProServiceImpl implements ISceneProService {
         }
         }
 
 
         //从redis中加载热点数据
         //从redis中加载热点数据
-        String key = String.format(RedisKey.SCENE_HOT_DATA, num);
+        String key = String.format(RedisKey.SCENE_HOT_DATA, RedisKey.getNumStr(num, subgroup));
 
 
         //从redis中移除热点数据
         //从redis中移除热点数据
         redisClient.hdel(key, deleteSidList);
         redisClient.hdel(key, deleteSidList);
@@ -504,7 +504,7 @@ public class SceneProServiceImpl implements ISceneProService {
     @Override
     @Override
     public ResultData saveTagsVisible(SaveTagsVisibleParamVO param) throws Exception {
     public ResultData saveTagsVisible(SaveTagsVisibleParamVO param) throws Exception {
 
 
-        Scene scenePlus = scenePlusService.getByNum(param.getNum());
+        Scene scenePlus = scenePlusService.getByNum(param.getNum(), param.getSubgroup());
         if (scenePlus == null ) {
         if (scenePlus == null ) {
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
         }
         }
@@ -514,7 +514,7 @@ public class SceneProServiceImpl implements ISceneProService {
 //        this.syncHotFromFileToRedis(param.getNum());
 //        this.syncHotFromFileToRedis(param.getNum());
 
 
         //从缓存中获取热点数据,如果为空,抛出异常
         //从缓存中获取热点数据,如果为空,抛出异常
-        String key = String.format(RedisKey.SCENE_HOT_DATA, param.getNum());
+        String key = String.format(RedisKey.SCENE_HOT_DATA, RedisKey.getNumStr(param.getNum(), param.getSubgroup()));
         Map<String, String> map = redisClient.hmget(key);
         Map<String, String> map = redisClient.hmget(key);
         if (CollUtil.isEmpty(map)) {
         if (CollUtil.isEmpty(map)) {
             throw new BusinessException(ErrorCode.FAILURE_CODE_7005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_7005);
@@ -555,7 +555,7 @@ public class SceneProServiceImpl implements ISceneProService {
         //写入本地文件,作为备份,以防redis数据丢失
         //写入本地文件,作为备份,以防redis数据丢失
 //        this.writeHotJson(param.getNum());
 //        this.writeHotJson(param.getNum());
 
 
-        this.publicHotData(param.getNum());
+        this.publicHotData(param.getNum(), param.getSubgroup());
 
 
         return ResultData.ok();
         return ResultData.ok();
     }
     }
@@ -563,14 +563,14 @@ public class SceneProServiceImpl implements ISceneProService {
     @Override
     @Override
     public ResultData saveRoam(BaseDataParamVO param) throws Exception {
     public ResultData saveRoam(BaseDataParamVO param) throws Exception {
 
 
-        Scene scenePlus = scenePlusService.getByNum(param.getNum());
+        Scene scenePlus = scenePlusService.getByNum(param.getNum(), param.getSubgroup());
         if (scenePlus == null ) {
         if (scenePlus == null ) {
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
         }
         }
 
 
         JSONArray inputData = JSONObject.parseArray(param.getData());
         JSONArray inputData = JSONObject.parseArray(param.getData());
 
 
-        String localDataPath = String.format(ConstantFilePath.SCENE_DATA_PATH_V4, param.getNum());
+        String localDataPath = String.format(ConstantFilePath.SCENE_DATA_PATH_V4, RedisKey.getNumStr(param.getNum(), param.getSubgroup()));
         File directory = new File(localDataPath);
         File directory = new File(localDataPath);
         if (!directory.exists()) {
         if (!directory.exists()) {
             directory.mkdirs();
             directory.mkdirs();
@@ -590,7 +590,7 @@ public class SceneProServiceImpl implements ISceneProService {
 
 
 //        String str = FileUtils.readFile(localDataPath + "vision.json");
 //        String str = FileUtils.readFile(localDataPath + "vision.json");
 
 
-        String str = fYunFileService.getFileContent(viewImagesPath + "vision.txt");
+        String str = fYunFileService.getFileContent(viewImagesPath + "vision.txt", param.getSubgroup());
         JSONObject json = JSONObject.parseObject(str);
         JSONObject json = JSONObject.parseObject(str);
         JSONArray panos = json.getJSONArray("sweepLocations");
         JSONArray panos = json.getJSONArray("sweepLocations");
         for (int i = 0; i < panos.size(); ++i) {
         for (int i = 0; i < panos.size(); ++i) {
@@ -611,7 +611,7 @@ public class SceneProServiceImpl implements ISceneProService {
 //        FileUtils.writeFile(localDataPath + "vision.json", json.toString());
 //        FileUtils.writeFile(localDataPath + "vision.json", json.toString());
         FileUtil.writeUtf8String(json.toString(), localDataPath + "vision.json");
         FileUtil.writeUtf8String(json.toString(), localDataPath + "vision.json");
         ConvertUtils.convertTxtToVisionModelData(localDataPath + "vision.json", localDataPath + "vision.modeldata");
         ConvertUtils.convertTxtToVisionModelData(localDataPath + "vision.json", localDataPath + "vision.modeldata");
-        fYunFileService.uploadFile(param.getNum(), localDataPath + "vision.modeldata", viewImagesPath + "vision.modeldata");
+        fYunFileService.uploadFile(param.getNum(), param.getSubgroup(), localDataPath + "vision.modeldata", viewImagesPath + "vision.modeldata");
         FileUtil.del(localDataPath + "vision.json");
         FileUtil.del(localDataPath + "vision.json");
         FileUtil.del(localDataPath + "vision.modeldata");
         FileUtil.del(localDataPath + "vision.modeldata");
 
 

+ 37 - 45
src/main/java/com/fdkankan/scene/service/impl/SceneUploadServiceImpl.java

@@ -9,11 +9,15 @@ import com.fdkankan.common.constant.UploadFilePath;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.BASE64DecodedMultipartFile;
 import com.fdkankan.common.util.BASE64DecodedMultipartFile;
 import com.fdkankan.common.util.FdfsUtil;
 import com.fdkankan.common.util.FdfsUtil;
+import com.fdkankan.redis.constant.RedisKey;
+import com.fdkankan.scene.bean.ResultData;
 import com.fdkankan.scene.entity.Scene;
 import com.fdkankan.scene.entity.Scene;
 import com.fdkankan.scene.entity.SceneFileMapping;
 import com.fdkankan.scene.entity.SceneFileMapping;
+import com.fdkankan.scene.service.FYunFileService;
 import com.fdkankan.scene.service.ISceneUploadService;
 import com.fdkankan.scene.service.ISceneUploadService;
 import com.fdkankan.scene.service.SceneFileMappingService;
 import com.fdkankan.scene.service.SceneFileMappingService;
 import com.fdkankan.scene.service.SceneService;
 import com.fdkankan.scene.service.SceneService;
+import com.fdkankan.scene.vo.DeleteFileParamVO;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,12 +44,13 @@ public class SceneUploadServiceImpl implements ISceneUploadService {
     private SceneService sceneService;
     private SceneService sceneService;
     @Autowired
     @Autowired
     private SceneFileMappingService sceneFileMappingService;
     private SceneFileMappingService sceneFileMappingService;
-    @Resource
-    private FdfsUtil fdfsUtil;
+//    @Resource
+//    private FdfsUtil fdfsUtil;
+    @Resource FYunFileService fYunFileService;
 
 
     @Override
     @Override
     public String uploads(String imgData,String fileName,String blzType,MultipartFile[] files,
     public String uploads(String imgData,String fileName,String blzType,MultipartFile[] files,
-        String sceneCode,Integer type, String uploadPath) throws Exception{
+        String sceneCode,Integer type, String uploadPath, Integer subgroup) throws Exception{
 
 
         List<MultipartFile> multipartFiles = new ArrayList<>();
         List<MultipartFile> multipartFiles = new ArrayList<>();
         if(StringUtils.isNotBlank(imgData)){
         if(StringUtils.isNotBlank(imgData)){
@@ -55,48 +60,40 @@ public class SceneUploadServiceImpl implements ISceneUploadService {
         if(files !=null && files.length >0){
         if(files !=null && files.length >0){
             multipartFiles.addAll(Arrays.asList(files));
             multipartFiles.addAll(Arrays.asList(files));
         }
         }
-        return this.uploadFiles(fileName,blzType,multipartFiles,sceneCode,type,uploadPath);
+        return this.uploadFiles(fileName,blzType,multipartFiles,sceneCode,type,uploadPath, subgroup);
     }
     }
 
 
-//    @Override
-//    public ResultData delete(DeleteFileParamVO param) throws Exception {
-//        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(param.getNum());
-//        if(Objects.isNull(scenePlus)){
-//            throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
-//        }
-//        ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
-//
-//        String userEditPath = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum());
-//        List<String> filePaths = new ArrayList<>();
-//        Set<String> hasDelete = new HashSet<>();
-//        for (String fileName : param.getFileNames()) {
-//            if(hasDelete.contains(fileName)){
-//                continue;
-//            }
-//            hasDelete.add(fileName);
-//            String key = userEditPath + fileName;
-//            filePaths.add(key);
-//            fYunFileService.deleteFile(scenePlusExt.getYunFileBucket(), key);
-//        }
-//
-//        this.update(new LambdaUpdateWrapper<SceneUpload>()
-//            .set(SceneUpload::getRecStatus, RecStatus.DISABLE.code())
-//            .eq(SceneUpload::getNum, param.getNum())
-//            .eq(SceneUpload::getBizType, param.getBizType())
-//            .in(SceneUpload::getFilePath, filePaths));
-//
-//        return ResultData.ok();
-//    }
+    @Override
+    public ResultData delete(DeleteFileParamVO param) throws Exception {
+        Scene scenePlus = sceneService.getByNum(param.getNum(), param.getSubgroup());
+        if(Objects.isNull(scenePlus)){
+            throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
+        }
+        String userEditPath = String.format(UploadFilePath.USER_VIEW_PATH, param.getNum());
+        List<String> filePaths = new ArrayList<>();
+        Set<String> hasDelete = new HashSet<>();
+        for (String fileName : param.getFileNames()) {
+            if(hasDelete.contains(fileName)){
+                continue;
+            }
+            hasDelete.add(fileName);
+            String key = userEditPath + fileName;
+            filePaths.add(key);
+            fYunFileService.deleteFile(param.getNum(), param.getSubgroup(), key);
+        }
+
+        return ResultData.ok();
+    }
 
 
     public String uploadFiles(String sendFileName,String bizType,List<MultipartFile> files,
     public String uploadFiles(String sendFileName,String bizType,List<MultipartFile> files,
-        String num, Integer type, String uploadPath) throws Exception{
+        String num, Integer type, String uploadPath, Integer subgroup) throws Exception{
         if (StrUtil.isEmpty(num))
         if (StrUtil.isEmpty(num))
             throw new BusinessException(ErrorCode.PARAM_REQUIRED, "num");
             throw new BusinessException(ErrorCode.PARAM_REQUIRED, "num");
         if(CollUtil.isEmpty(files))
         if(CollUtil.isEmpty(files))
             throw new BusinessException(ErrorCode.PARAM_REQUIRED, "files");
             throw new BusinessException(ErrorCode.PARAM_REQUIRED, "files");
         if(StrUtil.isEmpty(bizType))
         if(StrUtil.isEmpty(bizType))
             throw new BusinessException(ErrorCode.PARAM_REQUIRED, "bizType");
             throw new BusinessException(ErrorCode.PARAM_REQUIRED, "bizType");
-        Scene scene = sceneService.getByNum(num);
+        Scene scene = sceneService.getByNum(num, subgroup);
         if(Objects.isNull(scene))
         if(Objects.isNull(scene))
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
             throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
 
 
@@ -106,8 +103,8 @@ public class SceneUploadServiceImpl implements ISceneUploadService {
             // 获取文件后缀
             // 获取文件后缀
             String prefix = fileName.substring(fileName.lastIndexOf("."));
             String prefix = fileName.substring(fileName.lastIndexOf("."));
 //            String path = String.format(ConstantFilePath.SCENE_TMP_PATH_V4, num).concat(UUID.randomUUID().toString()).concat(prefix);
 //            String path = String.format(ConstantFilePath.SCENE_TMP_PATH_V4, num).concat(UUID.randomUUID().toString()).concat(prefix);
-//            File newFile = File.createTempFile(UUID.randomUUID().toString() ,prefix);
-            File tempFile = FileUtil.createTempFile(prefix, true);
+            File tempFile = File.createTempFile(UUID.randomUUID().toString() ,prefix);
+//            File tempFile = FileUtil.createTempFile(prefix, true);
             String path = tempFile.getAbsolutePath();
             String path = tempFile.getAbsolutePath();
 //            FileUtil.mkParentDirs(path);
 //            FileUtil.mkParentDirs(path);
             file.transferTo(tempFile);
             file.transferTo(tempFile);
@@ -120,20 +117,15 @@ public class SceneUploadServiceImpl implements ISceneUploadService {
             String newExtName = oldExtName.toLowerCase();
             String newExtName = oldExtName.toLowerCase();
             realFileName = realFileName.substring(0, realFileName.lastIndexOf(oldExtName)) + newExtName;
             realFileName = realFileName.substring(0, realFileName.lastIndexOf(oldExtName)) + newExtName;
 
 
-            String key = StrUtil.isNotBlank(uploadPath) ? uploadPath : (String.format(UploadFilePath.USER_VIEW_PATH ,num) + realFileName);
-            Map<String, String> mapping = fdfsUtil.uploadFile(path);
+            String key = StrUtil.isNotBlank(uploadPath) ? uploadPath : (String.format(UploadFilePath.USER_VIEW_PATH , RedisKey.getNumStr(num, subgroup)) + realFileName);
+
+            fYunFileService.uploadFile(num, subgroup, path, key);
 
 
             urlList.add(realFileName);
             urlList.add(realFileName);
 
 
             FileUtil.del(path);
             FileUtil.del(path);
 
 
             //添加记录
             //添加记录
-            SceneFileMapping sceneFileMapping = new SceneFileMapping();
-            sceneFileMapping.setNum(num);
-            sceneFileMapping.setFileid(mapping.get("file_id"));
-            sceneFileMapping.setUrl(mapping.get("http_url"));
-            sceneFileMapping.setKey(key);
-            sceneFileMappingService.save(sceneFileMapping);
         }
         }
         StringBuilder returnString = new StringBuilder();
         StringBuilder returnString = new StringBuilder();
         for (String res : urlList) {
         for (String res : urlList) {

+ 1 - 6
src/main/java/com/fdkankan/scene/vo/BaseDataParamVO.java

@@ -12,14 +12,9 @@ import lombok.Data;
  * @since 2022/2/10
  * @since 2022/2/10
  **/
  **/
 @Data
 @Data
-public class BaseDataParamVO {
-
-    @NotBlank(message = "场景码不能为空")
-    private String num;
+public class BaseDataParamVO extends BaseSceneParamVO{
 
 
     @NotBlank(message = "数据不能为空")
     @NotBlank(message = "数据不能为空")
     private String data;
     private String data;
 
 
-    private Integer subgroup = 0;
-
 }
 }

+ 40 - 0
src/main/java/com/fdkankan/scene/vo/DeleteFileParamVO.java

@@ -0,0 +1,40 @@
+package com.fdkankan.scene.vo;
+
+import java.util.List;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * <p>
+ * TODO
+ * </p>
+ *
+ * @author dengsixing
+ * @since 2022/2/23
+ **/
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class DeleteFileParamVO extends  BaseSceneParamVO{
+
+    /**
+     * 文件名
+     */
+    @NotEmpty(message = "文件名不能为空")
+    private List<String> fileNames;
+
+    /**
+     * 业务类型
+     */
+    @NotBlank(message = "业务类型不能空")
+    private String bizType;
+
+
+
+
+}

+ 1 - 4
src/main/java/com/fdkankan/scene/vo/DeleteHotIconParamVO.java

@@ -14,10 +14,7 @@ import lombok.Data;
  * @since 2022/2/8
  * @since 2022/2/8
  **/
  **/
 @Data
 @Data
-public class DeleteHotIconParamVO {
-
-    @NotBlank(message = "场景码不能为空")
-    private String num;
+public class DeleteHotIconParamVO extends BaseSceneParamVO{
 
 
     @NotNull(message = "fileNameList不能为空")
     @NotNull(message = "fileNameList不能为空")
     private List<String> fileNameList;
     private List<String> fileNameList;

+ 1 - 4
src/main/java/com/fdkankan/scene/vo/DeleteHotParamVO.java

@@ -14,10 +14,7 @@ import lombok.Data;
  * @since 2022/2/8
  * @since 2022/2/8
  **/
  **/
 @Data
 @Data
-public class DeleteHotParamVO {
-
-    @NotBlank(message = "场景码不能为空")
-    private String num;
+public class DeleteHotParamVO extends  BaseSceneParamVO{
 
 
     @NotNull(message = "sid不能为空")
     @NotNull(message = "sid不能为空")
     private List<String> sidList;
     private List<String> sidList;

+ 1 - 4
src/main/java/com/fdkankan/scene/vo/RenameCadParamVO.java

@@ -15,10 +15,7 @@ import lombok.Data;
  * @since 2022/4/27
  * @since 2022/4/27
  **/
  **/
 @Data
 @Data
-public class RenameCadParamVO {
-
-    @NotBlank(message = "场景码不能为空")
-    private String num;
+public class RenameCadParamVO extends BaseSceneParamVO{
 
 
     @Valid
     @Valid
     @NotEmpty(message = "floors不能为空")
     @NotEmpty(message = "floors不能为空")

+ 1 - 4
src/main/java/com/fdkankan/scene/vo/SaveTagsVisibleParamVO.java

@@ -12,10 +12,7 @@ import lombok.Data;
  * @since 2022/2/10
  * @since 2022/2/10
  **/
  **/
 @Data
 @Data
-public class SaveTagsVisibleParamVO {
-
-    @NotBlank(message = "场景码不能为空")
-    private String num;
+public class SaveTagsVisibleParamVO extends  BaseSceneParamVO{
 
 
     @NotBlank(message = "热点可视数据不能为空")
     @NotBlank(message = "热点可视数据不能为空")
     private String data;
     private String data;