|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
import com.xjrsoft.common.annotation.XjrLog;
|
|
|
import com.xjrsoft.common.constant.GlobalConstant;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
@@ -24,8 +25,10 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentBehaviorProject;
|
|
|
+import com.xjrsoft.module.student.entity.BaseStudentUser;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentPostListVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentPostTreeVo;
|
|
|
+import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
import java.util.ArrayList;
|
|
@@ -81,11 +84,13 @@ public class BaseStudentPostController {
|
|
|
@SaCheckPermission("basestudentpost:detail")
|
|
|
public RT<PageOutput<BaseStudentPostPageVo>> page(@Valid BaseStudentPostPageDto dto){
|
|
|
|
|
|
- LambdaQueryWrapper<BaseStudentPost> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper
|
|
|
- .orderByDesc(BaseStudentPost::getId)
|
|
|
- .select(BaseStudentPost.class,x -> VoToColumnUtil.fieldsToColumns(BaseStudentPostPageVo.class).contains(x.getProperty()));
|
|
|
- IPage<BaseStudentPost> page = baseStudentPostService.page(ConventPage.getPage(dto), queryWrapper);
|
|
|
+ IPage<BaseStudentPostPageVo> page = baseStudentPostService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentPostPageVo.class,
|
|
|
+ MPJWrappers.<BaseStudentPost>lambdaJoin()
|
|
|
+ .orderByDesc(BaseStudentPost::getSortCode)
|
|
|
+ .selectAs(DictionaryDetail::getName, BaseStudentPostPageVo::getLevelCn)
|
|
|
+ .select(BaseStudentPost.class,x -> VoToColumnUtil.fieldsToColumns(BaseStudentPostPageVo.class).contains(x.getProperty()))
|
|
|
+ .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentPost::getLevel)
|
|
|
+ );
|
|
|
PageOutput<BaseStudentPostPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentPostPageVo.class);
|
|
|
return RT.ok(pageOutput);
|
|
|
}
|