فهرست منبع

git-svn-id: https://192.168.57.71/svn/jsgkj@449 931142cf-59ea-a443-aa0e-51397b428577

ld_zhoutl 9 سال پیش
والد
کامیت
4268c6b57c

+ 11 - 2
xtdsp/trunk/src/main/java/com/xt/dsp/controller/DatasourceCtl.java

@@ -2,6 +2,7 @@ package com.xt.dsp.controller;
 
 import java.util.List;
 
+import org.h2.util.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -102,8 +103,16 @@ public class DatasourceCtl {
 	@RequestMapping("delDataSource")
 	@ResponseBody
     public int delDataSource(Model model, String ids) {
-		int cnt = datasourceService.deleteByPrimaryKey(ids);
-    	return cnt;
+    	int cnt = 0;
+		if (!StringUtils.isNullOrEmpty(ids)) {
+			String[] idArr = ids.split(",");
+			for(String id : idArr) {
+				if(!StringUtils.isNullOrEmpty(id)) {
+					cnt += datasourceService.deleteByPrimaryKey(id);
+				}
+			}
+		}
+		return cnt;
     }
 	
 	/**

+ 9 - 1
xtdsp/trunk/src/main/java/com/xt/dsp/controller/TaskCtl.java

@@ -135,7 +135,15 @@ public class TaskCtl {
 	@RequestMapping("delTask")
 	@ResponseBody
 	public int delTask(Model model, String ids) {
-		int cnt = taskService.deleteByPrimaryKey(ids);
+		int cnt = 0;
+		if (!StringUtils.isNullOrEmpty(ids)) {
+			String[] idArr = ids.split(",");
+			for(String id : idArr) {
+				if(!StringUtils.isNullOrEmpty(id)) {
+					cnt += taskService.deleteByPrimaryKey(id);
+				}
+			}
+		}
 		return cnt;
 	}
 	

+ 10 - 2
xtdsp/trunk/src/main/java/com/xt/dsp/controller/TaskSqlCtl.java

@@ -101,7 +101,15 @@ public class TaskSqlCtl {
 	@RequestMapping("delTaskSql")
 	@ResponseBody
     public int delTaskSql(Model model, String ids) {
-		int cnt = taskSqlService.deleteByPrimaryKey(ids);
-    	return cnt;
+    	int cnt = 0;
+		if (!StringUtils.isNullOrEmpty(ids)) {
+			String[] idArr = ids.split(",");
+			for(String id : idArr) {
+				if(!StringUtils.isNullOrEmpty(id)) {
+					cnt += taskSqlService.deleteByPrimaryKey(id);
+				}
+			}
+		}
+		return cnt;
     }
 }