コード例 #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;
 }