public Reply resourceDeleteRel(String strIds) {
String[] resIds = strIds.split("&");
String[] ids = new String[resIds.length];
if (resIds == null || resIds.length == 0) {
addActionError("删除资源失败");
return getReply();
}
List<Object[]> paramList = new ArrayList<Object[]>();
try {
for (int i = 0; i < resIds.length; i++) {
String[] result = resIds[i].split("[+]");
if (result.length != 2) {
addActionError("删除资源失败");
return getReply();
}
Object[] objects = new Object[] { result[0], result[1] };
ids[i] = result[0];
paramList.add(objects);
}
if (StringUtils.isBlank(strIds)) {
addActionError("请选择要删除的资源");
return getReply();
}
resourceMainService.removeResourcesRel(paramList, ids);
addActionMessage("删除资源成功");
}
catch (Exception e) {
e.printStackTrace();
addActionError("删除资源失败");
}
return getReply();
}
String[] resIds = strIds.split("&");
String[] ids = new String[resIds.length];
if (resIds == null || resIds.length == 0) {
addActionError("删除资源失败");
return getReply();
}
List<Object[]> paramList = new ArrayList<Object[]>();
try {
for (int i = 0; i < resIds.length; i++) {
String[] result = resIds[i].split("[+]");
if (result.length != 2) {
addActionError("删除资源失败");
return getReply();
}
Object[] objects = new Object[] { result[0], result[1] };
ids[i] = result[0];
paramList.add(objects);
}
if (StringUtils.isBlank(strIds)) {
addActionError("请选择要删除的资源");
return getReply();
}
resourceMainService.removeResourcesRel(paramList, ids);
addActionMessage("删除资源成功");
}
catch (Exception e) {
e.printStackTrace();
addActionError("删除资源失败");
}
return getReply();
}