TASK:模块化;

This commit is contained in:
shahaibo
2025-03-30 15:56:03 +08:00
parent 2cfd342ef8
commit 48c7182f98
18 changed files with 538 additions and 12 deletions

View File

@@ -3,25 +3,23 @@ package com.ai.da.controller;
import com.ai.da.common.response.PageBaseResponse;
import com.ai.da.common.response.Response;
import com.ai.da.mapper.primary.entity.LibraryModelPoint;
import com.ai.da.model.dto.MannequinDTO;
import com.ai.da.model.dto.ModuleSaveDTO;
import com.ai.da.model.dto.ProjectDTO;
import com.ai.da.model.dto.ProjectQueryDTO;
import com.ai.da.mapper.primary.entity.ThreeDLayout;
import com.ai.da.model.dto.*;
import com.ai.da.model.enums.MannequinType;
import com.ai.da.model.vo.*;
import com.ai.da.service.UserLikeGroupService;
import com.ai.da.service.WorkspaceService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.minio.errors.MinioException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
@Api(tags = "Project模块")
@Slf4j
@@ -90,4 +88,39 @@ public class ProjectController {
public Response<QueryLibraryPageVO> getMannequinDetail(@Valid @RequestBody MannequinDTO mannequinDTO) {
return Response.success(userLikeGroupService.getMannequinDetail(mannequinDTO));
}
@PostMapping("/threeDPage")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "获取3Dpage", notes = "传入ThreeDLayoutQueryDTO")
public Response<PageBaseResponse<ThreeDLayoutVO>> threeDPage(@Valid @RequestBody ThreeDLayoutQueryDTO threeDLayoutQueryDTO) {
return Response.success(PageBaseResponse.success(userLikeGroupService.getThreeDLayoutPage(threeDLayoutQueryDTO)));
}
@PostMapping("/getLayoutDetail")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "获取3D详情", notes = "传入project")
public Response<ThreeDVO> getLayoutDetail(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId) {
return Response.success(userLikeGroupService.getLayoutDetail(threeDSimpleId));
}
@PostMapping("/getThreeDSize")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "获取尺码", notes = "传入project")
public Response<ThreeDSizeVO> getThreeDSize(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId) {
return Response.success(userLikeGroupService.getThreeDSize(threeDSimpleId));
}
@GetMapping("/getThreeDGlb")
@ApiOperationSupport(order = 11)
@ApiOperation(value = "获取GLB", notes = "传入project")
public void getThreeDGlb(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId, HttpServletResponse response) throws MinioException, IOException {
userLikeGroupService.getThreeDGlb(threeDSimpleId, response);
}
@GetMapping("/downloadZip")
@ApiOperationSupport(order = 11)
@ApiOperation(value = "下载", notes = "传入project")
public void downloadZip(@RequestParam(value = "threeDSimpleId") Long threeDSimpleId, @RequestParam(value = "sizeType") String sizeType, @RequestParam(value = "size") String size, HttpServletResponse response) throws MinioException, IOException {
userLikeGroupService.downloadZip(threeDSimpleId, sizeType, size, response);
}
}

View File

@@ -279,7 +279,7 @@ public class SavedCollectionController {
@ApiOperation(value = "brandDNAUpload")
@PostMapping("/brandDNAUpload")
public Response<String> brandDNAUpload(@RequestParam("file") MultipartFile file, @RequestParam("brandId") Long brandId) throws IOException {
public Response<Library> brandDNAUpload(@RequestParam("file") MultipartFile file, @RequestParam("brandId") Long brandId) throws IOException {
return Response.success(userLikeGroupService.brandDNAUpload(file, brandId));
}