大赛管理功能

This commit is contained in:
tiger_zhou 2024-03-01 13:17:40 +08:00
parent 97b6d27952
commit 1e927b29af
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ public class RaceSceneService {
RacetrTaskExample taskExample = new RacetrTaskExample();
taskExample.createCriteria().andSceneIdEqualTo(id);
long bindTaskCount = this.taskDAO.countByExample(taskExample);
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindTaskCount > 0, "此场景已被任务绑定不能删除");
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindTaskCount <= 0, "此场景已被任务绑定不能删除");
this.sceneDAO.deleteByPrimaryKey(id);
}

View File

@ -100,7 +100,7 @@ public class RaceScoreRuleService {
RacetrTaskExample taskExample = new RacetrTaskExample();
taskExample.createCriteria().andScoreRuleIdEqualTo(id);
long bindCount = this.taskDAO.countByExample(taskExample);
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindCount > 0, "该规则已经绑定了对应方的任务,无法删除");
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindCount <= 0, "该规则已经绑定了对应方的任务,无法删除");
ruleDAO.deleteByPrimaryKey(id);
}