Пример #1
0
 @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;
 }
Пример #2
0
 @Override
 public AssemblyPublishAssessmentDO getAssessmentById(int assessmentId) {
   return assemblyPublishAssessmentDOMapper.selectByPrimaryKey(assessmentId);
 }
Пример #3
0
 @Override
 public boolean addPublishAssessment(AssemblyPublishAssessmentDO assessmentDO) {
   int count = assemblyPublishAssessmentDOMapper.insertSelective(assessmentDO);
   return count > 0 ? true : false;
 }