Explorar el Código

v4.9.0 修改getauth接口中计算目录过期被删除返回资源失效状态逻辑

dsx hace 2 años
padre
commit
0c3b183f94

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

@@ -121,9 +121,9 @@ public class SceneEditServiceImpl implements ISceneEditService {
         sceneAuthVO.setInclude(new ArrayList<>());
         sceneAuthVO.setCompany(null);
 
-        //判断本地资源是否已本删除,如果已删除,前端根据字段值为true提示用户不能使用某些功能,需要重算
-        Date algorithmTime = scenePlusExt.getAlgorithmTime() == null ? scenePlus.getCreateTime() : scenePlusExt.getAlgorithmTime();
-        if (!ObjectUtils.isEmpty(expiredMonth) && com.fdkankan.common.util.DateUtil.delay(algorithmTime, expiredMonth, Calendar.MONTH).before(new Date())) {
+        //判断data.json是否存在,如果存在,则证明计算在未被定时任务删除前上传过oss
+        boolean exist = fYunFileService.fileExist(String.format(UploadFilePath.scene_result_data_path, num).concat("data.json"));
+        if(!exist){
             sceneAuthVO.setSourceExpired(true);
         }