大赛管理功能

This commit is contained in:
tiger_zhou 2024-03-11 15:01:24 +08:00
parent 287e004ee5
commit 2f9ace88bd

View File

@ -139,12 +139,13 @@ 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);
}