Commit 99e9fe58 by ljb

完善

parent 40d3d484
...@@ -31,9 +31,9 @@ public class CommonQueryController { ...@@ -31,9 +31,9 @@ public class CommonQueryController {
@ApiOperation("获取全部数据源") @ApiOperation("获取全部数据源")
@GetMapping("/datasource") @GetMapping("/datasource")
public List<QueryDb> getDatasource() { public ResultVo getDatasource() {
List<QueryDb> datasource = commonQueryService.getDatasource(); List<QueryDb> datasource = commonQueryService.getDatasource();
return datasource; return ResultVo.success(datasource);
} }
@ApiOperation("添加数据源") @ApiOperation("添加数据源")
......
...@@ -27,7 +27,7 @@ public class DataCollectSettingApi { ...@@ -27,7 +27,7 @@ public class DataCollectSettingApi {
private Integer dataCollectSettingId; private Integer dataCollectSettingId;
/** /**
* Api接口名称 * api接口名称
*/ */
private String apiName; private String apiName;
...@@ -37,7 +37,7 @@ public class DataCollectSettingApi { ...@@ -37,7 +37,7 @@ public class DataCollectSettingApi {
private String apiUrl; private String apiUrl;
/** /**
* 数据请求方式 * 数据请求方式(1.GET,2.POST)
*/ */
private Integer requestType; private Integer requestType;
......
...@@ -59,7 +59,7 @@ public class DatabaseRunner implements ApplicationRunner { ...@@ -59,7 +59,7 @@ public class DatabaseRunner implements ApplicationRunner {
connectionMap.put(ds.getId(), druidDataSource.getConnection()); connectionMap.put(ds.getId(), druidDataSource.getConnection());
} }
ConnectionUtil.set(connectionMap); ConnectionUtil.set(connectionMap);
log.info("成功加载数据库:" + connectionMap.size()); log.info("成功加载数据库:{}个", connectionMap.size());
} }
@PreDestroy @PreDestroy
......
package com.zq.dataoperation.service; package com.zq.dataoperation.service;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
...@@ -24,7 +22,6 @@ import org.springframework.stereotype.Service; ...@@ -24,7 +22,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
......
...@@ -74,4 +74,4 @@ mybatis-plus: ...@@ -74,4 +74,4 @@ mybatis-plus:
global-config: global-config:
db-config: db-config:
select-strategy: not_empty select-strategy: not_empty
update-strategy: not_empty update-strategy: not_empty
\ No newline at end of file
...@@ -92,7 +92,4 @@ public class DataSourceController { ...@@ -92,7 +92,4 @@ public class DataSourceController {
} }
} }
} }
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment