TASK: cloud、posetransfer;
This commit is contained in:
@@ -246,6 +246,12 @@ public class SavedCollectionController {
|
||||
return Response.success(userLikeGroupService.relight(toProductImageDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "转relight元素")
|
||||
@PostMapping("/convertRelightElement")
|
||||
public Response<ToProductElementVO> convertRelightElement(@RequestParam("id") Long id) {
|
||||
return Response.success(userLikeGroupService.convertRelightElement(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取relight结果")
|
||||
@PostMapping("/relightResult")
|
||||
public Response<List<MagicToolResultVO>> getRelightResult(@Valid @RequestBody List<String> taskIdList) {
|
||||
|
||||
@@ -117,4 +117,6 @@ public interface UserLikeGroupService extends IService<UserLikeGroup> {
|
||||
Boolean collectionLikeUpdate(CollectionLikeUpdateDTO collectionLikeUpdateDTO);
|
||||
|
||||
Boolean toProductImageElementDelete(Long id);
|
||||
|
||||
ToProductElementVO convertRelightElement(Long id);
|
||||
}
|
||||
|
||||
@@ -1645,6 +1645,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
QueryWrapper<CollectionSort> userLikeSortQueryWrapper = new QueryWrapper<>();
|
||||
userLikeSortQueryWrapper.lambda().eq(CollectionSort::getProjectId, projectDTO.getId());
|
||||
userLikeSortQueryWrapper.lambda().isNull(CollectionSort::getParentId);
|
||||
userLikeSortQueryWrapper.lambda().eq(CollectionSort::getRelationType, CollectionType.DESIGN.getValue());
|
||||
userLikeSortQueryWrapper.lambda().orderByAsc(CollectionSort::getSort);
|
||||
List<CollectionSort> userLikeSortList = collectionSortMapper.selectList(userLikeSortQueryWrapper);
|
||||
|
||||
@@ -1679,7 +1680,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
QueryWrapper<CollectionSort> childCollectionQw = new QueryWrapper<>();
|
||||
childCollectionQw.lambda().eq(CollectionSort::getParentId, collectionSort.getId());
|
||||
childCollectionQw.lambda().orderByAsc(CollectionSort::getSort);
|
||||
List<CollectionSort> childSortList = collectionSortMapper.selectList(userLikeSortQueryWrapper);
|
||||
List<CollectionSort> childSortList = collectionSortMapper.selectList(childCollectionQw);
|
||||
List<AllCollectionVO> childList = new ArrayList<>();
|
||||
for (CollectionSort userLikeSort : childSortList) {
|
||||
if (userLikeSort.getRelationType().equals(CollectionType.TO_PRODUCT_IMAGE.getValue())) {
|
||||
@@ -2532,6 +2533,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
toProductImageResult.setUrl(url);
|
||||
toProductImageResultMapper.updateById(toProductImageResult);
|
||||
String taskIdBatch = toProductImageResult.getTaskIdBatch();
|
||||
log.info("toProductImage云生成 batchTaskId:" + taskIdBatch + " 完成数+1");
|
||||
cloudTaskMapper.increaseCompletedNum(taskIdBatch);
|
||||
|
||||
String key = toProductImageResultKey + ":" + taskId;
|
||||
@@ -2641,4 +2643,20 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
toProductElementMapper.update(null, updateWrapper);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToProductElementVO convertRelightElement(Long id) {
|
||||
ToProductImageResult toProductImageResult = toProductImageResultMapper.selectById(id);
|
||||
|
||||
ToProductElement toProductElement = new ToProductElement();
|
||||
toProductElement.setUrl(toProductImageResult.getUrl());
|
||||
// toProductElement.setUserLikeGroupId(userLikeGroupId);
|
||||
toProductElement.setProjectId(toProductImageResult.getProjectId());
|
||||
toProductElement.setCreateTime(LocalDateTime.now());
|
||||
toProductElementMapper.insert(toProductElement);
|
||||
ToProductElementVO toProductElementVO = CopyUtil.copyObject(toProductElement, ToProductElementVO.class);
|
||||
toProductElementVO.setMinioUrl(toProductElementVO.getUrl());
|
||||
toProductElementVO.setUrl(minioUtil.getPreSignedUrl(toProductElementVO.getUrl(), 24 * 60));
|
||||
return toProductElementVO;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user