|
@@ -62,10 +62,14 @@ public class TextbookStudentClaimController {
|
|
@ApiOperation(value="学生教材认领记录列表(分页)")
|
|
@ApiOperation(value="学生教材认领记录列表(分页)")
|
|
@SaCheckPermission("textbookstudentclaim:detail")
|
|
@SaCheckPermission("textbookstudentclaim:detail")
|
|
public RT<PageOutput<TextbookStudentClaimPageVo>> page(@Valid TextbookStudentClaimPageDto dto){
|
|
public RT<PageOutput<TextbookStudentClaimPageVo>> page(@Valid TextbookStudentClaimPageDto dto){
|
|
|
|
+ long userId = StpUtil.getLoginIdAsLong();
|
|
LambdaQueryWrapper<TextbookStudentClaim> queryWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<TextbookStudentClaim> queryWrapper = new LambdaQueryWrapper<>();
|
|
queryWrapper
|
|
queryWrapper
|
|
.orderByDesc(TextbookStudentClaim::getId)
|
|
.orderByDesc(TextbookStudentClaim::getId)
|
|
- .select(TextbookStudentClaim.class,x -> VoToColumnUtil.fieldsToColumns(TextbookStudentClaimPageVo.class).contains(x.getProperty()));
|
|
|
|
|
|
+ .select(TextbookStudentClaim.class,x -> VoToColumnUtil.fieldsToColumns(TextbookStudentClaimPageVo.class).contains(x.getProperty()))
|
|
|
|
+ .eq(dto.getStudentUserId() != null, TextbookStudentClaim::getStudentUserId, dto.getStudentUserId())
|
|
|
|
+ .eq(TextbookStudentClaim::getIsClaim, 1)
|
|
|
|
+ ;
|
|
IPage<TextbookStudentClaim> page = textbookStudentClaimService.page(ConventPage.getPage(dto), queryWrapper);
|
|
IPage<TextbookStudentClaim> page = textbookStudentClaimService.page(ConventPage.getPage(dto), queryWrapper);
|
|
PageOutput<TextbookStudentClaimPageVo> pageOutput = ConventPage.getPageOutput(page, TextbookStudentClaimPageVo.class);
|
|
PageOutput<TextbookStudentClaimPageVo> pageOutput = ConventPage.getPageOutput(page, TextbookStudentClaimPageVo.class);
|
|
return RT.ok(pageOutput);
|
|
return RT.ok(pageOutput);
|