|
|
@@ -2,13 +2,11 @@ package com.xjrsoft.module.base.controller;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.xjrsoft.common.annotation.XjrLog;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
-import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.base.dto.AddBaseClassTeacherChangeDto;
|
|
|
import com.xjrsoft.module.base.dto.BaseClassTeacherChangePageDto;
|
|
|
import com.xjrsoft.module.base.dto.UpdateBaseClassTeacherChangeDto;
|
|
|
@@ -52,11 +50,7 @@ public class BaseClassTeacherChangeController {
|
|
|
@XjrLog(value = "班主任异动记录表列表(分页)")
|
|
|
public RT<PageOutput<BaseClassTeacherChangePageVo>> page(@Valid BaseClassTeacherChangePageDto dto){
|
|
|
|
|
|
- LambdaQueryWrapper<BaseClassTeacherChange> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper
|
|
|
- .orderByDesc(BaseClassTeacherChange::getId)
|
|
|
- .select(BaseClassTeacherChange.class,x -> VoToColumnUtil.fieldsToColumns(BaseClassTeacherChangePageVo.class).contains(x.getProperty()));
|
|
|
- IPage<BaseClassTeacherChange> page = baseClassTeacherChangeService.page(ConventPage.getPage(dto), queryWrapper);
|
|
|
+ Page<BaseClassTeacherChangePageVo> page = baseClassTeacherChangeService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
PageOutput<BaseClassTeacherChangePageVo> pageOutput = ConventPage.getPageOutput(page, BaseClassTeacherChangePageVo.class);
|
|
|
return RT.ok(pageOutput);
|
|
|
}
|
|
|
@@ -101,7 +95,6 @@ public class BaseClassTeacherChangeController {
|
|
|
@XjrLog(value = "删除班主任异动记录表")
|
|
|
public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
|
|
|
return RT.ok(baseClassTeacherChangeService.removeBatchByIds(ids));
|
|
|
-
|
|
|
}
|
|
|
|
|
|
}
|