|
|
@@ -5,6 +5,7 @@ import com.usoftchina.bi.server.model.pojo.annotation.CheckToken;
|
|
|
import com.usoftchina.bi.server.model.po.Databases;
|
|
|
import com.usoftchina.bi.core.base.RepEntity;
|
|
|
import com.usoftchina.bi.core.base.TestPage;
|
|
|
+import com.usoftchina.bi.server.model.pojo.annotation.Log;
|
|
|
import com.usoftchina.bi.server.model.vo.configVo.DatabasesInfo;
|
|
|
import com.usoftchina.bi.server.service.dataSource.DataBasesService;
|
|
|
import com.usoftchina.bi.server.service.dataSource.ImplementSqlService;
|
|
|
@@ -13,8 +14,6 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
@RestController
|
|
|
@RequestMapping("/DataBase")
|
|
|
@Api(description = "数据连接相关接口")
|
|
|
@@ -30,6 +29,7 @@ public class DataBasesController {
|
|
|
@ApiOperation(value = "保存数据库配置", notes = "保存数据库配置", response = RepEntity.class)
|
|
|
@CheckToken
|
|
|
@Auth(user = "admin")
|
|
|
+ @Log(module = "数据连接", name = "#body.name", token = "#token")
|
|
|
@PostMapping("/inputDatabases")
|
|
|
public RepEntity inputDatabases(@RequestHeader String token, @RequestBody DatabasesInfo body){
|
|
|
return dataBasesService.inputDatabases(body);
|
|
|
@@ -54,7 +54,7 @@ public class DataBasesController {
|
|
|
@Auth(user = "admin")
|
|
|
@PostMapping("/delDatabases")
|
|
|
public RepEntity delDatabases(@RequestHeader String token,@RequestBody Long body){
|
|
|
- return dataBasesService.delDatabases(body);
|
|
|
+ return dataBasesService.delDatabases(token, body);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
@@ -63,6 +63,7 @@ public class DataBasesController {
|
|
|
@ApiOperation(value = "更新数据库配置", notes = "更新数据库配置", response = RepEntity.class)
|
|
|
@CheckToken
|
|
|
@Auth(user = "admin")
|
|
|
+ @Log(module = "数据连接", name = "#databasesInfo.name", token = "#token")
|
|
|
@PostMapping("/updatabases")
|
|
|
public RepEntity updatabases(@RequestHeader String token,@RequestBody DatabasesInfo databasesInfo){
|
|
|
return dataBasesService.updatabases(databasesInfo);
|