|
|
|
@ -28,7 +28,9 @@ public class PermissionManagerImpl implements PermissionManager {
|
|
|
|
|
private PermissionModuleMapper permissionModuleMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private PermissionReader permissionReader;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional
|
|
|
|
|
public void synchronizeFunctions() {
|
|
|
|
|
List<JSONObject> functions = permissionFunctionMapper.listAll();
|
|
|
|
|
Map<String, JSONObject> funcMapFromDB = new HashMap<>();
|
|
|
|
@ -40,7 +42,7 @@ public class PermissionManagerImpl implements PermissionManager {
|
|
|
|
|
for (PermissionNode node : nodes) {
|
|
|
|
|
String funcId = node.getFuncId();
|
|
|
|
|
if (funcMapFromDB.containsKey(funcId.toLowerCase())) {
|
|
|
|
|
funcMapFromDB.remove(funcId);
|
|
|
|
|
funcMapFromDB.remove(funcId.toLowerCase());
|
|
|
|
|
JSONObject func = node.initFuncObject();
|
|
|
|
|
func.remove("role");
|
|
|
|
|
permissionFunctionMapper.update(func);
|
|
|
|
@ -181,5 +183,4 @@ public class PermissionManagerImpl implements PermissionManager {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|