feat: 编排保存时同步更新项目的venue_id

- 在saveDraftSchedule方法中添加同步逻辑
- 保存编排详情后自动更新martial_project.venue_id
- 保持编排系统和项目管理的数据一致性

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
2026-01-07 11:55:03 +08:00
parent ea50330a5d
commit b94ac501de
9 changed files with 12 additions and 0 deletions

View File

@@ -418,6 +418,18 @@ public class MartialScheduleServiceImpl extends ServiceImpl<MartialScheduleMappe
scheduleDetailMapper.updateById(detail);
}
// 1.5 同步更新项目的venue_id保持数据一致性
if (groupDTO.getVenueId() != null) {
MartialScheduleGroup group = scheduleGroupMapper.selectById(groupDTO.getId());
if (group != null && group.getProjectId() != null) {
MartialProject project = projectService.getById(group.getProjectId());
if (project != null) {
project.setVenueId(groupDTO.getVenueId());
projectService.updateById(project);
}
}
}
// 2. 更新参赛者信息
if (groupDTO.getParticipants() != null) {
for (ParticipantDTO participantDTO : groupDTO.getParticipants()) {