Bläddra i källkod

教材征订明细调整

dzx 2 månader sedan
förälder
incheckning
192a176b86

+ 5 - 1
src/main/java/com/xjrsoft/module/textbook/controller/TextbookStudentClaimController.java

@@ -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);