| | |
| | | package cc.mrbird.febs.ai.controller.product; |
| | | |
| | | import cc.mrbird.febs.ai.entity.AiProduct; |
| | | import cc.mrbird.febs.ai.req.AdminMoveChooseInfoDto; |
| | | import cc.mrbird.febs.ai.service.AiProductService; |
| | | import cc.mrbird.febs.common.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.common.controller.BaseController; |
| | |
| | | @RequestMapping(value = "/admin/product") |
| | | public class AiProductController extends BaseController { |
| | | |
| | | private final AiProductService service; |
| | | private final AiProductService aiProductService; |
| | | |
| | | @GetMapping("list") |
| | | public FebsResponse list(AiProduct dto, QueryRequest request) { |
| | | |
| | | Map<String, Object> data = getDataTable(service.listInPage(dto, request)); |
| | | Map<String, Object> data = getDataTable(aiProductService.listInPage(dto, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | |
| | | @NotNull(message = "{required}") @PathVariable Integer state |
| | | ) { |
| | | |
| | | return service.changeState(id,type,state); |
| | | return aiProductService.changeState(id,type,state); |
| | | } |
| | | |
| | | @PostMapping("add") |
| | | @ControllerEndpoint(operation = "新增", exceptionMessage = "操作失败") |
| | | public FebsResponse add(@RequestBody @Valid AiProduct dto) { |
| | | |
| | | return service.add(dto); |
| | | return aiProductService.add(dto); |
| | | } |
| | | |
| | | @PostMapping("update") |
| | | @ControllerEndpoint(operation = "分类-更新", exceptionMessage = "操作失败") |
| | | @ControllerEndpoint(operation = "更新", exceptionMessage = "操作失败") |
| | | public FebsResponse update(@RequestBody @Valid AiProduct dto) { |
| | | |
| | | return service.update(dto); |
| | | return aiProductService.update(dto); |
| | | } |
| | | |
| | | @GetMapping("delete/{id}") |
| | |
| | | @NotNull(message = "{required}") @PathVariable String id |
| | | ) { |
| | | |
| | | return service.delete(id); |
| | | return aiProductService.delete(id); |
| | | } |
| | | |
| | | |
| | | @PostMapping("pointSet") |
| | | @ControllerEndpoint(operation = "知识点配置", exceptionMessage = "操作失败") |
| | | public FebsResponse pointSet(@RequestBody @Valid AdminMoveChooseInfoDto dto) { |
| | | |
| | | return aiProductService.productSet(dto); |
| | | } |
| | | } |