Pārlūkot izejas kodu

修复部门下拉树接口报错

fuyuchuan 1 nedēļu atpakaļ
vecāks
revīzija
41db5f4ce8

+ 4 - 4
flow-app/src/main/resources/mapper/system/DeptDao.xml

@@ -14,7 +14,7 @@
         <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
     </resultMap>
 
-    <sql id="getList_mysql">
+<!--    <sql id="getList_mysql">
         with recursive cte as (
         select * from sys_dept
         <where>
@@ -24,7 +24,7 @@
         select sm.* from sys_dept sm, cte where sm.id = cte.pid
         )
         select * from cte order by sort asc
-    </sql>
+    </sql>-->
 
     <sql id="getList_oracle">
         SELECT DISTINCT * FROM SYS_DEPT
@@ -42,9 +42,9 @@
         </if>
     </sql>
 
-    <select id="getList" resultMap="BaseResultMap">
+<!--    <select id="getList" resultMap="BaseResultMap">
         <include refid="getList_mysql"></include>
-    </select>
+    </select>-->
 
 
 </mapper>

+ 6 - 1
flow-app/src/test/java/com/flow/FlowApplicationTest.java

@@ -17,6 +17,8 @@ import java.io.FileOutputStream;
 import java.util.List;
 import java.util.Map;
 
+import static org.junit.Assert.assertEquals;
+
 @SpringBootTest(classes = FlowApplication.class)
 @RunWith(SpringRunner.class)
 public class FlowApplicationTest {
@@ -26,7 +28,10 @@ public class FlowApplicationTest {
     private HistoryService historyService;
     @Autowired
     private ReportDatasourceService reportDatasourceService;
-
+    @Test
+    public void testExample() {
+        assertEquals(2, 1 + 1);
+    }
 /*    @Test
     public void test() {
         ExecSql execSql = new ExecSql();

+ 1 - 1
flow-system/flow-system-api/src/main/java/com/flow/service/DeptService.java

@@ -9,7 +9,7 @@ import java.util.List;
 import java.util.Set;
 
 public interface DeptService extends BaseService<Dept> {
-    List<Dept> getList(DeptQuery deptQuery);
+    // List<Dept> getList(DeptQuery deptQuery);
 
     List<Dept> search(DeptQuery deptQuery);
 

+ 1 - 1
flow-system/flow-system-biz/src/main/java/com/flow/dao/DeptDao.java

@@ -12,7 +12,7 @@ import java.util.List;
 
 public interface DeptDao extends BaseDao<Dept> {
 
-    List<Dept> getList(@Param("deptQuery") DeptQuery deptQuery);
+    // List<Dept> getList(@Param("deptQuery") DeptQuery deptQuery);
 
     @Select("select * from sys_user where username  = (select leader from sys_dept where id =#{id})")
     User getLeader(@Param("id") String id);

+ 2 - 2
flow-system/flow-system-biz/src/main/java/com/flow/service/impl/DeptServiceImpl.java

@@ -30,10 +30,10 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptDao, Dept> implements D
     @Autowired
     private DeptMapper deptMapper;
 
-    @Override
+/*    @Override
     public List<Dept> getList(DeptQuery deptQuery) {
         return deptDao.getList(deptQuery);
-    }
+    }*/
 
     @Override
     public List<Dept> search(DeptQuery deptQuery) {

+ 4 - 4
flow-system/flow-system-controller/src/main/java/com/flow/controller/DeptController.java

@@ -27,10 +27,10 @@ public class DeptController {
         List<Dept> options = deptService.getOptions(deptIds);
         return Result.success(options);
     }
-    @GetMapping
-    public Result<List<Dept>> getList(DeptQuery deptQuery) {
-        return Result.success(deptService.getList(deptQuery));
-    }
+    // @GetMapping
+    // public Result<List<Dept>> getList(DeptQuery deptQuery) {
+    //     return Result.success(deptService.getList(deptQuery));
+    // }
 
     @GetMapping("/search")
     public Result<List<Dept>> search(DeptQuery deptQuery) {