@Override public boolean removeAssessmentById(Integer assessmentId) { if (null != assessmentId && assessmentId != 0) { List<FileDO> files = assessmentFileCfgDOMapper.selectFilesByAssessmentId(assessmentId); int count1 = 0, count2 = 0; if (files.size() > 0) { List<Integer> fileIds = new ArrayList<>(); for (FileDO dO : files) { fileIds.add(dO.getFileId()); } count1 = fileDOMapper.logicalRemove(fileIds); count2 = assessmentFileCfgDOMapper.deleteByAssessmentId(assessmentId); } int count3 = assemblyPublishAssessmentDOMapper.deleteByPrimaryKey(assessmentId); return (count1 > 0 && count2 > 0 && count3 > 0) ? true : false; } return true; }
@Override public List<FileDO> getAssessmentFilesById(int assessmentId) { return assessmentFileCfgDOMapper.selectFilesByAssessmentId(assessmentId); }