TASK:模块化;

This commit is contained in:
shahaibo
2025-03-31 11:53:43 +08:00
parent a2bd2fa6c6
commit 6dcc492127
5 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
package com.ai.da.mapper.primary;
import com.ai.da.common.config.mybatis.plus.CommonMapper;
import com.ai.da.mapper.primary.entity.ThreeDModule;
public interface ThreeDModuleMapper extends CommonMapper<ThreeDModule> {
}

View File

@@ -0,0 +1,22 @@
package com.ai.da.mapper.primary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("three_d_module")
public class ThreeDModule implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long projectId;
private Long threeDSimpleId;
}

View File

@@ -27,6 +27,8 @@ public class ModuleSaveDTO {
@ApiModelProperty("手稿板图片id 数组")
private List<CollectionSketchDTO> sketchBoard;
private Long patternMaking3D;
// private MoodBoardModuleChooseVO moodBoard;
// private List<CollectionElementVO> printBoard;
// private List<CollectionColorVO> colorBoard;

View File

@@ -33,4 +33,6 @@ public class ModuleChooseVO {
private List<PoseTransformationVO> poseTransfer;
// private moodBoardModuleChooseVO patternMaking3D;
private SketchReconstructionVO deReconstruction;
private ThreeDVO patternMaking3D;
}

View File

@@ -127,6 +127,8 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
private ThreeDDetailMapper threeDDetailMapper;
@Resource
private ThreeDSimpleMapper threeDSimpleMapper;
@Resource
private ThreeDModuleMapper threeDModuleMapper;
@Override
public void deleteUserGroup(Long userGroupId) {
@@ -1648,6 +1650,15 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
}else if (module.equals(Module.poseTransfer.name())){
List<PoseTransformationVO> poseTransformationResultList = generateService.getPoseTransformationResultList(projectDTO.getId());
moduleChooseVO.setPoseTransfer(poseTransformationResultList);
}else if (module.equals(Module.patternMaking3D.name())) {
QueryWrapper<ThreeDModule> qw = new QueryWrapper<>();
qw.lambda().eq(ThreeDModule::getProjectId, projectDTO.getId());
List<ThreeDModule> threeDModules = threeDModuleMapper.selectList(qw);
if (CollectionUtil.isNotEmpty(threeDModules)) {
ThreeDModule threeDModule = threeDModules.get(0);
ThreeDVO patternMaking3D = getLayoutDetail(threeDModule.getThreeDSimpleId());
moduleChooseVO.setPatternMaking3D(patternMaking3D);
}
}
}
return moduleChooseVO;
@@ -1882,6 +1893,12 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
collectionElementMapper.deleteBatchIds(old);
}
}
if (moduleSaveDTO.getPatternMaking3D() != null) {
ThreeDModule threeDModule = new ThreeDModule();
threeDModule.setProjectId(projectId);
threeDModule.setThreeDSimpleId(moduleSaveDTO.getPatternMaking3D());
threeDModuleMapper.insert(threeDModule);
}
if (boundingBox) {
QueryWrapper<CollectionElement> qw = new QueryWrapper<>();
qw.lambda().eq(CollectionElement::getLevel1Type, CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName());