!99 修复-多租户-租户套餐未及时生效的bug

Merge pull request !99 from 清溪先生/master
This commit is contained in:
芋道源码 2022-03-18 07:42:33 +00:00 committed by Gitee
commit 63398bf3d0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -136,7 +136,12 @@ public class RoleServiceImpl implements RoleService {
role.setDataScope(DataScopeEnum.ALL.getScope()); // 默认可查看所有数据原因是可能一些项目不需要项目权限
roleMapper.insert(role);
// 发送刷新消息
roleProducer.sendRoleRefreshMessage();
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
roleProducer.sendRoleRefreshMessage();
}
});
// 返回
return role.getId();
}