fix:升级swagger注解

This commit is contained in:
litianxiang
2025-12-11 10:35:08 +08:00
parent a643338916
commit 9c19d061be
27 changed files with 459 additions and 459 deletions

View File

@@ -16,9 +16,9 @@ import com.ai.da.service.ChatRobotService;
import com.ai.da.service.LibraryService;
import com.ai.da.service.SuperResolutionService;
import com.ai.da.service.SysFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -31,7 +31,7 @@ import java.util.Map;
import java.util.stream.Collectors;
@Api(tags = "python对接模块")
@Tag(name = "python对接模块")
@Slf4j
@RestController
@RequestMapping("/api/python")
@@ -49,17 +49,17 @@ public class PythonController {
@Resource
private SuperResolutionService superResolutionService;
@ApiOperation(value = "python服务保存图片到java服务")
@Operation(summary = "python服务保存图片到java服务")
@PostMapping("/saveGeneratePicture")
public Response<String> upload(@RequestParam("file") MultipartFile file,
@ApiParam("操作类型 generatePrint ->生成印花 " +
@Parameter(description = "操作类型 generatePrint ->生成印花 " +
"designCollection ->设计collection generateAdvancedDesign ->生成高级design" +
"generateSketch -> 生成草图")
@RequestParam(value = "operateType") String operateType) {
return Response.success(pythonService.upload(file, operateType));
}
// @ApiOperation(value = "python服务保存多张图片到java服务")
// @Operation(summary = "python服务保存多张图片到java服务")
// @PostMapping("/saveMultiGeneratePicture")
// public Response<List<String>> uploadMultiple(@RequestParam("files") MultipartFile[] files,
// @ApiParam("操作类型 generatePrint ->生成印花 " +
@@ -69,13 +69,13 @@ public class PythonController {
// return Response.success(pythonService.upload(files, operateType));
// }
@ApiOperation(value = "通过文件类型获取系统文件")
@Operation(summary = "通过文件类型获取系统文件")
@GetMapping("/getSysFileByLevel2Type")
public Response<List<SysFileVO>> getSysFileByLevel2Type(/*@RequestParam(value = "level2Type",required = false) String level2Type*/) {
return Response.success(sysFileService.getByLevel2Type("All"));
}
@ApiOperation(value = "通过用户id获取library")
@Operation(summary = "通过用户id获取library")
@GetMapping("/getLibraryByUserId")
public Response<Map<String, List<String>>> getLibraryByUserId(@RequestParam(value = "userId") Long userId) {
List<PythonLibraryVo> response = CopyUtil.copyList(libraryService.selectByAccountIdAnd1TypeList(userId,
@@ -86,34 +86,34 @@ public class PythonController {
}
@CrossOrigin
@ApiOperation(value = "发送用户输入消息")
@Operation(summary = "发送用户输入消息")
@PostMapping("/chatStream")
public Response<ChatRobotVO> MessageToPythonChatStream(@RequestBody ChatSendDTO chatSendDTO) {
log.info(chatSendDTO.toString());
return Response.success(chatRobotService.sendMessageToChatRobot(chatSendDTO));
}
@ApiOperation(value = "血条")
@Operation(summary = "血条")
@GetMapping("/getBloodBars")
public Response<BigDecimal> getBloodBars(@RequestParam(value = "userId") Long userId) {
return Response.success(chatRobotService.getBloodBars(userId));
}
@CrossOrigin
@ApiOperation(value = "likeOrUnlike")
@Operation(summary = "likeOrUnlike")
@PostMapping("/pictureLikeOrUnLike")
public Response<Library> pictureLikeOrUnLike(@RequestBody ChatRobotLibraryDTO chatRobotLibraryDTO) {
return Response.success(chatRobotService.pictureLikeOrUnLike(chatRobotLibraryDTO));
}
@CrossOrigin
@ApiOperation(value = "刷新会话缓存")
@Operation(summary = "刷新会话缓存")
@PostMapping("/flush")
public Response<String> ChatBufferFlush(@RequestBody ChatFlushDTO chatFlushDTO) {
return Response.success(chatRobotService.chatBufferFlush(chatFlushDTO));
}
@ApiOperation(value = "超分辨率")
@Operation(summary = "超分辨率")
@PostMapping("/prepareForSR")
public Response<List<String>> superResolution(@RequestBody List<SuperResolutionDTO> superResolutionDTO) {
return Response.success(superResolutionService.prepareForSR(superResolutionDTO));