|
@@ -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;
|
|
|
}
|
|
|
|
|
|
/**
|