| | |
| | | |
| | | @GetMapping("list") |
| | | public FebsResponse list(AiProductQuestion dto, QueryRequest request) { |
| | | String companyId = getCurrentUserCompanyId(); |
| | | dto.setCompanyId(companyId); |
| | | |
| | | Map<String, Object> data = getDataTable(aiProductQuestionService.listInPage(dto, request)); |
| | | return new FebsResponse().success().data(data); |
| | |
| | | @ControllerEndpoint(operation = "新增", exceptionMessage = "操作失败") |
| | | public FebsResponse add(@RequestBody @Valid AiProductQuestion dto) { |
| | | |
| | | String companyId = getCurrentUserCompanyId(); |
| | | dto.setCompanyId(companyId); |
| | | return aiProductQuestionService.add(dto); |
| | | } |
| | | |
| | |
| | | @ControllerEndpoint(operation = "AI生成题目", exceptionMessage = "操作失败") |
| | | public FebsResponse aiAdd(@RequestBody @Valid AiProductQuestionAiDto dto) { |
| | | |
| | | String companyId = getCurrentUserCompanyId(); |
| | | dto.setCompanyId(companyId); |
| | | return aiProductQuestionService.aiAdd(dto); |
| | | } |
| | | |
| | |
| | | public FebsResponse update(@RequestBody @Valid AiProductQuestion dto) { |
| | | |
| | | return aiProductQuestionService.update(dto); |
| | | } |
| | | |
| | | @PostMapping(value = "stateUpdate/{type}/{ids}") |
| | | @ControllerEndpoint(operation = "更新", exceptionMessage = "更新失败") |
| | | public FebsResponse stateUpdate(@PathVariable("ids") String ids, @PathVariable("type") Integer type) { |
| | | return aiProductQuestionService.stateUpdate(ids, type); |
| | | } |
| | | |
| | | @GetMapping("delete/{id}") |
| | |
| | | @GetMapping(value = "/questionTree") |
| | | public FebsResponse questionTree() { |
| | | |
| | | return new FebsResponse().success().data(aiProductQuestionService.questionTree()); |
| | | |
| | | String companyId = getCurrentUserCompanyId(); |
| | | return new FebsResponse().success().data(aiProductQuestionService.questionTree(companyId)); |
| | | } |
| | | } |