You've already forked FrameTour-BE
景区账号添加问题
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user