Administrator
2026-02-12 4b62aeaa85b5700217b8130903342a8fb27ac453
src/main/java/cc/mrbird/febs/ai/controller/productQuestion/AiProductQuestionController.java
@@ -67,6 +67,12 @@
        Map<String, Object> data = getDataTable(aiProductQuestionService.listJobInPage(dto, request));
        return new FebsResponse().success().data(data);
    }
    @GetMapping("/jobChild")
    public FebsResponse jobChild(QueryRequest request, AiProductQuestionJob dto, String jobId) {
        dto.setId(jobId);
        Map<String, Object> dataTable = getDataTable(aiProductQuestionService.jobChild(request, dto));
        return new FebsResponse().success().data(dataTable);
    }
    @GetMapping("changeState/{id}/{state}")
    @ControllerEndpoint(operation = "状态操作", exceptionMessage = "操作失败")
@@ -112,6 +118,12 @@
        return aiProductQuestionService.stateUpdate(ids, type);
    }
    @PostMapping(value = "jobStateUpdate/{ids}")
    @ControllerEndpoint(operation = "更新", exceptionMessage = "操作失败")
    public FebsResponse jobStateUpdate(@PathVariable("ids") String ids) {
        return aiProductQuestionService.jobStateUpdate(ids);
    }
    @PostMapping(value = "productQuestionDelete/{ids}")
    @ControllerEndpoint(operation = "删除", exceptionMessage = "操作失败")
    public FebsResponse productQuestionDelete(@PathVariable("ids") String ids) {
@@ -146,4 +158,26 @@
    public FebsResponse importDeliver(@RequestBody MultipartFile file){
        return aiProductQuestionService.importDeliver(file);
    }
    @PostMapping("updateLabel")
    @ControllerEndpoint(operation = "更新标签", exceptionMessage = "操作失败")
    public FebsResponse updateLabel(@RequestBody @Valid AiProductQuestion dto) {
        return aiProductQuestionService.updateLabel(dto.getIds(), dto.getLabel());
    }
    @GetMapping("exportNewProductQuestion")
    @ControllerEndpoint(operation = "模板导出", exceptionMessage = "操作失败")
    public FebsResponse exportNewProductQuestion(AiProductQuestion dto, HttpServletResponse response) throws IOException {
        aiProductQuestionService.exportNewProductQuestion(dto, response);
        return null;
    }
    @PostMapping(value = "/importNewProductQuestion")
    @ControllerEndpoint(operation = "模板导入", exceptionMessage = "操作失败")
    public FebsResponse importNewProductQuestion(@RequestBody MultipartFile file, @RequestParam String categoryId, @RequestParam Integer difficulty){
        String companyId = getCurrentUserCompanyId();
        return aiProductQuestionService.importNewProductQuestion(file, categoryId, companyId,difficulty);
    }
}