|
|
|
@ -46,7 +46,6 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ClientMapper clientMapper;
|
|
|
|
private ClientMapper clientMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void synchronizeFunctions() {
|
|
|
|
public void synchronizeFunctions() {
|
|
|
|
List<JSONObject> functions = permissionPartnerFunctionMapper.listAll();
|
|
|
|
List<JSONObject> functions = permissionPartnerFunctionMapper.listAll();
|
|
|
|
@ -122,7 +121,6 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
|
|
|
|
permissionClientModulesService.save(moduleClientAdd);
|
|
|
|
permissionClientModulesService.save(moduleClientAdd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@ -140,28 +138,14 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
|
|
|
|
permissionPartnerModuleMapper.save(mod);
|
|
|
|
permissionPartnerModuleMapper.save(mod);
|
|
|
|
List<JSONObject> IdandMoniker = clientMapper.listClientsIdAndMoniker();
|
|
|
|
List<JSONObject> IdandMoniker = clientMapper.listClientsIdAndMoniker();
|
|
|
|
JSONObject nModuleId = permissionPartnerModuleMapper.listModuleId(moduleName);
|
|
|
|
JSONObject nModuleId = permissionPartnerModuleMapper.listModuleId(moduleName);
|
|
|
|
|
|
|
|
|
|
|
|
if (module.getInitialize()) {
|
|
|
|
|
|
|
|
for (JSONObject clientMod : IdandMoniker) {
|
|
|
|
for (JSONObject clientMod : IdandMoniker) {
|
|
|
|
clientMod.put("client_id", clientMod.getString("client_id"));
|
|
|
|
clientMod.put("client_id", clientMod.getString("client_id"));
|
|
|
|
clientMod.put("client_moniker", clientMod.getString("client_moniker"));
|
|
|
|
clientMod.put("client_moniker", clientMod.getString("client_moniker"));
|
|
|
|
clientMod.put("module_id", nModuleId.getString("id"));
|
|
|
|
clientMod.put("module_id", nModuleId.getString("id"));
|
|
|
|
clientMod.put("is_valid", 1);
|
|
|
|
clientMod.put("is_valid", module.getInitialize());
|
|
|
|
clientMod.put("id", IdUtil.getId());
|
|
|
|
clientMod.put("id", IdUtil.getId());
|
|
|
|
permissionClientModulesService.save(clientMod);
|
|
|
|
permissionClientModulesService.save(clientMod);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (JSONObject clientMod : IdandMoniker) {
|
|
|
|
|
|
|
|
clientMod.put("client_id", clientMod.getString("client_id"));
|
|
|
|
|
|
|
|
clientMod.put("client_moniker", clientMod.getString("client_moniker"));
|
|
|
|
|
|
|
|
clientMod.put("module_id", nModuleId.getString("id"));
|
|
|
|
|
|
|
|
clientMod.put("is_valid", 0);
|
|
|
|
|
|
|
|
clientMod.put("id", IdUtil.getId());
|
|
|
|
|
|
|
|
permissionClientModuleMapper.save(clientMod);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module.initObject(mod);
|
|
|
|
module.initObject(mod);
|
|
|
|
@ -169,7 +153,6 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void checkAndDeleteModule(String moduleName) {
|
|
|
|
public void checkAndDeleteModule(String moduleName) {
|
|
|
|
List<JSONObject> funcs = permissionPartnerFunctionMapper.listByModule(moduleName);
|
|
|
|
List<JSONObject> funcs = permissionPartnerFunctionMapper.listByModule(moduleName);
|
|
|
|
|