This commit is contained in:
Awen 2022-03-18 10:20:36 +08:00
parent d2075d5c18
commit a0c41623f2

View File

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