From f01677dfd75d58e30b5fb11a6d69c9345977bc42 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 26 Feb 2021 15:53:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E8=99=9A=E4=BB=BF=E5=8F=8A?= =?UTF-8?q?=E6=95=99=E5=AD=A6=E5=AE=9E=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/msdw/tms/controller/ProjectRecordController.java | 2 +- src/main/java/com/msdw/tms/dao/ProjectRecordDao.java | 2 +- src/main/java/com/msdw/tms/service/ProjectRecordService.java | 2 +- .../com/msdw/tms/service/impl/ProjectRecordServiceImpl.java | 4 ++-- src/main/resources/mapper/tms/ProjectRecordDao.xml | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) 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