Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -43,6 +43,8 @@ public class ReDesignCollectionDTO {
|
||||
|
||||
private String modelType;
|
||||
|
||||
private String modelSex;
|
||||
|
||||
@NotBlank(message = "singleOverall cannot be empty!")
|
||||
@ApiModelProperty("控制生成类型的参数,两个选项:outfit时候传 single , 另外一个传 overall")
|
||||
private String singleOverall;
|
||||
|
||||
@@ -16,8 +16,8 @@ public class UserLikeCollectionVO {
|
||||
@ApiModelProperty("mood版本id 没有传null")
|
||||
private String moodTemplateId;
|
||||
|
||||
@ApiModelProperty("mood版本id 没有传null")
|
||||
private String moodTemplateUrl;
|
||||
private String moodTemplateName;
|
||||
|
||||
@ApiModelProperty("情绪板图片 数组")
|
||||
private List<CollectionElementVO> moodBoards;
|
||||
|
||||
@@ -22,5 +22,6 @@ public class UserLikeVO {
|
||||
private String url;
|
||||
@ApiModelProperty("图片路径")
|
||||
private String designOutfitUrl;
|
||||
private String pictureName;
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -76,7 +77,11 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
|
||||
response.setCollectionId(id);
|
||||
response.setMoodTemplateId(collection.getMoodTemplateId());
|
||||
if (collection.getMoodTemplateId() != null) {
|
||||
response.setMoodTemplateUrl(minioUtil.getPresignedUrl(collectionElementService.getById(response.getMoodTemplateId()).getUrl(), 10));
|
||||
CollectionElement byId = collectionElementService.getById(response.getMoodTemplateId());
|
||||
if (Objects.nonNull(byId)) {
|
||||
response.setMoodTemplateName(byId.getName());
|
||||
response.setMoodTemplateUrl(minioUtil.getPresignedUrl(byId.getUrl(), 10));
|
||||
}
|
||||
}
|
||||
Map<String,List<CollectionElement>> maps = collectionElements
|
||||
.stream()
|
||||
|
||||
@@ -603,8 +603,8 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
Arrays.asList(CollectionLevel1TypeEnum.PRINT_BOARD.getRealName(),
|
||||
CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName()));
|
||||
//校验collection element
|
||||
ValidateElementVO elementVO = collectionElementService.validateElement(
|
||||
CopyUtil.copyObject(reDesignDTO, DesignCollectionDTO.class));
|
||||
DesignCollectionDTO designCollectionDTO = CopyUtil.copyObject(reDesignDTO, DesignCollectionDTO.class);
|
||||
ValidateElementVO elementVO = collectionElementService.validateElement(designCollectionDTO);
|
||||
//计算并删除对应的未关联的element
|
||||
collectionElementService.batchDelete(
|
||||
calculateNoRelationElement(reDesignDTO.getCollectionId(), elementVO.getUsedElementIds()));
|
||||
|
||||
@@ -107,6 +107,10 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
Assert.notNull(group,"History does not exist!");
|
||||
List<UserLikeVO> userLikeVOS = userLikeService.getGroupDetail(userGroupId);
|
||||
userLikeVOS.forEach(o -> {
|
||||
if (o.getUrl().contains("/")) {
|
||||
int index = o.getUrl().lastIndexOf("/");
|
||||
o.setPictureName(o.getUrl().substring(index + 1));
|
||||
}
|
||||
o.setDesignOutfitUrl(minioUtil.getPresignedUrl(o.getUrl(), 10));
|
||||
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(TDesignPythonOutfit::getDesignItemId, o.getDesignItemId());
|
||||
|
||||
Reference in New Issue
Block a user