master
kira 6 years ago
parent 3482de66c7
commit a91fac2c21

@ -109,7 +109,6 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
mod.put("funcs", funcList); mod.put("funcs", funcList);
modules.add(mod); modules.add(mod);
} }
report.put("modules", modules); report.put("modules", modules);
return report; return report;
} }
@ -123,7 +122,7 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
moduleClientAdd.put("client_id", clientId); moduleClientAdd.put("client_id", clientId);
moduleClientAdd.put("client_moniker", clientMoniker); moduleClientAdd.put("client_moniker", clientMoniker);
moduleClientAdd.put("module_id", moduleClientAdd.getString("id")); moduleClientAdd.put("module_id", moduleClientAdd.getString("id"));
moduleClientAdd.put("is_valid", true); moduleClientAdd.put("is_valid", moduleClientAdd.getBoolean("initialize"));
permissionClientModulesService.save(moduleClientAdd); permissionClientModulesService.save(moduleClientAdd);
} }
systemPackageCacheSupport.clearClientPermission(clientMoniker); systemPackageCacheSupport.clearClientPermission(clientMoniker);
@ -156,13 +155,10 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
permissionClientModulesService.save(clientMod); permissionClientModulesService.save(clientMod);
} }
} }
module.initObject(mod); module.initObject(mod);
permissionPartnerModuleMapper.update(mod); permissionPartnerModuleMapper.update(mod);
sysPermissionClientModulesMapper.updateFunctionValid(mod.getString("id"),mod.getBooleanValue("initialize")); // sysPermissionClientModulesMapper.updateFunctionValid(mod.getString("id"), mod.getBooleanValue("initialize"));
systemPackageCacheSupport.clearClientPermissionAll(); // systemPackageCacheSupport.clearClientPermissionAll();
} }
@Override @Override
@ -218,7 +214,6 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
@Transactional @Transactional
@CacheEvict(value = ":login:partners:", allEntries = true) @CacheEvict(value = ":login:partners:", allEntries = true)
public void authorizeRole(PartnerRole role, List<String> functions) { public void authorizeRole(PartnerRole role, List<String> functions) {
permissionPartnerFunctionMapper.clearRolePermission(role.getCode()); permissionPartnerFunctionMapper.clearRolePermission(role.getCode());
permissionPartnerFunctionMapper.authorizeRole(role.getCode(), functions); permissionPartnerFunctionMapper.authorizeRole(role.getCode(), functions);
} }

Loading…
Cancel
Save