1、generate 异步生成及获取排队情况
2、generate 取消生成
This commit is contained in:
@@ -5,10 +5,14 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@ApiModel("GenerateThroughImageTextDTO")
|
||||
public class GenerateThroughImageTextDTO {
|
||||
@NotNull(message = "userId cannot be empty")
|
||||
@ApiModelProperty("用户id")
|
||||
Long userId;
|
||||
|
||||
@ApiModelProperty("caption")
|
||||
String text;
|
||||
@@ -40,4 +44,7 @@ public class GenerateThroughImageTextDTO {
|
||||
@NotBlank(message = "timeZone cannot be empty!")
|
||||
@ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
String timeZone;
|
||||
|
||||
@ApiModelProperty("唯一id,用于保持消息唯一性")
|
||||
Long uniqueId;
|
||||
}
|
||||
|
||||
25
src/main/java/com/ai/da/model/dto/GenerateToPythonDTO.java
Normal file
25
src/main/java/com/ai/da/model/dto/GenerateToPythonDTO.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package com.ai.da.model.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GenerateToPythonDTO {
|
||||
|
||||
private Long user_id;
|
||||
|
||||
private String image_url;
|
||||
|
||||
private String category;
|
||||
|
||||
private String str;
|
||||
|
||||
private Integer mode;
|
||||
|
||||
private String version;
|
||||
|
||||
private String gender;
|
||||
}
|
||||
@@ -19,6 +19,13 @@ public class GenerateCollectionVO {
|
||||
@ApiModelProperty("生成的图片信息")
|
||||
private List<GenerateCollectionItemVO> generatedCollectionItems;
|
||||
|
||||
@ApiModelProperty("在当前队列中的排序")
|
||||
private Long rankPosition;
|
||||
|
||||
public GenerateCollectionVO(Long rankPosition) {
|
||||
this.rankPosition = rankPosition;
|
||||
}
|
||||
|
||||
public GenerateCollectionVO(Long generateId, Long collectionId, List<GenerateCollectionItemVO> generatedCollectionItems) {
|
||||
this.generateId = generateId;
|
||||
this.collectionId = collectionId;
|
||||
|
||||
Reference in New Issue
Block a user