BUGFIX: format;
This commit is contained in:
@@ -30,10 +30,11 @@ public class AccountController {
|
||||
public Response<AccountPreLoginVO> preLogin(@Valid @RequestBody AccountPreLoginDTO accountDTO) {
|
||||
return Response.success(accountService.preLogin(accountDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "登入")
|
||||
@PostMapping("/login")
|
||||
public Response<AccountLoginVO> login(@Valid @RequestBody AccountLoginDTO accountDTO, HttpServletRequest request) {
|
||||
return Response.success(accountService.login(accountDTO,request));
|
||||
return Response.success(accountService.login(accountDTO, request));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "绑定邮箱")
|
||||
@@ -57,13 +58,13 @@ public class AccountController {
|
||||
@ApiOperation(value = "登出")
|
||||
@PostMapping("/logout")
|
||||
public Response<Boolean> logout(@Valid @RequestBody AccountLogoutDTO accountLogoutDTO) {
|
||||
return Response.success( accountService.logout(accountLogoutDTO));
|
||||
return Response.success(accountService.logout(accountLogoutDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "是否登入")
|
||||
@PostMapping("/isLogin")
|
||||
public Response<Boolean> isLogin(@Valid @RequestBody AccountLogoutDTO accountLogoutDTO) {
|
||||
return Response.success( accountService.isLogin(accountLogoutDTO));
|
||||
return Response.success(accountService.isLogin(accountLogoutDTO));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ public class DesignController {
|
||||
public Response<DesignCollectionVO> reDesignCollection(@Valid @RequestBody ReDesignCollectionDTO reDesignDTO) {
|
||||
return Response.success(designService.reDesignCollection(reDesignDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "designItem list,刷新用")
|
||||
@GetMapping("/designItemList")
|
||||
public Response<DesignCollectionVO> designItemList(@ApiParam("designId") @RequestParam("designId") Long designId) {
|
||||
|
||||
@@ -30,9 +30,10 @@ public class DesignDetailController {
|
||||
@PostMapping("/generateHighDesign")
|
||||
public Response<String> generateHighDesign(@Valid @RequestBody GenerateHighDesignDTO generateHighDesignDTO) {
|
||||
Response response = new Response();
|
||||
response.setData(designService. generateHighDesign(generateHighDesignDTO));
|
||||
response.setData(designService.generateHighDesign(generateHighDesignDTO));
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除高级design图片")
|
||||
@PostMapping("/deleteHighDesign")
|
||||
public Response<Boolean> deleteHighDesign(@Valid @RequestBody GenerateHighDesignDTO generateHighDesignDTO) {
|
||||
@@ -40,11 +41,12 @@ public class DesignDetailController {
|
||||
response.setData(designService.deleteHighDesign(generateHighDesignDTO));
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询design详情")
|
||||
@GetMapping("/getDetail")
|
||||
public Response<DesignItemDetailVO> getDetail(@ApiParam("designItemId") @RequestParam("designItemId") Long designItemId,
|
||||
@ApiParam("designPythonOutfitId") @RequestParam(value = "designPythonOutfitId",required = false) Long designPythonOutfitId) {
|
||||
return Response.success(designService.detail(designPythonOutfitId,designItemId));
|
||||
@ApiParam("designPythonOutfitId") @RequestParam(value = "designPythonOutfitId", required = false) Long designPythonOutfitId) {
|
||||
return Response.success(designService.detail(designPythonOutfitId, designItemId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "切换系统的element")
|
||||
@@ -52,18 +54,19 @@ public class DesignDetailController {
|
||||
public Response<GetNextSysElementVO> getNextSysElement(@ApiParam("要切换的系统element 类型") @RequestParam("type") String type,
|
||||
@ApiParam("要切换的系统element id") @RequestParam("id") Long id,
|
||||
@ApiParam("操作类型 PREV 上一步 NEXT 下一步") @RequestParam("operateType") String operateType) {
|
||||
return Response.success(designItemService.getNextSysElement(id,type,operateType));
|
||||
return Response.success(designItemService.getNextSysElement(id, type, operateType));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单个design")
|
||||
@PostMapping("/designSingle")
|
||||
public Response<DesignSingleVO> designSingle(@Valid @RequestBody DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO ) {
|
||||
public Response<DesignSingleVO> designSingle(@Valid @RequestBody DesignSingleIncludeLayersDTO designSingleIncludeLayersDTO) {
|
||||
return Response.success(designItemService.designSingleIncludeLayers(designSingleIncludeLayersDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "print打点")
|
||||
@PostMapping("/printDot")
|
||||
public Response<String> printDot(@Valid @RequestBody DesignSingleDTO designSingleDTO ) {
|
||||
Response<String> response =new Response();
|
||||
public Response<String> printDot(@Valid @RequestBody DesignSingleDTO designSingleDTO) {
|
||||
Response<String> response = new Response();
|
||||
String url = designItemService.printDot(designSingleDTO);
|
||||
response.setData(url);
|
||||
return response;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ElementController {
|
||||
@RequestParam(value = "level1Type") String level1Type,
|
||||
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@RequestParam(value = "timeZone") String timeZone) {
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()),"Please select a file!");
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()), "Please select a file!");
|
||||
return Response.success(collectionElementService.upload(
|
||||
new CollectionElementUploadDTO(file, level1Type, timeZone, MD5Utils.encryptFile(file))));
|
||||
}
|
||||
@@ -95,6 +95,7 @@ public class ElementController {
|
||||
public Response<List<PantoneVO>> getRgbByHsvBatch(@RequestBody @Valid List<GetRgbByHsvBatchDTO> rgbByHsvBatch) {
|
||||
return Response.success(panToneService.getRgbByHsvBatch(rgbByHsvBatch));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "刷新历史数据")
|
||||
@PostMapping("/refreshHistoryData")
|
||||
public Response<Boolean> refreshHistoryData() {
|
||||
|
||||
@@ -30,20 +30,20 @@ public class GenerateController {
|
||||
|
||||
@ApiOperation("自动识别sketch的caption")
|
||||
@PostMapping("/caption")
|
||||
public Response<GenerateCaptionVO> generateCaption(@RequestParam Long sketchElementId){
|
||||
public Response<GenerateCaptionVO> generateCaption(@RequestParam Long sketchElementId) {
|
||||
return Response.success(generateService.generateCaption(sketchElementId));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("通过文字、图片生成图片")
|
||||
@PostMapping("/sketchAndPrint")
|
||||
public Response<GenerateCollectionVO> generateThroughImageText(@Valid @RequestBody GenerateThroughImageTextDTO generateThroughImageTextDTO){
|
||||
public Response<GenerateCollectionVO> generateThroughImageText(@Valid @RequestBody GenerateThroughImageTextDTO generateThroughImageTextDTO) {
|
||||
return Response.success(generateService.generateThroughImageText(generateThroughImageTextDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("喜欢生成的图片")
|
||||
@PostMapping("/like")
|
||||
public Response<GenerateLikeVO> like(@Valid @RequestBody GenerateLikeDTO generateLikeDTO){
|
||||
public Response<GenerateLikeVO> like(@Valid @RequestBody GenerateLikeDTO generateLikeDTO) {
|
||||
return Response.success(generateService.generateLike(generateLikeDTO));
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class GenerateController {
|
||||
@GetMapping("/dislike")
|
||||
public Response<Boolean> dislike(@ApiParam("generateDetailId") @RequestParam Long generateDetailId,
|
||||
@ApiParam("timeZone") @RequestParam String timeZone) {
|
||||
return Response.success(generateService.generateDislike(generateDetailId,timeZone));
|
||||
return Response.success(generateService.generateDislike(generateDetailId, timeZone));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,31 +57,31 @@ public class LibraryController {
|
||||
@ApiOperation(value = "Library分页列表")
|
||||
@PostMapping("/queryLibraryPage")
|
||||
public Response<PageBaseResponse<QueryLibraryPageVO>> queryLibraryPage(@Valid @RequestBody QueryLibraryPageDTO query) {
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query,QueryLibraryPageServiceDTO.class)));
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query, QueryLibraryPageServiceDTO.class)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Library分页列表(查询top和bottom)")
|
||||
@PostMapping("/queryLibraryTopAndBottomPage")
|
||||
public Response<PageBaseResponse<QueryLibraryPageVO>> queryLibraryTopAndBottomPage(@Valid @RequestBody QueryLibraryTopPageDTO query) {
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query,QueryLibraryPageServiceDTO.class)));
|
||||
return Response.success(libraryService.queryLibraryPage(CopyUtil.copyObject(query, QueryLibraryPageServiceDTO.class)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "Library文件上传")
|
||||
@PostMapping("/upload")
|
||||
public Response<LibraryUpdateVo> upload(@RequestParam("file") MultipartFile file,
|
||||
@ApiParam("一级类型 Moodboard Printboard Sketchboard MarketingSketch Models")
|
||||
@RequestParam(value = "level1Type") String level1Type,
|
||||
@RequestParam(value = "level1Type") String level1Type,
|
||||
@ApiParam("二级类型 争对 Sketchboard; 有 Outwear Dress Blouse Skirt Trousers")
|
||||
@RequestParam(value = "level2Type",required = false) String level2Type,
|
||||
@RequestParam(value = "level2Type", required = false) String level2Type,
|
||||
@ApiParam("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取")
|
||||
@RequestParam(value = "timeZone") String timeZone,
|
||||
@RequestParam(value = "timeZone") String timeZone,
|
||||
@RequestParam(value = "modelType") String modelType,
|
||||
@RequestParam(value = "sex") String sex,
|
||||
@RequestParam(value = "checkMd5") Integer checkMd5) {
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()),"Please select a file!");
|
||||
Integer high =null;
|
||||
Integer width =null;
|
||||
if(level1Type.equals(LibraryLevel1TypeEnum.MODELS.getRealName())){
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()), "Please select a file!");
|
||||
Integer high = null;
|
||||
Integer width = null;
|
||||
if (level1Type.equals(LibraryLevel1TypeEnum.MODELS.getRealName())) {
|
||||
if (StringUtils.isEmpty(modelType)) {
|
||||
throw new BusinessException("modelType can't be null");
|
||||
}
|
||||
@@ -100,14 +100,16 @@ public class LibraryController {
|
||||
return Response.success(libraryUpdateVo);
|
||||
}
|
||||
}
|
||||
return Response.success(libraryService.upload(new LibraryUploadDTO(file, level1Type,level2Type,
|
||||
timeZone, md5,high,width,modelType,sex)));
|
||||
return Response.success(libraryService.upload(new LibraryUploadDTO(file, level1Type, level2Type,
|
||||
timeZone, md5, high, width, modelType, sex)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存或者编辑template打点")
|
||||
@PostMapping("/saveOrEditTemplatePoint")
|
||||
public Response<LibraryModelPointVO> saveOrEditTemplatePoint(@Valid @RequestBody LibraryModelPointDTO libraryModelPoint) {
|
||||
return Response.success(libraryModelPointService.saveOrEditTemplatePoint(libraryModelPoint));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量Library修改用户文件名")
|
||||
@PostMapping("/batchUpdateLibraryName")
|
||||
public Response<Boolean> batchUpdateLibraryName(@Valid @RequestBody LibraryUpdateDTO libraryUpdateDTO) {
|
||||
@@ -119,7 +121,7 @@ public class LibraryController {
|
||||
@PostMapping("/batchDeleteLibrary")
|
||||
public Response<Boolean> batchDeleteLibrary(@Valid @RequestBody LibraryDeleteDTO deleteDTO) {
|
||||
List<Library> librarys = libraryService.getByIds(deleteDTO.getLibraryIds());
|
||||
Assert.notEmpty(librarys,"librarys does not exist!");
|
||||
Assert.notEmpty(librarys, "librarys does not exist!");
|
||||
libraryService.removeBatchByIds(deleteDTO.getLibraryIds());
|
||||
for (Library library : librarys) {
|
||||
if (library.getUrl().startsWith(sysImage)) {
|
||||
@@ -133,10 +135,10 @@ public class LibraryController {
|
||||
|
||||
@ApiOperation(value = "Models打点预览")
|
||||
@PostMapping("/modelsDot")
|
||||
public Response<String> modelsDot(@ApiParam("file") @RequestPart(value = "file",required = false) MultipartFile file,
|
||||
@ApiParam("models对象")@RequestPart("models") ModelsDotDTO modelsDotDTO) {
|
||||
if(Objects.nonNull(file)){
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()),"Please select a file!");
|
||||
public Response<String> modelsDot(@ApiParam("file") @RequestPart(value = "file", required = false) MultipartFile file,
|
||||
@ApiParam("models对象") @RequestPart("models") ModelsDotDTO modelsDotDTO) {
|
||||
if (Objects.nonNull(file)) {
|
||||
Assert.isTrue(!StringUtils.isEmpty(file.getOriginalFilename()), "Please select a file!");
|
||||
AuthPrincipalVo userInfo = UserContext.getUserHolder();
|
||||
//需要宽高和地址参数design
|
||||
FileVO fileVO = FileUtil.getFileSize(file);
|
||||
@@ -147,18 +149,18 @@ public class LibraryController {
|
||||
String uploadPath = minioUtil.upload("aida-tmp", path, file);
|
||||
String minioPath = libraryService.processMannequins(uploadPath);
|
||||
modelsDotDTO.setTemplateUrl(minioPath);
|
||||
}else{
|
||||
Assert.notNull(modelsDotDTO.getLibraryId(),"libraryId cannot be empty!");
|
||||
Assert.notNull(modelsDotDTO.getTemplateId(),"templateId cannot be empty!");
|
||||
} else {
|
||||
Assert.notNull(modelsDotDTO.getLibraryId(), "libraryId cannot be empty!");
|
||||
Assert.notNull(modelsDotDTO.getTemplateId(), "templateId cannot be empty!");
|
||||
LibraryModelPoint modelPoint = libraryModelPointService.getById(modelsDotDTO.getTemplateId());
|
||||
Assert.notNull(modelPoint,"template does not exist!");
|
||||
Assert.notNull(modelPoint, "template does not exist!");
|
||||
Library library = libraryService.getById(modelsDotDTO.getLibraryId());
|
||||
Assert.notNull(library,"library does not exist!");
|
||||
Assert.notNull(library, "library does not exist!");
|
||||
modelsDotDTO.setHigh(library.getHigh());
|
||||
modelsDotDTO.setWidth(library.getWidth());
|
||||
modelsDotDTO.setTemplateUrl(library.getUrl());
|
||||
}
|
||||
Response<String> response =new Response();
|
||||
Response<String> response = new Response();
|
||||
log.info("Models打点预览入参####{}", JSON.toJSONString(modelsDotDTO));
|
||||
String url = libraryModelPointService.modelsDot(modelsDotDTO);
|
||||
response.setData(minioUtil.getPresignedUrl(url, 24 * 60));
|
||||
@@ -174,14 +176,14 @@ public class LibraryController {
|
||||
private String calculateTempFileUrl(Long userId) {
|
||||
String rootPath = fileProperties.getSys().getPath();
|
||||
String day = DateUtil.dateToStr(new Date(), DateUtil.YYYYMM);
|
||||
return rootPath + day + File.separator + "tmp" + File.separator + userId + File.separator+ UUID.randomUUID().toString();
|
||||
return rootPath + day + File.separator + "tmp" + File.separator + userId + File.separator + UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
private String calculateTempFileUrlNew(Long userId) {
|
||||
return userId.toString();
|
||||
}
|
||||
|
||||
private String calculateTemplateUrl(File uploadFile){
|
||||
private String calculateTemplateUrl(File uploadFile) {
|
||||
String linuxDomain = fileProperties.getLinuxDomain();
|
||||
if (!StringUtils.isEmpty(linuxDomain)) {
|
||||
//linux 系统
|
||||
|
||||
@@ -51,7 +51,7 @@ public class PythonController {
|
||||
@PostMapping("/saveGeneratePicture")
|
||||
public Response<String> upload(@RequestParam("file") MultipartFile file,
|
||||
@ApiParam("操作类型 generatePrint ->生成印花 " +
|
||||
"designCollection ->设计collection generateAdvancedDesign ->生成高级design"+
|
||||
"designCollection ->设计collection generateAdvancedDesign ->生成高级design" +
|
||||
"generateSketch -> 生成草图")
|
||||
@RequestParam(value = "operateType") String operateType) {
|
||||
return Response.success(pythonService.upload(file, operateType));
|
||||
@@ -60,10 +60,10 @@ public class PythonController {
|
||||
@ApiOperation(value = "python服务保存多张图片到java服务")
|
||||
@PostMapping("/saveMultiGeneratePicture")
|
||||
public Response<List<String>> uploadMultiple(@RequestParam("files") MultipartFile[] files,
|
||||
@ApiParam("操作类型 generatePrint ->生成印花 " +
|
||||
"designCollection ->设计collection generateAdvancedDesign ->生成高级design"+
|
||||
"generateSketch -> 生成草图")
|
||||
@RequestParam(value = "operateType") String operateType) {
|
||||
@ApiParam("操作类型 generatePrint ->生成印花 " +
|
||||
"designCollection ->设计collection generateAdvancedDesign ->生成高级design" +
|
||||
"generateSketch -> 生成草图")
|
||||
@RequestParam(value = "operateType") String operateType) {
|
||||
return Response.success(pythonService.upload(files, operateType));
|
||||
}
|
||||
|
||||
|
||||
@@ -58,32 +58,32 @@ public class SavedCollectionController {
|
||||
QueryWrapper<UserLikeGroup> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.eq("account_id", authPrincipalVo.getId());
|
||||
if(!StringUtils.isEmpty(query.getCollectionName())){
|
||||
if (!StringUtils.isEmpty(query.getCollectionName())) {
|
||||
queryWrapper.like("name", query.getCollectionName());
|
||||
}
|
||||
if(Objects.nonNull(query.getStartDate())){
|
||||
if (Objects.nonNull(query.getStartDate())) {
|
||||
queryWrapper.ge("update_date", new Date(query.getStartDate()));
|
||||
}
|
||||
if(Objects.nonNull(query.getEndDate())){
|
||||
if (Objects.nonNull(query.getEndDate())) {
|
||||
queryWrapper.le("update_date", new Date(query.getEndDate()));
|
||||
}
|
||||
queryWrapper.orderByDesc("id");
|
||||
IPage<UserLikeGroup> page = userLikeGroupService.getBaseMapper().selectPage(
|
||||
new Page<>(query.getPage(), query.getSize()), queryWrapper);
|
||||
if(CollectionUtils.isEmpty(page.getRecords())){
|
||||
if (CollectionUtils.isEmpty(page.getRecords())) {
|
||||
return Response.success(PageBaseResponse.success(new Page<>()));
|
||||
}
|
||||
List<Long> groupIds = page.getRecords().stream().map(UserLikeGroup::getId).collect(Collectors.toList());
|
||||
List<UserLikeVO> groupDetails = userLikeService.getGroupDetails(groupIds);
|
||||
Assert.notEmpty(groupDetails,"History detail does not exist!");
|
||||
Map<Long,List<UserLikeVO>> groupDetailMap = groupDetails.stream()
|
||||
Assert.notEmpty(groupDetails, "History detail does not exist!");
|
||||
Map<Long, List<UserLikeVO>> groupDetailMap = groupDetails.stream()
|
||||
.collect(Collectors.groupingBy(UserLikeVO::getUserLikeGroupId));
|
||||
|
||||
Account account = accountService.getById(authPrincipalVo.getId());
|
||||
Account account = accountService.getById(authPrincipalVo.getId());
|
||||
IPage<UserLikeGroupVO> convert = page.convert((Function<UserLikeGroup, UserLikeGroupVO>) group -> {
|
||||
if(group != null){
|
||||
UserLikeGroupVO userLikeGroupVO = CopyUtil.copyObject(group,UserLikeGroupVO.class);
|
||||
userLikeGroupVO.setUpdateDate(group.getUpdateDate().getTime());
|
||||
if (group != null) {
|
||||
UserLikeGroupVO userLikeGroupVO = CopyUtil.copyObject(group, UserLikeGroupVO.class);
|
||||
userLikeGroupVO.setUpdateDate(group.getUpdateDate().getTime());
|
||||
userLikeGroupVO.setAuthor(account.getUserName());
|
||||
//count 和detail
|
||||
List<UserLikeVO> details = groupDetailMap.get(group.getId());
|
||||
@@ -91,7 +91,7 @@ public class SavedCollectionController {
|
||||
detail.setUrl(minioUtil.getPresignedUrl(detail.getUrl(), 24 * 60));
|
||||
}
|
||||
userLikeGroupVO.setGroupDetails(details);
|
||||
userLikeGroupVO.setSketchCount(CollectionUtils.isEmpty(details) ? 0 :details.size());
|
||||
userLikeGroupVO.setSketchCount(CollectionUtils.isEmpty(details) ? 0 : details.size());
|
||||
return userLikeGroupVO;
|
||||
}
|
||||
return null;
|
||||
@@ -110,7 +110,7 @@ public class SavedCollectionController {
|
||||
@PostMapping("/updateUserGroupName")
|
||||
public Response<HistoryUpdateVO> updateUserGroupName(@Valid @RequestBody HistoryUpdateDTO historyUpdateDTO) {
|
||||
return Response.success(userLikeGroupService.updateUserGroupName(historyUpdateDTO.getUserGroupId()
|
||||
,historyUpdateDTO.getUserGroupName(),historyUpdateDTO.getTimeZone()));
|
||||
, historyUpdateDTO.getUserGroupName(), historyUpdateDTO.getTimeZone()));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "History删除用户分组")
|
||||
@@ -124,7 +124,7 @@ public class SavedCollectionController {
|
||||
@ApiOperation(value = "History choose")
|
||||
@GetMapping("/choose")
|
||||
public Response<UserLikeChooseVO> choose(
|
||||
@ApiParam("用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
@ApiParam("用户分组id") @RequestParam("userGroupId") Long userGroupId) {
|
||||
return Response.success(userLikeGroupService.choose(userGroupId));
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ThirdPartyController {
|
||||
|
||||
@ApiOperation(value = "Edit user information")
|
||||
@PostMapping("/editUser")
|
||||
public Response<Boolean> editUser( @RequestBody AccountEditDTO accountEditDTO) {
|
||||
public Response<Boolean> editUser(@RequestBody AccountEditDTO accountEditDTO) {
|
||||
return Response.success(accountService.editUser(accountEditDTO));
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.io.FileNotFoundException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 控制器
|
||||
* 控制器
|
||||
*
|
||||
* @author SHAHAIBO
|
||||
* @since 2023-08-01
|
||||
@@ -39,90 +39,90 @@ import java.util.List;
|
||||
@Api(value = "", tags = "接口")
|
||||
public class WorkspaceController {
|
||||
|
||||
@Resource
|
||||
private WorkspaceService workspaceService;
|
||||
@Resource
|
||||
private WorkspaceService workspaceService;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperation(value = "详情", notes = "传入workspace")
|
||||
public Response<Workspace> detail(@ApiParam(value = "主键集合", required = true) @RequestParam Long id) {
|
||||
Workspace detail = workspaceService.getByIdNew(id);
|
||||
return Response.success(detail);
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperation(value = "详情", notes = "传入workspace")
|
||||
public Response<Workspace> detail(@ApiParam(value = "主键集合", required = true) @RequestParam Long id) {
|
||||
Workspace detail = workspaceService.getByIdNew(id);
|
||||
return Response.success(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@ApiOperation(value = "分页", notes = "传入workspace")
|
||||
public Response<WorkspaceVO> list(@Valid @RequestBody WorkspaceDTO query) {
|
||||
WorkspaceVO response = workspaceService.getPage(query);
|
||||
return Response.success(response);
|
||||
}
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@ApiOperation(value = "分页", notes = "传入workspace")
|
||||
public Response<WorkspaceVO> list(@Valid @RequestBody WorkspaceDTO query) {
|
||||
WorkspaceVO response = workspaceService.getPage(query);
|
||||
return Response.success(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或编辑
|
||||
*/
|
||||
@PostMapping("/saveOrUpdate")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperation(value = "新增或编辑", notes = "传入workspace")
|
||||
public Response saveOrUpdate(@Valid @RequestBody Workspace workspace) {
|
||||
return Response.success(workspaceService.saveOrUpdate(workspace));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@DeleteMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperation(value = "删除", notes = "传入id")
|
||||
public Response<List<Long>> remove(@Valid @RequestBody List<Workspace> workspaceList) {
|
||||
return Response.success(workspaceService.delete(workspaceList));
|
||||
}
|
||||
|
||||
@GetMapping("/enumValues")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiOperation(value = "获取枚举类值")
|
||||
public Response<List<BizJson>> enumValues(@RequestParam("enumName") String enumName) {
|
||||
List<BizJson> bizJsonList = workspaceService.getEnumValues(enumName);
|
||||
return Response.success(bizJsonList);
|
||||
}
|
||||
|
||||
@GetMapping("/getMannequins")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperation(value = "获取模特")
|
||||
public Response<List<ModelsVO>> getMannequins(@RequestParam("sex") String sex) {
|
||||
List<ModelsVO> modelsVO = workspaceService.getMannequins(sex);
|
||||
return Response.success(modelsVO);
|
||||
}
|
||||
/**
|
||||
* 新增或编辑
|
||||
*/
|
||||
@PostMapping("/saveOrUpdate")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperation(value = "新增或编辑", notes = "传入workspace")
|
||||
public Response saveOrUpdate(@Valid @RequestBody Workspace workspace) {
|
||||
return Response.success(workspaceService.saveOrUpdate(workspace));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("system_file_copy")
|
||||
@ApiOperationSupport(order = 7)
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@DeleteMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperation(value = "删除", notes = "传入id")
|
||||
public Response<List<Long>> remove(@Valid @RequestBody List<Workspace> workspaceList) {
|
||||
return Response.success(workspaceService.delete(workspaceList));
|
||||
}
|
||||
|
||||
@GetMapping("/enumValues")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiOperation(value = "获取枚举类值")
|
||||
public Response<List<BizJson>> enumValues(@RequestParam("enumName") String enumName) {
|
||||
List<BizJson> bizJsonList = workspaceService.getEnumValues(enumName);
|
||||
return Response.success(bizJsonList);
|
||||
}
|
||||
|
||||
@GetMapping("/getMannequins")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperation(value = "获取模特")
|
||||
public Response<List<ModelsVO>> getMannequins(@RequestParam("sex") String sex) {
|
||||
List<ModelsVO> modelsVO = workspaceService.getMannequins(sex);
|
||||
return Response.success(modelsVO);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("system_file_copy")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "minio数据迁移")
|
||||
public Response<Boolean> systemFileCopy() {
|
||||
workspaceService.systemFileCopy();
|
||||
return Response.success(true);
|
||||
}
|
||||
workspaceService.systemFileCopy();
|
||||
return Response.success(true);
|
||||
}
|
||||
|
||||
@PostMapping("moveFile")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "增加一级性别路径")
|
||||
public Response<Boolean> moveFile() {
|
||||
workspaceService.moveFile();
|
||||
return Response.success(true);
|
||||
}
|
||||
@PostMapping("moveFile")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "增加一级性别路径")
|
||||
public Response<Boolean> moveFile() {
|
||||
workspaceService.moveFile();
|
||||
return Response.success(true);
|
||||
}
|
||||
|
||||
@PostMapping("maleDataInsert")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "男装数据入库入minio")
|
||||
public Response<Boolean> maleDataInsert() throws FileNotFoundException {
|
||||
workspaceService.maleDataInsert();
|
||||
return Response.success(true);
|
||||
}
|
||||
@PostMapping("maleDataInsert")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperation(value = "男装数据入库入minio")
|
||||
public Response<Boolean> maleDataInsert() throws FileNotFoundException {
|
||||
workspaceService.maleDataInsert();
|
||||
return Response.success(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user