|
@@ -6,6 +6,8 @@ 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.query.MPJQueryWrapper;
|
|
|
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.common.constant.GlobalConstant;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
@@ -26,6 +28,7 @@ import com.xjrsoft.module.student.vo.BaseStudentBehaviorProjectPageVo;
|
|
|
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentBehaviorProjectTreeVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentBehaviorProjectVo;
|
|
|
+import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
@@ -82,12 +85,14 @@ public class BaseStudentBehaviorProjectController {
|
|
|
@SaCheckPermission("basestudentbehaviorproject:detail")
|
|
|
public RT<PageOutput<BaseStudentBehaviorProjectPageVo>> page(@Valid BaseStudentBehaviorProjectPageDto dto) {
|
|
|
|
|
|
- LambdaQueryWrapper<BaseStudentBehaviorProject> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ MPJLambdaWrapper<BaseStudentBehaviorProject> queryWrapper = new MPJLambdaWrapper<>();
|
|
|
queryWrapper
|
|
|
+ .select(BaseStudentBehaviorProject.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentBehaviorProjectPageVo.class).contains(x.getProperty()))
|
|
|
+ .selectAs(DictionaryDetail::getName,BaseStudentBehaviorProjectPageVo::getScoreTypeCN)
|
|
|
.orderByDesc(BaseStudentBehaviorProject::getId)
|
|
|
.eq(ObjectUtil.isNotNull(dto.getBaseStudentBehaviorCategoryId()), BaseStudentBehaviorProject::getBaseStudentBehaviorCategoryId, dto.getBaseStudentBehaviorCategoryId())
|
|
|
- .select(BaseStudentBehaviorProject.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentBehaviorProjectPageVo.class).contains(x.getProperty()));
|
|
|
- IPage<BaseStudentBehaviorProject> page = baseStudentBehaviorProjectService.page(ConventPage.getPage(dto), queryWrapper);
|
|
|
+ .leftJoin(DictionaryDetail.class,DictionaryDetail::getCode,BaseStudentBehaviorProject::getScoreType);
|
|
|
+ IPage<BaseStudentBehaviorProjectPageVo> page = baseStudentBehaviorProjectService.selectJoinListPage(ConventPage.getPage(dto),BaseStudentBehaviorProjectPageVo.class, queryWrapper);
|
|
|
PageOutput<BaseStudentBehaviorProjectPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentBehaviorProjectPageVo.class);
|
|
|
return RT.ok(pageOutput);
|
|
|
}
|