diff --git a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java index f53a0c6..dbe638c 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java @@ -47,14 +47,10 @@ public interface ProjectManagementMapper { */ @Select({""}) @@ -111,9 +107,21 @@ public interface ProjectManagementMapper { * @param projectId */ @Update("") void deleteProjectManagement(Integer projectId); +// 202.10.29 标准版 +// /** +// * 批量删除 +// * +// * @param projectId +// */ +// @Update("") +// void deleteProjectManagement(Integer projectId); /** @@ -308,4 +316,13 @@ public interface ProjectManagementMapper { Integer queryRoleId(Integer userId); + @Select("SELECT id FROM tms_experimental_teaching WHERE project_id =#{projectId}") + List queryproject(Integer projectId); + + @Update("") + void daleteManegement(Integer id); } diff --git a/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java b/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java index 2a69546..250420f 100644 --- a/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java +++ b/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java @@ -180,6 +180,12 @@ public class ProjectManagementService { int size = projectId.size(); for (int i = 0;i result = mapper.queryproject(id); + if (result.size()==0){ + mapper.daleteManegement(id); + } + mapper.deleteProjectManagement(id); } resp.put("retcode", 200);