增加数据源的修改删除代码接口
parent
3217607309
commit
166f501ff0
|
@ -47,12 +47,32 @@ public class DataSourceController extends BaseController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/insert")
|
@PostMapping("/insert")
|
||||||
public Result<String> insert(@RequestBody DataSource dataSource){
|
public Result insert(@RequestBody DataSource dataSource){
|
||||||
dataSourceService.save(dataSource);
|
dataSourceService.save(dataSource);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据源
|
||||||
|
* @param dataSource
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/update")
|
||||||
|
public Result update(@RequestBody DataSource dataSource){
|
||||||
|
dataSourceService.updateById(dataSource);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据源
|
||||||
|
* @param dataSource
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
public Result delete(@RequestBody DataSource dataSource){
|
||||||
|
dataSourceService.removeById(dataSource);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue