|
@@ -2,6 +2,8 @@ package com.xjrsoft.module.student.controller;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
@@ -51,11 +53,14 @@ public class BaseStudentScholarshipCategoryController {
|
|
|
@SaCheckPermission("basestudentscholarshipcategory:detail")
|
|
|
public RT<PageOutput<BaseStudentScholarshipCategoryPageVo>> page(@Valid BaseStudentScholarshipCategoryPageDto dto){
|
|
|
IPage<BaseStudentScholarshipCategoryPageVo> page = baseStudentScholarshipCategoryService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentScholarshipCategoryPageVo.class,
|
|
|
- MPJWrappers.<BaseStudentScholarshipCategory>lambdaJoin()
|
|
|
- .select(BaseStudentScholarshipCategory::getId)
|
|
|
- .selectAs(DictionaryDetail::getName, BaseStudentScholarshipCategoryPageVo::getScholarshipSourceCn)
|
|
|
- .select(BaseStudentScholarshipCategory.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentScholarshipCategoryPageVo.class).contains(x.getProperty()))
|
|
|
- .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentScholarshipCategory::getScholarshipSource)
|
|
|
+ MPJWrappers.<BaseStudentScholarshipCategory>lambdaJoin()
|
|
|
+ .like(StrUtil.isNotEmpty(dto.getScholarshipName()), BaseStudentScholarshipCategory::getName, dto.getScholarshipName())
|
|
|
+ .like(StrUtil.isNotEmpty(dto.getScholarshipSource()), DictionaryDetail::getName, dto.getScholarshipSource())
|
|
|
+ .eq(ObjectUtil.isNotNull(dto.getScholarshipLevel()), BaseStudentScholarshipCategory::getScholarshipLevel, dto.getScholarshipLevel())
|
|
|
+ .select(BaseStudentScholarshipCategory::getId)
|
|
|
+ .selectAs(DictionaryDetail::getName, BaseStudentScholarshipCategoryPageVo::getScholarshipSourceCn)
|
|
|
+ .select(BaseStudentScholarshipCategory.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentScholarshipCategoryPageVo.class).contains(x.getProperty()))
|
|
|
+ .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentScholarshipCategory::getScholarshipSource)
|
|
|
);
|
|
|
|
|
|
PageOutput<BaseStudentScholarshipCategoryPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentScholarshipCategoryPageVo.class);
|