Forráskód Böngészése

年和学期树查询语句优化

大数据与最优化研究所 5 hónapja
szülő
commit
c12cf703df

+ 5 - 1
src/main/java/com/xjrsoft/module/student/controller/PbSemesterConfigController.java

@@ -13,6 +13,7 @@ import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.utils.TreeUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseSemester;
 import com.xjrsoft.module.base.service.IBaseSemesterService;
 import com.xjrsoft.module.student.dto.AddPbSemesterConfigDto;
@@ -56,7 +57,10 @@ public class PbSemesterConfigController {
     @ApiOperation(value = "年和学期树")
     @SaCheckPermission("pbsemesterconfig:detail")
     public RT<List<SemesterYeatTreeVo>> tree() {
-        List<BaseSemester> baseSemesterList = baseSemesterService.list();
+        LambdaQueryWrapper<BaseSemester> baseSemesterLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        baseSemesterLambdaQueryWrapper
+                .eq(BaseSemester::getDeleteMark, 0);
+        List<BaseSemester> baseSemesterList = baseSemesterService.list(baseSemesterLambdaQueryWrapper);
 
         baseSemesterList.forEach(element -> {
             // 处理元素