refactor: 重构 Console 相关控制层基础路径以及注释.

pull/161/head
chen.ma 3 years ago
parent fbed405dd9
commit c3acecd31d

@ -19,35 +19,35 @@ import org.springframework.web.bind.annotation.*;
* @date 2021/6/29 21:42
*/
@RestController
@RequestMapping(Constants.BASE_PATH)
@RequestMapping(Constants.BASE_PATH + "/item")
public class ItemController {
@Autowired
private ItemService itemService;
@PostMapping("/item/query/page")
@PostMapping("/query/page")
public Result<IPage<ItemRespDTO>> queryItemPage(@RequestBody ItemQueryReqDTO reqDTO) {
return Results.success(itemService.queryItemPage(reqDTO));
}
@GetMapping("/item/query/{tenantId}/{itemId}")
@GetMapping("/query/{tenantId}/{itemId}")
public Result queryItemById(@PathVariable("tenantId") String tenantId, @PathVariable("itemId") String itemId) {
return Results.success(itemService.queryItemById(tenantId, itemId));
}
@PostMapping("/item/save")
@PostMapping("/save")
public Result saveItem(@RequestBody ItemSaveReqDTO reqDTO) {
itemService.saveItem(reqDTO);
return Results.success();
}
@PostMapping("/item/update")
@PostMapping("/update")
public Result updateItem(@RequestBody ItemUpdateReqDTO reqDTO) {
itemService.updateItem(reqDTO);
return Results.success();
}
@DeleteMapping("/item/delete/{tenantId}/{itemId}")
@DeleteMapping("/delete/{tenantId}/{itemId}")
public Result deleteItem(@PathVariable("tenantId") String tenantId, @PathVariable("itemId") String itemId) {
itemService.deleteItem(tenantId, itemId);
return Results.success();

@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
*
* Tenant Controller.
*
* @author chen.ma
* @date 2021/6/25 18:31

@ -18,23 +18,23 @@ import org.springframework.web.bind.annotation.*;
* @date 2021/6/30 20:54
*/
@RestController
@RequestMapping(Constants.BASE_PATH)
@RequestMapping(Constants.BASE_PATH + "/thread")
public class ThreadPoolController {
@Autowired
private ThreadPoolService threadPoolService;
@PostMapping("/thread/pool/query/page")
@PostMapping("/pool/query/page")
public Result<IPage<ThreadPoolRespDTO>> queryNameSpacePage(@RequestBody ThreadPoolQueryReqDTO reqDTO) {
return Results.success(threadPoolService.queryThreadPoolPage(reqDTO));
}
@PostMapping("/thread/pool/query")
@PostMapping("/pool/query")
public Result<ThreadPoolRespDTO> queryNameSpace(@RequestBody ThreadPoolQueryReqDTO reqDTO) {
return Results.success(threadPoolService.getThreadPool(reqDTO));
}
@PostMapping("/thread/pool/save_or_update")
@PostMapping("/pool/save_or_update")
public Result saveOrUpdateThreadPoolConfig(@RequestBody ThreadPoolSaveOrUpdateReqDTO reqDTO) {
threadPoolService.saveOrUpdateThreadPoolConfig(reqDTO);
return Results.success();

Loading…
Cancel
Save