区分虚仿及教学实验

hehai
rong.liu 4 years ago
parent f6a9d6ab34
commit f01677dfd7
  1. 2
      src/main/java/com/msdw/tms/controller/ProjectRecordController.java
  2. 2
      src/main/java/com/msdw/tms/dao/ProjectRecordDao.java
  3. 2
      src/main/java/com/msdw/tms/service/ProjectRecordService.java
  4. 4
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  5. 1
      src/main/resources/mapper/tms/ProjectRecordDao.xml

@ -64,7 +64,7 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
@Override @Override
@GetMapping("/user/record") @GetMapping("/user/record")
public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions){ 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); return R.ok().put("data", page1);
} }

@ -23,7 +23,7 @@ import java.util.List;
@Mapper @Mapper
public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> { public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId); IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions);
IPage<ProjectRecordVo> getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity); IPage<ProjectRecordVo> getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity);

@ -17,7 +17,7 @@ import java.util.List;
*/ */
public interface ProjectRecordService extends IService<ProjectRecordEntity> { public interface ProjectRecordService extends IService<ProjectRecordEntity> {
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); PageUtils queryExperimentPage(Integer page, Integer size, Integer userid);

@ -38,7 +38,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
@Override @Override
public PageUtils queryPage(Integer page, Integer size, Integer userId) { public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions) {
/*GetByUserRecordResp projectRecord = new GetByUserRecordResp(); /*GetByUserRecordResp projectRecord = new GetByUserRecordResp();
projectRecord.setUserId(userId);*/ projectRecord.setUserId(userId);*/
@ -46,7 +46,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
//分页对象 //分页对象
Page<T> page1 = new Page<>(page, size); Page<T> page1 = new Page<>(page, size);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId); IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions);
PageUtils questionsPage = new PageUtils(projectRecordVos); PageUtils questionsPage = new PageUtils(projectRecordVos);

@ -58,6 +58,7 @@
INNER JOIN tms_project_record r ON r.recordId = c.recordId INNER JOIN tms_project_record r ON r.recordId = c.recordId
WHERE c.userId = #{userId} WHERE c.userId = #{userId}
and r.isdel = 0 and r.isdel = 0
and projectPermissions = #{projectPermissions}
GROUP BY c.recordId desc GROUP BY c.recordId desc
</select> </select>

Loading…
Cancel
Save