| | |
| | | package cc.mrbird.febs.ai.controller.productQuestion; |
| | | |
| | | import cc.mrbird.febs.ai.entity.AiProductQuestion; |
| | | import cc.mrbird.febs.ai.entity.AiProductQuestionJob; |
| | | import cc.mrbird.febs.ai.req.AiProductQuestionAiDto; |
| | | import cc.mrbird.febs.ai.service.AiProductQuestionService; |
| | | import cc.mrbird.febs.common.annotation.ControllerEndpoint; |
| | |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | @GetMapping("jobList") |
| | | public FebsResponse jobList(AiProductQuestionJob dto, QueryRequest request) { |
| | | String companyId = getCurrentUserCompanyId(); |
| | | dto.setCompanyId(companyId); |
| | | |
| | | Map<String, Object> data = getDataTable(aiProductQuestionService.listJobInPage(dto, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | @GetMapping("changeState/{id}/{state}") |
| | | @ControllerEndpoint(operation = "状态操作", exceptionMessage = "操作失败") |
| | | public FebsResponse changeState( |
| | |
| | | @ControllerEndpoint(operation = "AI生成题目", exceptionMessage = "操作失败") |
| | | public FebsResponse aiAdd(@RequestBody @Valid AiProductQuestionAiDto dto) { |
| | | |
| | | // String companyId = getCurrentUserCompanyId(); |
| | | // dto.setCompanyId(companyId); |
| | | // return aiProductQuestionService.aiAdd(dto); |
| | | String companyId = getCurrentUserCompanyId(); |
| | | dto.setCompanyId(companyId); |
| | | return aiProductQuestionService.aiAdd(dto); |
| | | return aiProductQuestionService.aiAddV2(dto); |
| | | } |
| | | |
| | | @PostMapping("update") |
| | |
| | | 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}") |
| | | @ControllerEndpoint(operation = "删除", exceptionMessage = "操作失败") |
| | | public FebsResponse delete( |