xiewj 2 роки тому
батько
коміт
53aa54426a

+ 30 - 30
720yun_fd_manage/gis_application/src/main/resources/application.yml

@@ -1,38 +1,38 @@
 mapper:
-    identity: MYSQL
-    mappers: tk.mybatis.mapper.common.Mapper
+  identity: MYSQL
+  mappers: tk.mybatis.mapper.common.Mapper
 mybatis:
-    configuration:
-        mapUnderscoreToCamelCase: true
-    mapper-locations: classpath*:/mapper/*.xml
+  configuration:
+    mapUnderscoreToCamelCase: true
+  mapper-locations: classpath*:/mapper/*.xml
 pagehelper:
-    helper-dialect: mysql
-    params: count=countSql
-    reasonable: false
-    support-methods-arguments: true
+  helper-dialect: mysql
+  params: count=countSql
+  reasonable: false
+  support-methods-arguments: true
 project:
-    name: 720yun_fd_manage
+  name: 720yun_fd_manage
 redis:
-    token:
-        prefix: token#
+  token:
+    prefix: token#
 server:
-    port: 8001
-    servlet:
-        context-path: /qjkankan
-    tomcat:
-        max-http-form-post-size: 100MB
+  port: 8002
+  servlet:
+    context-path: /qjkankan
+  tomcat:
+    max-http-form-post-size: 100MB
 spring:
-    profiles:
-        active: locSit
-    resources:
-        static-locations: classpath:templates/,classpath:static/,classpath:web/
-    servlet:
-        multipart:
-            enabled: true
-            max-file-size: 256MB
-            max-request-size: 256MB
+  profiles:
+    active: locSit
+  resources:
+    static-locations: classpath:templates/,classpath:static/,classpath:web/
+  servlet:
+    multipart:
+      enabled: true
+      max-file-size: 256MB
+      max-request-size: 256MB
 swagger:
-    description: ${swagger.title}
-    package: com.gis.web.controller
-    title: È«¾°¿´¿´-${spring.profiles.active}
-    version: 1.3.0
+  description: ${swagger.title}
+  package: com.gis.web.controller
+  title: È«¾°¿´¿´-${spring.profiles.active}
+  version: 1.3.0

+ 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,String type);
+    List<DirEntity> findByIdAndName(Long parentId,String name,String type);
     List<DirEntity> findByParentId(Long parentId);
 
 }

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

@@ -90,8 +90,8 @@ public class DirServiceImpl extends IBaseServiceImpl<DirEntity, Long> implements
                 DirEntity byId = this.findById(Long.valueOf(s));
                 log.info("文件夹名称查询{}",byId);
                 if (ObjectUtil.isNotNull(byId)){
-                    DirEntity byIdAndName = findByIdAndName(param.getParentId(), byId.getName(),byId.getType());
-                    if (ObjectUtil.isNotNull(byIdAndName)){
+                    List<DirEntity> byIdAndName = findByIdAndName(param.getParentId(), byId.getName(),byId.getType());
+                    if (ObjectUtil.isNotNull(byIdAndName)&&byIdAndName.size()>0){
                         log.info("{}",byIdAndName);
                         throw new BaseRuntimeException(ErrorEnum.FAILURE_CODE_3104.code(), ErrorEnum.FAILURE_CODE_3104.message());
                     }
@@ -152,13 +152,13 @@ public class DirServiceImpl extends IBaseServiceImpl<DirEntity, Long> implements
     }
 
     @Override
-    public DirEntity findByIdAndName(Long parentId, String name,String type) {
+    public List<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);
+        return getBaseMapper().select(parm);
     }
 
     @Override