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

This commit is contained in:
xupei
2023-10-11 13:39:36 +08:00
6 changed files with 16 additions and 4 deletions

View File

@@ -43,6 +43,8 @@ public class ReDesignCollectionDTO {
private String modelType; private String modelType;
private String modelSex;
@NotBlank(message = "singleOverall cannot be empty!") @NotBlank(message = "singleOverall cannot be empty!")
@ApiModelProperty("控制生成类型的参数两个选项outfit时候传 single , 另外一个传 overall") @ApiModelProperty("控制生成类型的参数两个选项outfit时候传 single , 另外一个传 overall")
private String singleOverall; private String singleOverall;

View File

@@ -16,8 +16,8 @@ public class UserLikeCollectionVO {
@ApiModelProperty("mood版本id 没有传null") @ApiModelProperty("mood版本id 没有传null")
private String moodTemplateId; private String moodTemplateId;
@ApiModelProperty("mood版本id 没有传null")
private String moodTemplateUrl; private String moodTemplateUrl;
private String moodTemplateName;
@ApiModelProperty("情绪板图片 数组") @ApiModelProperty("情绪板图片 数组")
private List<CollectionElementVO> moodBoards; private List<CollectionElementVO> moodBoards;

View File

@@ -22,5 +22,6 @@ public class UserLikeVO {
private String url; private String url;
@ApiModelProperty("图片路径") @ApiModelProperty("图片路径")
private String designOutfitUrl; private String designOutfitUrl;
private String pictureName;
} }

View File

@@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@@ -76,7 +77,11 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
response.setCollectionId(id); response.setCollectionId(id);
response.setMoodTemplateId(collection.getMoodTemplateId()); response.setMoodTemplateId(collection.getMoodTemplateId());
if (collection.getMoodTemplateId() != null) { 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 Map<String,List<CollectionElement>> maps = collectionElements
.stream() .stream()

View File

@@ -603,8 +603,8 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
Arrays.asList(CollectionLevel1TypeEnum.PRINT_BOARD.getRealName(), Arrays.asList(CollectionLevel1TypeEnum.PRINT_BOARD.getRealName(),
CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName())); CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName()));
//校验collection element //校验collection element
ValidateElementVO elementVO = collectionElementService.validateElement( DesignCollectionDTO designCollectionDTO = CopyUtil.copyObject(reDesignDTO, DesignCollectionDTO.class);
CopyUtil.copyObject(reDesignDTO, DesignCollectionDTO.class)); ValidateElementVO elementVO = collectionElementService.validateElement(designCollectionDTO);
//计算并删除对应的未关联的element //计算并删除对应的未关联的element
collectionElementService.batchDelete( collectionElementService.batchDelete(
calculateNoRelationElement(reDesignDTO.getCollectionId(), elementVO.getUsedElementIds())); calculateNoRelationElement(reDesignDTO.getCollectionId(), elementVO.getUsedElementIds()));

View File

@@ -107,6 +107,10 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
Assert.notNull(group,"History does not exist!"); Assert.notNull(group,"History does not exist!");
List<UserLikeVO> userLikeVOS = userLikeService.getGroupDetail(userGroupId); List<UserLikeVO> userLikeVOS = userLikeService.getGroupDetail(userGroupId);
userLikeVOS.forEach(o -> { 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)); o.setDesignOutfitUrl(minioUtil.getPresignedUrl(o.getUrl(), 10));
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>(); QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
qw.lambda().eq(TDesignPythonOutfit::getDesignItemId, o.getDesignItemId()); qw.lambda().eq(TDesignPythonOutfit::getDesignItemId, o.getDesignItemId());