大赛管理功能
This commit is contained in:
parent
287e004ee5
commit
2f9ace88bd
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user