You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
Java
40 lines
1.3 KiB
Java
package com.supervision.prompt;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import com.supervision.common.domain.R;
|
|
import com.supervision.config.BusinessException;
|
|
import com.supervision.prompt.service.PromptTestService;
|
|
import com.supervision.prompt.vo.ParamTestDTO;
|
|
import com.supervision.prompt.vo.PromptRequestVO;
|
|
import com.supervision.prompt.vo.ResultResVO;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
|
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
|
|
@Slf4j
|
|
@RestController
|
|
@RequestMapping("prompt")
|
|
@RequiredArgsConstructor
|
|
public class PromptTestController {
|
|
|
|
private final PromptTestService promptTestService;
|
|
|
|
@PostMapping("test")
|
|
public R<Boolean> test(@RequestBody PromptRequestVO promptRequestVO) throws IOException {
|
|
return R.ok(promptTestService.test(promptRequestVO));
|
|
}
|
|
|
|
@GetMapping("queryResult")
|
|
public R<ResultResVO> queryResult(String uid){
|
|
if (StrUtil.isBlank(uid)){
|
|
throw new BusinessException("uid不能为空");
|
|
}
|
|
return R.ok(promptTestService.queryResult(uid));
|
|
}
|
|
} |