Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
shahaibo
2024-01-26 13:18:37 +08:00
24 changed files with 1167 additions and 82 deletions

View File

@@ -53,4 +53,25 @@ public class GenerateController {
return Response.success(generateService.generateDislike(generateDetailId, timeZone));
}
@ApiOperation(value = "发起生成请求,异步获取结果")
@PostMapping("/prepare")
public Response<String> prepareForGenerate(@Valid @RequestBody GenerateThroughImageTextDTO generateThroughImageTextDTO) {
return Response.success(generateService.prepareForGenerate(generateThroughImageTextDTO));
}
@ApiOperation(value = "取消继续生成")
@GetMapping("/stopWaiting")
public Response<String> stopWaiting(@RequestParam("userId") Long userId,
@RequestParam("uniqueId") String uniqueId,
@RequestParam("timeZone") String timeZone) {
generateService.cancelGenerate(userId, uniqueId, timeZone);
return Response.success("stop waiting successfully");
}
@ApiOperation(value = "获取生成结果")
@GetMapping("/result")
public Response<GenerateCollectionVO> getGenerateResult(@RequestParam("uniqueId") String uniqueId) {
GenerateCollectionVO generateResult = generateService.getGenerateResult(uniqueId);
return Response.success(generateResult);
}
}