TASK:mannequin;
This commit is contained in:
@@ -22,4 +22,6 @@ public class DisDesignLikeDTO {
|
||||
@NotBlank(message = "timeZone.cannot.be.empty")
|
||||
@ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
private String timeZone;
|
||||
|
||||
private Long projectId;
|
||||
}
|
||||
|
||||
@@ -7,4 +7,5 @@ import java.util.List;
|
||||
@Data
|
||||
public class ProductImageLikeDTO {
|
||||
private List<Long> toProductImageResultId;
|
||||
private Long projectId;
|
||||
}
|
||||
|
||||
41
src/main/java/com/ai/da/model/enums/CollectionType.java
Normal file
41
src/main/java/com/ai/da/model/enums/CollectionType.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.ai.da.model.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
public enum CollectionType implements IEnumDisplay {
|
||||
DESIGN("Design"),
|
||||
TO_PRODUCT_IMAGE("ToProductImage"),
|
||||
RELIGHT("Relight"),
|
||||
POSE_TRANSFORM("PoseTransfer")
|
||||
;
|
||||
|
||||
private String value;
|
||||
|
||||
CollectionType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public static CollectionType getAgeGroup(String value) {
|
||||
for (CollectionType group : values()) {
|
||||
if (group.value.equalsIgnoreCase(value)) {
|
||||
return group;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
|
||||
public static boolean isValidName(String name) {
|
||||
for (CollectionType ageGroup : CollectionType.values()) {
|
||||
if (ageGroup.name().equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
12
src/main/java/com/ai/da/model/vo/AllCollectionVO.java
Normal file
12
src/main/java/com/ai/da/model/vo/AllCollectionVO.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package com.ai.da.model.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
|
||||
@JsonSubTypes({
|
||||
@JsonSubTypes.Type(value = UserLikeVO.class, name = "userLike")
|
||||
|
||||
})
|
||||
public interface AllCollectionVO {
|
||||
}
|
||||
@@ -15,5 +15,5 @@ public class DesignModuleChooseVO {
|
||||
private Long userGroupId;
|
||||
|
||||
@ApiModelProperty("分组详细数组")
|
||||
private List<UserLikeVO> userLikeDetails;
|
||||
private List<? extends AllCollectionVO> userLikeDetails;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PoseTransformationVO {
|
||||
public class PoseTransformationVO implements AllCollectionVO{
|
||||
|
||||
private Long id;
|
||||
|
||||
@@ -24,6 +24,7 @@ public class PoseTransformationVO {
|
||||
private byte isLiked;
|
||||
|
||||
private String status;
|
||||
private String collectionType;
|
||||
|
||||
public PoseTransformationVO(Long id, String taskId, String gifUrl, String videoUrl, String firstFrameUrl, byte isLiked, String status) {
|
||||
this.id = id;
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.ai.da.mapper.primary.entity.ToProductImageResult;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ToProductImageResultVO extends ToProductImageResult {
|
||||
public class ToProductImageResultVO extends ToProductImageResult implements AllCollectionVO{
|
||||
private String sourceUrl;
|
||||
private String collectionType;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("用户分组详情-响应")
|
||||
public class UserLikeVO {
|
||||
public class UserLikeVO implements AllCollectionVO{
|
||||
|
||||
@ApiModelProperty("分组详情id")
|
||||
private Long id;
|
||||
@@ -26,4 +26,6 @@ public class UserLikeVO {
|
||||
|
||||
private Integer sort;
|
||||
private Long userLikeSortId;
|
||||
private String relationType;
|
||||
private String collectionType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user