大赛管理功能

This commit is contained in:
tiger_zhou 2024-03-11 13:10:04 +08:00
parent 7404c0bfb8
commit cc7218902e
3 changed files with 803 additions and 798 deletions

File diff suppressed because it is too large Load Diff

View File

@ -277,6 +277,7 @@ public class RacePaperService {
RaceTaskChildVO.Builder childVOB = RaceTaskChildVO.newBuilder();
childVOB.setName(group.getName());
childVOB.setNodeType(ChildNodeType.MODULE_GROUP);
for (Long taskId : group.getTaskIdsList()) {
RaceTaskChildVO taskVO = this.findTask(taskId, allTaskMapList);
childVOB.addChildren(taskVO);
@ -333,15 +334,15 @@ public class RacePaperService {
cb.setContent(dto.getContent());
cb.setStandards(dto.getStandards());
cb.setParentId(dto.getParentId());
if (StringUtils.isNotEmpty(dto.getSceneType())) {
cb.setSceneType(Type.valueOf(dto.getSceneType()));
}
if (Objects.nonNull(dto.getSceneId())) {
cb.setSceneId(dto.getSceneId());
}
if (Objects.nonNull(dto.getRuleId())) {
cb.setRuleId(dto.getRuleId());
}
}
if (Objects.nonNull(dto.getRuleId())) {
cb.setRuleId(dto.getRuleId());
}
if (StringUtils.isNotEmpty(dto.getSceneType())) {
cb.setSceneType(Type.valueOf(dto.getSceneType()));
}
if (Objects.nonNull(dto.getSceneId())) {
cb.setSceneId(dto.getSceneId());
}
cb.setNodeType(nodeType);
cb.setName(dto.getName());

View File

@ -89,7 +89,6 @@ public class RaceSceneService {
private void removeObj(RacetrScene rs) {
byte[] protoData = rs.getProto();
if (ArrayUtils.isEmpty(protoData)) {
log.error("自定义删除场景附件proto数据不能为空 id:[{}]", rs.getId());
return;
@ -140,10 +139,12 @@ public class RaceSceneService {
}
public void delete(Long id) {
RacetrTaskExample taskExample = new RacetrTaskExample();
taskExample.createCriteria().andSceneIdEqualTo(id);
long bindTaskCount = this.taskDAO.countByExample(taskExample);
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindTaskCount <= 0, "此场景已被任务绑定不能删除");
RacetrScene rs = this.findById(id);
this.removeObj(rs);
// RacetrTaskExample taskExample = new RacetrTaskExample();
// taskExample.createCriteria().andSceneIdEqualTo(id);
// long bindTaskCount = this.taskDAO.countByExample(taskExample);
// BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindTaskCount <= 0, "此场景已被任务绑定不能删除");
this.sceneDAO.deleteByPrimaryKey(id);
}