|
@@ -62,10 +62,14 @@ public class TextbookStudentClaimController {
|
|
|
@ApiOperation(value="学生教材认领记录列表(分页)")
|
|
|
@SaCheckPermission("textbookstudentclaim:detail")
|
|
|
public RT<PageOutput<TextbookStudentClaimPageVo>> page(@Valid TextbookStudentClaimPageDto dto){
|
|
|
+ long userId = StpUtil.getLoginIdAsLong();
|
|
|
LambdaQueryWrapper<TextbookStudentClaim> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper
|
|
|
.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);
|
|
|
PageOutput<TextbookStudentClaimPageVo> pageOutput = ConventPage.getPageOutput(page, TextbookStudentClaimPageVo.class);
|
|
|
return RT.ok(pageOutput);
|