xiewj 2 jaren geleden
bovenliggende
commit
8eb9aca72f

+ 1 - 1
720yun_fd_consumer/gis_consumer/src/main/resources/application-locSitAws.properties

@@ -58,7 +58,7 @@ oss.secrecy=JLOVl0k8Ke0aaM8nLMMiUAZ3EiiqI4
 # oss-base
 oss.type=aws
 oss.bucket=test-4dkankan
-oss.file.path=${project.name}/
+oss.file.path=720yun_fd_manage/
 oss.domain=https://testeurs3.4dkankan.com/
 
 

+ 1 - 1
720yun_fd_consumer/gis_consumer/src/main/resources/application-proAws.properties

@@ -58,7 +58,7 @@ oss.secrecy=JLOVl0k8Ke0aaM8nLMMiUAZ3EiiqI4
 # oss-base
 oss.type=aws
 oss.bucket=4dkankan
-oss.file.path=${project.name}/
+oss.file.path=720yun_fd_manage/
 oss.domain=https://urs3.4dkankan.com/
 
 

+ 1 - 1
720yun_fd_manage/gis_service/src/main/java/com/gis/service/DirService.java

@@ -19,7 +19,7 @@ public interface DirService extends IBaseService<DirEntity, Long>{
 
     Result remove(Long id);
 
-    DirEntity findByIdAndName(Long parentId,String name);
+    DirEntity findByIdAndName(Long parentId,String name,String type);
     List<DirEntity> findByParentId(Long parentId);
 
 }

+ 9 - 6
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/DirServiceImpl.java

@@ -89,11 +89,12 @@ public class DirServiceImpl extends IBaseServiceImpl<DirEntity, Long> implements
             for (String s : split) {
                 DirEntity byId = this.findById(Long.valueOf(s));
                 log.info("文件夹名称查询{}",byId);
-                DirEntity byIdAndName = findByIdAndName(param.getParentId(), byId.getName());
-                if (ObjectUtil.isNotNull(byIdAndName)){
-                    log.info("{}",byIdAndName);
-                    throw new BaseRuntimeException(ErrorEnum.FAILURE_CODE_3104.code(), ErrorEnum.FAILURE_CODE_3104.message());
-
+                if (ObjectUtil.isNotNull(byId)){
+                    DirEntity byIdAndName = findByIdAndName(param.getParentId(), byId.getName(),byId.getType());
+                    if (ObjectUtil.isNotNull(byIdAndName)){
+                        log.info("{}",byIdAndName);
+                        throw new BaseRuntimeException(ErrorEnum.FAILURE_CODE_3104.code(), ErrorEnum.FAILURE_CODE_3104.message());
+                    }
                 }
             }
         }
@@ -151,10 +152,12 @@ public class DirServiceImpl extends IBaseServiceImpl<DirEntity, Long> implements
     }
 
     @Override
-    public DirEntity findByIdAndName(Long parentId, String name) {
+    public DirEntity findByIdAndName(Long parentId, String name,String type) {
         DirEntity parm=new DirEntity();
         parm.setName(name);
         parm.setParentId(parentId);
+        parm.setType(type);
+        parm.setIsDelete(0);
         return getBaseMapper().selectOne(parm);
     }
 

+ 1 - 1
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java

@@ -288,7 +288,7 @@ public class WorkServiceImpl extends IBaseStrServiceImpl<WorkEntity, String> imp
     @Override
     public boolean getUserWorkCountBySceneCodes(List<String> sceneCodes) {
         for (String sceneCode : sceneCodes) {
-            String format = StrUtil.format("SELECT count(1) FROM tb_work WHERE is_delete=0 and status={} and ( id = {} or find_in_set('{}' , scene_codes ))",
+            String format = StrUtil.format("SELECT count(1) FROM tb_work WHERE is_delete=0 and status={} and ( user_id = '{}' or find_in_set('{}' , scene_codes ))",
                     1, this.getUserNameForToken(),sceneCode);
             Integer count = entityMapper.getCountStr(format);
             if (count > 0){