diff --git a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java index e69def5..0235cb4 100644 --- a/src/main/java/com/msdw/tms/controller/ProjectRecordController.java +++ b/src/main/java/com/msdw/tms/controller/ProjectRecordController.java @@ -64,7 +64,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi { @Override @GetMapping("/user/record") public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions){ - PageUtils page1 = projectRecordService.queryPage(page,size,userId); + PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions); return R.ok().put("data", page1); } diff --git a/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java b/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java index 7b5f19f..4d4f96b 100644 --- a/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java +++ b/src/main/java/com/msdw/tms/dao/ProjectRecordDao.java @@ -23,7 +23,7 @@ import java.util.List; @Mapper public interface ProjectRecordDao extends BaseMapper { - IPage getByUserRecord(Page page, @Param("userId") Integer userId); + IPage getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions); IPage getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity); diff --git a/src/main/java/com/msdw/tms/service/ProjectRecordService.java b/src/main/java/com/msdw/tms/service/ProjectRecordService.java index 6f258a3..780ad3d 100644 --- a/src/main/java/com/msdw/tms/service/ProjectRecordService.java +++ b/src/main/java/com/msdw/tms/service/ProjectRecordService.java @@ -17,7 +17,7 @@ import java.util.List; */ public interface ProjectRecordService extends IService { - PageUtils queryPage(Integer page, Integer size, Integer userId); + PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions); PageUtils queryExperimentPage(Integer page, Integer size, Integer userid); diff --git a/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java index 85a1c44..8343694 100644 --- a/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java @@ -38,7 +38,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl page1 = new Page<>(page, size); - IPage projectRecordVos = this.baseMapper.getByUserRecord(page1, userId); + IPage projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions); PageUtils questionsPage = new PageUtils(projectRecordVos); diff --git a/src/main/resources/mapper/tms/ProjectRecordDao.xml b/src/main/resources/mapper/tms/ProjectRecordDao.xml index c7b73d7..5b67e32 100644 --- a/src/main/resources/mapper/tms/ProjectRecordDao.xml +++ b/src/main/resources/mapper/tms/ProjectRecordDao.xml @@ -58,6 +58,7 @@ INNER JOIN tms_project_record r ON r.recordId = c.recordId WHERE c.userId = #{userId} and r.isdel = 0 + and projectPermissions = #{projectPermissions} GROUP BY c.recordId desc