景区账号添加问题

This commit is contained in:
2025-07-31 14:22:20 +08:00
parent 9ed254c920
commit f797479515
4 changed files with 22 additions and 3 deletions

View File

@@ -21,7 +21,13 @@ public class ScenicAccountServiceImpl implements ScenicAccountService {
if (entity.getId() == null) {
entity.setId(SnowFlakeUtil.getLongId());
}
return mapper.add(entity);
int result = mapper.add(entity);
if (entity.getScenicId() != null && !entity.getScenicId().isEmpty()) {
entity.getScenicId().forEach(scenicId -> {
mapper.addAccountScenicRelation(entity.getId(), scenicId, entity.getIsSuper());
});
}
return result;
}
@Override