TASK:workspace、design模块代码;
This commit is contained in:
@@ -3,8 +3,10 @@ package com.ai.da.controller;
|
||||
import com.ai.da.common.response.Response;
|
||||
import com.ai.da.common.utils.MinioUtil;
|
||||
import com.ai.da.mapper.entity.Workspace;
|
||||
import com.ai.da.model.dto.ModelsDotDTO;
|
||||
import com.ai.da.model.dto.WorkspaceDTO;
|
||||
import com.ai.da.model.enums.BizJson;
|
||||
import com.ai.da.model.vo.ModelsVO;
|
||||
import com.ai.da.model.vo.WorkspaceVO;
|
||||
import com.ai.da.service.WorkspaceService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -38,29 +40,6 @@ public class WorkspaceController {
|
||||
@Resource
|
||||
private WorkspaceService workspaceService;
|
||||
|
||||
@Resource
|
||||
private MinioUtil minIoUtil;
|
||||
|
||||
@Value("${minio.endpoint}")
|
||||
public String address;
|
||||
|
||||
@Value("${minio.bucketName}")
|
||||
public String bucketName;
|
||||
|
||||
@PostMapping("/upload")
|
||||
public Object upload(MultipartFile file) {
|
||||
|
||||
List<String> upload = minIoUtil.upload(new MultipartFile[]{file});
|
||||
|
||||
return address+"/"+bucketName+"/"+upload.get(0);
|
||||
}
|
||||
|
||||
@PostMapping("/getUrl")
|
||||
public Object getUrl() {
|
||||
|
||||
return minIoUtil.getPresignedUrl("test", "R-C_1694066189047.png", 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@@ -112,5 +91,13 @@ public class WorkspaceController {
|
||||
return Response.success(bizJsonList);
|
||||
}
|
||||
|
||||
@GetMapping("/getMannequins")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperation(value = "获取模特")
|
||||
public Response<List<ModelsVO>> getMannequins() {
|
||||
List<ModelsVO> modelsVO = workspaceService.getMannequins();
|
||||
return Response.success(modelsVO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user