34 lines
964 B
Java
34 lines
964 B
Java
package com.etl.cleaning.controller;
|
|
|
|
import com.etl.cleaning.domian.request.InsertItemRequest;
|
|
import com.etl.cleaning.service.ItemService;
|
|
import com.etl.common.result.Result;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
/**
|
|
* 数据源详情
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/item")
|
|
public class ItemController {
|
|
private final ItemService itemService;
|
|
|
|
public ItemController(ItemService itemService) {
|
|
this.itemService = itemService;
|
|
}
|
|
|
|
/**
|
|
* 添加数据源详情
|
|
* @param insertItemRequest
|
|
* @return
|
|
*/
|
|
@PostMapping("/insertItem")
|
|
public Result insertItem(@RequestBody InsertItemRequest insertItemRequest) {
|
|
itemService.insertItem(insertItemRequest);
|
|
return Result.success();
|
|
}
|
|
}
|