Merge remote-tracking branch 'origin/master'

hehai
chen 4 years ago
commit 493c081f31
  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. 3
      src/main/resources/mapper/tms/ProjectRecordDao.xml

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

@ -23,7 +23,7 @@ import java.util.List;
@Mapper
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);

@ -17,7 +17,7 @@ import java.util.List;
*/
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);

@ -38,7 +38,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
@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();
projectRecord.setUserId(userId);*/
@ -46,7 +46,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
//分页对象
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);

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

Loading…
Cancel
Save