Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user