diff --git a/src/main/java/com/ai/da/common/utils/AccessLimitUtils.java b/src/main/java/com/ai/da/common/utils/AccessLimitUtils.java index c7d0532b..ae0ecf77 100644 --- a/src/main/java/com/ai/da/common/utils/AccessLimitUtils.java +++ b/src/main/java/com/ai/da/common/utils/AccessLimitUtils.java @@ -27,7 +27,7 @@ public class AccessLimitUtils { Integer useCount = LocalCacheUtils.getAidaInterfaceCurrentLimitingCache(interfaceName); if (useCount > count) { //系统繁忙 - throw new BusinessException("system busy !"); + throw new BusinessException("system.busy"); } else { useCount++; LocalCacheUtils.setAidaInterfaceCurrentLimitingCache(interfaceName, useCount); diff --git a/src/main/java/com/ai/da/common/utils/FileUtil.java b/src/main/java/com/ai/da/common/utils/FileUtil.java index 2ae0cb5b..43801af6 100644 --- a/src/main/java/com/ai/da/common/utils/FileUtil.java +++ b/src/main/java/com/ai/da/common/utils/FileUtil.java @@ -175,7 +175,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { return url.openStream(); } catch (IOException ioException) { log.error("获取文件尺寸异常###{}###path##{}", ExceptionUtil.stacktraceToString(ioException), path); - throw new BusinessException("get file is failed!"); + throw new BusinessException("get.file.failed"); } } diff --git a/src/main/java/com/ai/da/common/utils/MinioUtil.java b/src/main/java/com/ai/da/common/utils/MinioUtil.java index 5e9d2568..601ce757 100644 --- a/src/main/java/com/ai/da/common/utils/MinioUtil.java +++ b/src/main/java/com/ai/da/common/utils/MinioUtil.java @@ -236,7 +236,7 @@ public class MinioUtil { public InputStream download(String path) throws MinioException, IOException { if (!path.contains("/")) { - throw new BusinessException("The path is error!"); + throw new BusinessException("the.path.is.error"); } int index = path.indexOf("/"); String bucketName = path.substring(0, index); diff --git a/src/main/java/com/ai/da/controller/ElementController.java b/src/main/java/com/ai/da/controller/ElementController.java index ace1959a..9d0dda9d 100644 --- a/src/main/java/com/ai/da/controller/ElementController.java +++ b/src/main/java/com/ai/da/controller/ElementController.java @@ -1,5 +1,6 @@ package com.ai.da.controller; +import com.ai.da.common.config.exception.BusinessException; import com.ai.da.common.response.Response; import com.ai.da.common.utils.FileUtil; import com.ai.da.common.utils.MD5Utils; @@ -53,7 +54,9 @@ 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!"); + if (null == file || StringUtils.isEmpty(file.getOriginalFilename())) { + throw new BusinessException("file.cannot.be.empty"); + } return Response.success(collectionElementService.upload( new CollectionElementUploadDTO(file, level1Type, timeZone, MD5Utils.encryptFile(file)))); } diff --git a/src/main/java/com/ai/da/controller/LibraryController.java b/src/main/java/com/ai/da/controller/LibraryController.java index 7c174c9a..ab5b8355 100644 --- a/src/main/java/com/ai/da/controller/LibraryController.java +++ b/src/main/java/com/ai/da/controller/LibraryController.java @@ -23,6 +23,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; +import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -78,15 +79,17 @@ public class LibraryController { @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!"); + if (null == file || StringUtils.isEmpty(file.getOriginalFilename())) { + throw new BusinessException("file.cannot.be.empty"); + } Integer high = null; Integer width = null; if (level1Type.equals(LibraryLevel1TypeEnum.MODELS.getRealName())) { if (StringUtils.isEmpty(modelType)) { - throw new BusinessException("modelType can't be null"); + throw new BusinessException("modelType.cannot.be.empty"); } if (modelType.equals(ModelType.SYSTEM.getValue()) && StringUtils.isEmpty(sex)) { - throw new BusinessException("sex can't be null"); + throw new BusinessException("modelSex.cannot.be.empty"); } FileVO fileVO = FileUtil.getFileSize(file); high = fileVO.getHigh(); @@ -121,7 +124,9 @@ public class LibraryController { @PostMapping("/batchDeleteLibrary") public Response batchDeleteLibrary(@Valid @RequestBody LibraryDeleteDTO deleteDTO) { List librarys = libraryService.getByIds(deleteDTO.getLibraryIds()); - Assert.notEmpty(librarys, "librarys does not exist!"); + if (CollectionUtils.isEmpty(librarys)) { + throw new BusinessException("librarys.not.found"); + } libraryService.removeBatchByIds(deleteDTO.getLibraryIds()); for (Library library : librarys) { if (library.getUrl().startsWith(sysImage)) { @@ -138,7 +143,9 @@ public class LibraryController { public Response 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!"); + if (StringUtils.isEmpty(file.getOriginalFilename())) { + throw new BusinessException("file.cannot.be.empty"); + } AuthPrincipalVo userInfo = UserContext.getUserHolder(); //需要宽高和地址参数design FileVO fileVO = FileUtil.getFileSize(file); @@ -150,12 +157,20 @@ public class LibraryController { 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!"); + if (null == modelsDotDTO.getLibraryId()) { + throw new BusinessException("libraryId.cannot.be.empty"); + } + if (null == modelsDotDTO.getTemplateId()) { + throw new BusinessException("templateId.cannot.be.empty"); + } LibraryModelPoint modelPoint = libraryModelPointService.getById(modelsDotDTO.getTemplateId()); - Assert.notNull(modelPoint, "template does not exist!"); + if (Objects.isNull(modelPoint)) { + throw new BusinessException("modelPoint.not.found"); + } Library library = libraryService.getById(modelsDotDTO.getLibraryId()); - Assert.notNull(library, "library does not exist!"); + if (Objects.isNull(library)) { + throw new BusinessException("library.not.found"); + } modelsDotDTO.setHigh(library.getHigh()); modelsDotDTO.setWidth(library.getWidth()); modelsDotDTO.setTemplateUrl(library.getUrl()); diff --git a/src/main/java/com/ai/da/controller/SavedCollectionController.java b/src/main/java/com/ai/da/controller/SavedCollectionController.java index 9a2e8570..a1e3384d 100644 --- a/src/main/java/com/ai/da/controller/SavedCollectionController.java +++ b/src/main/java/com/ai/da/controller/SavedCollectionController.java @@ -1,5 +1,6 @@ package com.ai.da.controller; +import com.ai.da.common.config.exception.BusinessException; import com.ai.da.common.context.UserContext; import com.ai.da.common.response.PageBaseResponse; import com.ai.da.common.response.PageResponse; @@ -75,7 +76,9 @@ public class SavedCollectionController { } List groupIds = page.getRecords().stream().map(UserLikeGroup::getId).collect(Collectors.toList()); List groupDetails = userLikeService.getGroupDetails(groupIds); - Assert.notEmpty(groupDetails, "History detail does not exist!"); + if (CollectionUtils.isEmpty(groupDetails)) { + throw new BusinessException("groupDetails.not.found"); + } Map> groupDetailMap = groupDetails.stream() .collect(Collectors.groupingBy(UserLikeVO::getUserLikeGroupId)); diff --git a/src/main/java/com/ai/da/model/dto/ChatSendDTO.java b/src/main/java/com/ai/da/model/dto/ChatSendDTO.java index 65030339..af2c4b9f 100644 --- a/src/main/java/com/ai/da/model/dto/ChatSendDTO.java +++ b/src/main/java/com/ai/da/model/dto/ChatSendDTO.java @@ -19,15 +19,15 @@ import javax.validation.constraints.NotNull; @ApiModel("chatRobot 对话") public class ChatSendDTO { - @NotNull(message = "userId cannot be empty!") + @NotNull(message = "userId.cannot.be.empty") @ApiModelProperty("用户id") private Long user_id; - @NotBlank(message = "sessionId cannot be empty!") + @NotBlank(message = "sessionId.cannot.be.empty") @ApiModelProperty("会话ID") private String session_id; - @NotBlank(message = "Please input the message !") + @NotBlank(message = "message.cannot.be.empty") @ApiModelProperty("消息") private String message; diff --git a/src/main/java/com/ai/da/model/dto/CollectionElementUploadDTO.java b/src/main/java/com/ai/da/model/dto/CollectionElementUploadDTO.java index 4a222b28..a65ca671 100644 --- a/src/main/java/com/ai/da/model/dto/CollectionElementUploadDTO.java +++ b/src/main/java/com/ai/da/model/dto/CollectionElementUploadDTO.java @@ -16,7 +16,7 @@ import java.util.Date; @AllArgsConstructor public class CollectionElementUploadDTO { - @NotNull(message = "文件不能为空!") + @NotNull(message = "file.cannot.be.empty") private MultipartFile file; @ApiModelProperty("一级类型") diff --git a/src/main/java/com/ai/da/model/dto/CollectionGeneratePrintDTO.java b/src/main/java/com/ai/da/model/dto/CollectionGeneratePrintDTO.java index aae8f11d..acc5dc68 100644 --- a/src/main/java/com/ai/da/model/dto/CollectionGeneratePrintDTO.java +++ b/src/main/java/com/ai/da/model/dto/CollectionGeneratePrintDTO.java @@ -11,15 +11,15 @@ import javax.validation.constraints.NotNull; @ApiModel("生成印花") public class CollectionGeneratePrintDTO { - @NotNull(message = "file select2Id cannot be empty!") + @NotNull(message = "select1Id.cannot.be.empty") @ApiModelProperty("选择的第一个print文件id") private Long select1Id; - @NotNull(message = "file select2Id cannot be empty!") + @NotNull(message = "select2Id.cannot.be.empty") @ApiModelProperty("选择的第一个print文件id") private Long select2Id; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; } diff --git a/src/main/java/com/ai/da/model/dto/CollectionSavePrintDTO.java b/src/main/java/com/ai/da/model/dto/CollectionSavePrintDTO.java index 3ad544e2..e66128d0 100644 --- a/src/main/java/com/ai/da/model/dto/CollectionSavePrintDTO.java +++ b/src/main/java/com/ai/da/model/dto/CollectionSavePrintDTO.java @@ -15,10 +15,10 @@ public class CollectionSavePrintDTO { @ApiModelProperty("生成的印花绝对路径") @Size(max = 15, message = "Save up to 15 prints at a time!") - @NotEmpty(message = "printId cannot be empty!") + @NotEmpty(message = "printId.cannot.be.empty") private List printId; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; diff --git a/src/main/java/com/ai/da/model/dto/CollectionSketchDTO.java b/src/main/java/com/ai/da/model/dto/CollectionSketchDTO.java index ee5a54ab..73fa47d5 100644 --- a/src/main/java/com/ai/da/model/dto/CollectionSketchDTO.java +++ b/src/main/java/com/ai/da/model/dto/CollectionSketchDTO.java @@ -14,15 +14,15 @@ public class CollectionSketchDTO { @ApiModelProperty("sketchBoardId 元素id") private Long sketchBoardId; - @NotNull(message = "isPin cannot be empty") + @NotNull(message = "isPin.cannot.be.empty") @ApiModelProperty("是否pin 1 pin 0 不pin") private Byte isPin; - @NotBlank(message = "level2Type cannot be empty") + @NotBlank(message = "level2Type.cannot.be.empty") @ApiModelProperty("二级类型 Outwear Dress Blouse Skirt Trousers") private String level2Type; - @NotBlank(message = "designType cannot be empty") + @NotBlank(message = "designType.cannot.be.empty") @ApiModelProperty("design类型 用户design生成时候区别library和collection") private String designType; diff --git a/src/main/java/com/ai/da/model/dto/DesignSingleDTO.java b/src/main/java/com/ai/da/model/dto/DesignSingleDTO.java index ff033b22..8c305d6e 100644 --- a/src/main/java/com/ai/da/model/dto/DesignSingleDTO.java +++ b/src/main/java/com/ai/da/model/dto/DesignSingleDTO.java @@ -12,14 +12,14 @@ import java.util.List; public class DesignSingleDTO { @ApiModelProperty("designItemId") - @NotNull(message = "designItemId cannot be empty!") + @NotNull(message = "designItemId.cannot.be.empty") private Long designItemId; @ApiModelProperty("priority 数组,列表中包含服饰的顺序,越右边的表示越外层的衣服 例如[\"Outwear\", \"Dress\"]表示outwear在dress里面") - @NotEmpty(message = "priority cannot be empty!") + @NotEmpty(message = "priority.cannot.be.empty") private List priority; - @NotEmpty(message = "clothes cannot be empty!") + @NotEmpty(message = "clothes.cannot.be.empty") @ApiModelProperty("clothes 元素") private List clothes; @@ -31,7 +31,7 @@ public class DesignSingleDTO { @ApiModelProperty("preview -> true submit -> false") private Boolean isPreview; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; diff --git a/src/main/java/com/ai/da/model/dto/DesignSingleIncludeLayersDTO.java b/src/main/java/com/ai/da/model/dto/DesignSingleIncludeLayersDTO.java index f5074fc0..b638b761 100644 --- a/src/main/java/com/ai/da/model/dto/DesignSingleIncludeLayersDTO.java +++ b/src/main/java/com/ai/da/model/dto/DesignSingleIncludeLayersDTO.java @@ -11,20 +11,20 @@ import java.util.List; public class DesignSingleIncludeLayersDTO { @ApiModelProperty("designItemId") - @NotNull(message = "designItemId cannot be empty!") + @NotNull(message = "designItemId.cannot.be.empty") private Long designItemId; private List designSingleItemDTOList; - @NotNull(message = "isPreview cannot be null") + @NotNull(message = "isPreview.cannot.be.empty") @ApiModelProperty("preview -> true submit -> false") private Boolean isPreview; - @NotNull(message = "processId cannot be null") + @NotNull(message = "processId.cannot.be.empty") @ApiModelProperty("进度") private String processId; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; } diff --git a/src/main/java/com/ai/da/model/dto/DesignSingleItemDTO.java b/src/main/java/com/ai/da/model/dto/DesignSingleItemDTO.java index 03282322..7f361540 100644 --- a/src/main/java/com/ai/da/model/dto/DesignSingleItemDTO.java +++ b/src/main/java/com/ai/da/model/dto/DesignSingleItemDTO.java @@ -9,18 +9,18 @@ import java.util.List; @Data public class DesignSingleItemDTO { - @NotBlank(message = "id cannot be empty!") + @NotBlank(message = "id.cannot.be.empty") @ApiModelProperty("切换图片对应的id") private Long id; - @NotBlank(message = "type cannot be empty!") + @NotBlank(message = "type.cannot.be.empty") @ApiModelProperty("生成item实际对应的类型 有:outwear,dress,blouse,skirt,trousers Shoes Hairstyle Earring") private String type; @ApiModelProperty("对应的图片的minIO路径") private String path; - @NotBlank(message = "color cannot be empty!") + @NotBlank(message = "color.cannot.be.empty") @ApiModelProperty("颜色 存 RGB值 中间空格分隔 比如 \"58 58 169\"") private String color; diff --git a/src/main/java/com/ai/da/model/dto/GenerateHighDesignDTO.java b/src/main/java/com/ai/da/model/dto/GenerateHighDesignDTO.java index d7c8eea5..1e42707f 100644 --- a/src/main/java/com/ai/da/model/dto/GenerateHighDesignDTO.java +++ b/src/main/java/com/ai/da/model/dto/GenerateHighDesignDTO.java @@ -11,11 +11,11 @@ import javax.validation.constraints.NotNull; @ApiModel("生成高级design 入参") public class GenerateHighDesignDTO { - @NotNull(message = "designItem id cannot be empty!") + @NotNull(message = "designItemId.cannot.be.empty") @ApiModelProperty("design的designItemId") private Long designItemId; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; } diff --git a/src/main/java/com/ai/da/model/dto/GenerateLikeDTO.java b/src/main/java/com/ai/da/model/dto/GenerateLikeDTO.java index a1accf04..46d24b35 100644 --- a/src/main/java/com/ai/da/model/dto/GenerateLikeDTO.java +++ b/src/main/java/com/ai/da/model/dto/GenerateLikeDTO.java @@ -11,18 +11,18 @@ import javax.validation.constraints.NotNull; @ApiModel("Generate like入参") public class GenerateLikeDTO { - @NotNull(message = "generateDetail id cannot be empty!") + @NotNull(message = "generateDetailId.cannot.be.empty") @ApiModelProperty("generateDetailId") private Long generateDetailId; - @NotBlank(message = "level1Type cannot be empty!") + @NotBlank(message = "level1Type.cannot.be.empty") @ApiModelProperty("一级类型 Sketchboard Printboard") private String level1Type; @ApiModelProperty("当一级类型为Sketchboard时,二级类型 Outwear Dress Blouse Skirt Trousers") private String level2Type; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; } diff --git a/src/main/java/com/ai/da/model/dto/GetRgbByHsvBatchDTO.java b/src/main/java/com/ai/da/model/dto/GetRgbByHsvBatchDTO.java index b011a792..3b679539 100644 --- a/src/main/java/com/ai/da/model/dto/GetRgbByHsvBatchDTO.java +++ b/src/main/java/com/ai/da/model/dto/GetRgbByHsvBatchDTO.java @@ -9,13 +9,13 @@ import javax.validation.constraints.NotNull; @Data @ApiModel("根据rgb数组批量获取潘通rgb") public class GetRgbByHsvBatchDTO { - @NotNull(message = "r cannot be empty!") + @NotNull(message = "h.cannot.be.empty") @ApiModelProperty("h值") private Integer h; - @NotNull(message = "g cannot be empty!") + @NotNull(message = "s.cannot.be.empty") @ApiModelProperty("s值") private Integer s; - @NotNull(message = "b cannot be empty!") + @NotNull(message = "v.cannot.be.empty") @ApiModelProperty("v值") private Integer v; diff --git a/src/main/java/com/ai/da/model/dto/HistoryDeleteDTO.java b/src/main/java/com/ai/da/model/dto/HistoryDeleteDTO.java index c3ba9d9c..611c8b02 100644 --- a/src/main/java/com/ai/da/model/dto/HistoryDeleteDTO.java +++ b/src/main/java/com/ai/da/model/dto/HistoryDeleteDTO.java @@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull; @ApiModel("History删除") public class HistoryDeleteDTO { - @NotNull(message = "userGroupId cannot be empty!") + @NotNull(message = "userGroupId.cannot.be.empty") @ApiModelProperty("history 分组id") private Long userGroupId; diff --git a/src/main/java/com/ai/da/model/dto/HistoryUpdateDTO.java b/src/main/java/com/ai/da/model/dto/HistoryUpdateDTO.java index 8183fa10..a0e67ed6 100644 --- a/src/main/java/com/ai/da/model/dto/HistoryUpdateDTO.java +++ b/src/main/java/com/ai/da/model/dto/HistoryUpdateDTO.java @@ -13,15 +13,15 @@ import javax.validation.constraints.NotNull; @ApiModel("History编辑") public class HistoryUpdateDTO { - @NotNull(message = "userGroupId cannot be empty!") + @NotNull(message = "userGroupId.cannot.be.empty") @ApiModelProperty("history 分组id") private Long userGroupId; - @NotBlank(message = "userGroupName cannot be empty!") + @NotBlank(message = "userGroupName.cannot.be.empty") @ApiModelProperty("history 分组名称") private String userGroupName; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; diff --git a/src/main/java/com/ai/da/model/dto/LibraryModelPointDTO.java b/src/main/java/com/ai/da/model/dto/LibraryModelPointDTO.java index 9d691ccb..b77a54ea 100644 --- a/src/main/java/com/ai/da/model/dto/LibraryModelPointDTO.java +++ b/src/main/java/com/ai/da/model/dto/LibraryModelPointDTO.java @@ -23,7 +23,7 @@ public class LibraryModelPointDTO implements Serializable { private static final long serialVersionUID = 1L; - @NotNull(message = "libraryId cannot be empty!") + @NotNull(message = "libraryId.cannot.be.empty") @ApiModelProperty("libraryId") private Long libraryId; @@ -32,31 +32,31 @@ public class LibraryModelPointDTO implements Serializable { @ApiModelProperty("templateId") private Long templateId; - @NotEmpty(message = "shoulderLeft cannot be empty!") + @NotEmpty(message = "shoulderLeft.cannot.be.empty") @ApiModelProperty("左肩 数组传类似 [0.2, 0.2]") private List shoulderLeft; - @NotEmpty(message = "shoulderRight cannot be empty!") + @NotEmpty(message = "shoulderRight.cannot.be.empty") @ApiModelProperty("右肩 数组传类似 [0.2, 0.2]") private List shoulderRight; - @NotEmpty(message = "waistbandLeft cannot be empty!") + @NotEmpty(message = "waistbandLeft.cannot.be.empty") @ApiModelProperty("左腰 数组传类似 [0.2, 0.2]") private List waistbandLeft; - @NotEmpty(message = "waistbandRight cannot be empty!") + @NotEmpty(message = "waistbandRight.cannot.be.empty") @ApiModelProperty("右腰 数组传类似 [0.2, 0.2]") private List waistbandRight; - @NotEmpty(message = "handLeft cannot be empty!") + @NotEmpty(message = "handLeft.cannot.be.empty") @ApiModelProperty("左手 数组传类似 [0.2, 0.2]") private List handLeft; - @NotEmpty(message = "handRight cannot be empty!") + @NotEmpty(message = "handRight.cannot.be.empty") @ApiModelProperty("右手 数组传类似 [0.2, 0.2]") private List handRight; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; diff --git a/src/main/java/com/ai/da/model/dto/LibraryUploadDTO.java b/src/main/java/com/ai/da/model/dto/LibraryUploadDTO.java index 91ebf076..cd6e149d 100644 --- a/src/main/java/com/ai/da/model/dto/LibraryUploadDTO.java +++ b/src/main/java/com/ai/da/model/dto/LibraryUploadDTO.java @@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull; @AllArgsConstructor public class LibraryUploadDTO { - @NotNull(message = "文件不能为空!") + @NotNull(message = "file.cannot.be.empty") private MultipartFile file; @ApiModelProperty("一级类型") diff --git a/src/main/java/com/ai/da/model/dto/ModelsDotDTO.java b/src/main/java/com/ai/da/model/dto/ModelsDotDTO.java index 82052292..13d05050 100644 --- a/src/main/java/com/ai/da/model/dto/ModelsDotDTO.java +++ b/src/main/java/com/ai/da/model/dto/ModelsDotDTO.java @@ -30,31 +30,31 @@ public class ModelsDotDTO implements Serializable { @ApiModelProperty("templateId 编辑时预览用") private Long templateId; - @NotEmpty(message = "shoulderLeft cannot be empty!") + @NotEmpty(message = "shoulderLeft.cannot.be.empty") @ApiModelProperty("左肩 数组传类似 [0.2, 0.2]") private List shoulderLeft; - @NotEmpty(message = "shoulderRight cannot be empty!") + @NotEmpty(message = "shoulderRight.cannot.be.empty") @ApiModelProperty("右肩 数组传类似 [0.2, 0.2]") private List shoulderRight; - @NotEmpty(message = "waistbandLeft cannot be empty!") + @NotEmpty(message = "waistbandLeft.cannot.be.empty") @ApiModelProperty("左腰 数组传类似 [0.2, 0.2]") private List waistbandLeft; - @NotEmpty(message = "waistbandRight cannot be empty!") + @NotEmpty(message = "waistbandRight.cannot.be.empty") @ApiModelProperty("右腰 数组传类似 [0.2, 0.2]") private List waistbandRight; - @NotEmpty(message = "handLeft cannot be empty!") + @NotEmpty(message = "handLeft.cannot.be.empty") @ApiModelProperty("左手 数组传类似 [0.2, 0.2]") private List handLeft; - @NotEmpty(message = "handRight cannot be empty!") + @NotEmpty(message = "handRight.cannot.be.empty") @ApiModelProperty("右手 数组传类似 [0.2, 0.2]") private List handRight; - @NotBlank(message = "timeZone cannot be empty!") + @NotBlank(message = "timeZone.cannot.be.empty") @ApiModelProperty("本地时区,比如 'Asia/Tokyo' 东京时间 , 'Asia/Shanghai' 北京时间 由js本地获取") private String timeZone; /** diff --git a/src/main/java/com/ai/da/model/dto/NoteSendDTO.java b/src/main/java/com/ai/da/model/dto/NoteSendDTO.java index 829acf2d..ccfef6a6 100644 --- a/src/main/java/com/ai/da/model/dto/NoteSendDTO.java +++ b/src/main/java/com/ai/da/model/dto/NoteSendDTO.java @@ -10,15 +10,15 @@ import javax.validation.constraints.NotBlank; @ApiModel("短信发送") public class NoteSendDTO { - @NotBlank(message = " 手机[区域/国家]号不能为空!") + @NotBlank(message = "regionNum.cannot.be.empty") @ApiModelProperty("[区域/国家]号 示例如 852 香港 不支持中国") private String regionNum; - @NotBlank(message = "手机号不能为空!") + @NotBlank(message = "phone.cannot.be.empty") @ApiModelProperty("手机号") private String phone; - @NotBlank(message = "操作类型不能为空!") + @NotBlank(message = "operationType.cannot.be.empty") @ApiModelProperty("操作类型 LOGIN 登入 FORGET_PWD 忘记密码") private String operationType; diff --git a/src/main/java/com/ai/da/model/dto/QueryLibraryPageDTO.java b/src/main/java/com/ai/da/model/dto/QueryLibraryPageDTO.java index 785e6424..ff668e18 100644 --- a/src/main/java/com/ai/da/model/dto/QueryLibraryPageDTO.java +++ b/src/main/java/com/ai/da/model/dto/QueryLibraryPageDTO.java @@ -11,7 +11,7 @@ import javax.validation.constraints.NotBlank; @ApiModel("Library分页查询") public class QueryLibraryPageDTO extends PageQueryBaseVo { - @NotBlank(message = "level1Type cannot be empty!") + @NotBlank(message = "level1Type.cannot.be.empty") @ApiModelProperty("一级类型") private String level1Type; diff --git a/src/main/java/com/ai/da/model/dto/QueryLibraryTopPageDTO.java b/src/main/java/com/ai/da/model/dto/QueryLibraryTopPageDTO.java index 04675325..5a894dcd 100644 --- a/src/main/java/com/ai/da/model/dto/QueryLibraryTopPageDTO.java +++ b/src/main/java/com/ai/da/model/dto/QueryLibraryTopPageDTO.java @@ -11,7 +11,7 @@ import javax.validation.constraints.NotBlank; @ApiModel("LibraryTop分页查询") public class QueryLibraryTopPageDTO extends PageQueryBaseVo { - @NotBlank(message = "type cannot be empty!") + @NotBlank(message = "type.cannot.be.empty") @ApiModelProperty("类型 Top , Bottom ,Print ") private String type; diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 00b195a4..0f15a21d 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -89,13 +89,10 @@ public class PythonService { response = client.newCall(request).execute(); } catch (IOException ioException) { log.error("PythonService##generatePrint异常###{}", ExceptionUtil.getThrowableList(ioException)); + throw new BusinessException("generate.interface.exception"); } //去除限流 AccessLimitUtils.validateOut("generatePrint"); - if (Objects.isNull(response)) { - log.error("PythonService##generatePrint异常###{}", "response or body is empty!"); - throw new BusinessException("generate print exception!"); - } JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(response)); Boolean result = jsonObject.getBoolean("successful"); if (result) { @@ -103,7 +100,7 @@ public class PythonService { } log.info("生成印花失败###{}", jsonObject); //生成失败 - throw new BusinessException("generate print exception!"); + throw new BusinessException("generate.interface.exception"); } /** diff --git a/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java b/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java index 51b2dc04..7caf3c5d 100644 --- a/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/CollectionElementServiceImpl.java @@ -84,8 +84,9 @@ public class CollectionElementServiceImpl extends ServiceImpl printPath = Arrays.asList(url1, url2); //调取python 接口 String generateUrl = pythonService.generatePrint(printPath); - Assert.isTrue(!StringUtils.isEmpty(generateUrl), "generate print exception!"); + if (StringUtils.isEmpty(generateUrl)) { + throw new BusinessException("generate.print.exception"); + } //用户信息 AuthPrincipalVo userInfo = UserContext.getUserHolder(); CollectionElement element = resolveData(generateUrl, generatePrintDTO.getTimeZone(), userInfo); if (!this.save(element)) { - throw new BusinessException("generate print failed !"); + throw new BusinessException("generate.print.failed"); } CollectionGeneratePrintVO collectionGeneratePrint = CopyUtil.copyObject(element, CollectionGeneratePrintVO.class); collectionGeneratePrint.setDesignType(DesignTypeEnum.COLLECTION.getRealName()); @@ -213,7 +223,9 @@ public class CollectionElementServiceImpl extends ServiceImpl elements = listByIds(savePrintDTO.getPrintId()); - Assert.notEmpty(elements, "print file does not exist!"); + if (CollectionUtils.isEmpty(elements)) { + throw new BusinessException("collectionElements.not.found"); + } return saveLibraryByCollectionElement(elements, savePrintDTO.getTimeZone()); } @@ -241,7 +253,7 @@ public class CollectionElementServiceImpl extends ServiceImpl printBoardElements = collectionElementMapper.selectBatchIds(printBoardIds); - Assert.isTrue(CollectionUtil.isNotEmpty(printBoardElements) - && printBoardElements.size() == printBoardIds.size(), "get.printBoards.data.is.mismatch"); + if (CollectionUtil.isEmpty(printBoardElements) || printBoardElements.size() != printBoardIds.size()) { + throw new BusinessException("get.printBoards.data.is.mismatch"); + } elementVO.setPrintBoardElements(printBoardElements); usedElementIds.addAll(printBoardIds); } @@ -426,8 +439,9 @@ public class CollectionElementServiceImpl extends ServiceImpl sketchBoardElements = collectionElementMapper.selectBatchIds(sketchBoardIds); - Assert.isTrue(CollectionUtil.isNotEmpty(sketchBoardElements) - && sketchBoardElements.size() == sketchBoardIds.size(), "get.sketchBoards.data.is.mismatch"); + if (CollectionUtil.isEmpty(sketchBoardElements) || sketchBoardElements.size() != sketchBoardIds.size()) { + throw new BusinessException("get.sketchBoards.data.is.mismatch"); + } elementVO.setSketchBoardElements(sketchBoardElements); usedElementIds.addAll(sketchBoardIds); } @@ -652,7 +666,7 @@ public class CollectionElementServiceImpl extends ServiceImpl colorElements = resolveColorData(colorBoards, userInfo, collectionId, timeZone); if (!this.saveBatch(colorElements)) { - throw new BusinessException("Batch saving color board failed !"); + throw new BusinessException("batch.save.colorElements.failed"); } return CopyUtil.copyList(colorElements, CollectionElementVO.class); } @@ -691,8 +705,6 @@ public class CollectionElementServiceImpl extends ServiceImpl resolveColorData(List colorBoards, AuthPrincipalVo userInfo, Long collectionId, String timeZone) { List elements = Lists.newArrayList(); colorBoards.forEach(color -> { - Assert.isTrue(!StringUtils.isEmpty(color), "The elements of the saved color cannot be empty!"); - CollectionElement element = new CollectionElement(); element.setAccountId(userInfo.getId()); element.setCollectionId(collectionId); diff --git a/src/main/java/com/ai/da/service/impl/CollectionServiceImpl.java b/src/main/java/com/ai/da/service/impl/CollectionServiceImpl.java index 1fea28a7..3b56bba9 100644 --- a/src/main/java/com/ai/da/service/impl/CollectionServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/CollectionServiceImpl.java @@ -24,6 +24,7 @@ import io.netty.util.internal.StringUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.util.List; @@ -55,7 +56,7 @@ public class CollectionServiceImpl extends ServiceImpl collectionElements = collectionElementService.getByCollectionId(id); - Assert.notEmpty(collectionElements, "collection element does not exist!"); + if (CollectionUtils.isEmpty(collectionElements)) { + throw new BusinessException("collectionElements.not.found"); + } response.setCollectionId(id); response.setMoodTemplateId(collection.getMoodTemplateId()); if (collection.getMoodTemplateId() != null) { @@ -86,7 +91,9 @@ public class CollectionServiceImpl extends ServiceImpl { CollectionLevel1TypeEnum level1TypeEnum = CollectionLevel1TypeEnum.uploadOf(k); - Assert.notNull(level1TypeEnum, "unknown level1TypeEnum!"); + if (Objects.isNull(level1TypeEnum)) { + throw new BusinessException("unknown.level1TypeEnum"); + } switch (level1TypeEnum) { case MOOD_BOARD: response.setMoodBoards(CopyUtil.copyList(v, CollectionElementVO.class, (o, d) -> { diff --git a/src/main/java/com/ai/da/service/impl/DesignItemDetailServiceImpl.java b/src/main/java/com/ai/da/service/impl/DesignItemDetailServiceImpl.java index ef5b410d..07d5669d 100644 --- a/src/main/java/com/ai/da/service/impl/DesignItemDetailServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/DesignItemDetailServiceImpl.java @@ -72,7 +72,7 @@ public class DesignItemDetailServiceImpl extends ServiceImpl operateTypes = Arrays.asList("PREV", "NEXT"); if (!operateTypes.contains(operateType)) { - throw new BusinessException("unknown operateType! "); + throw new BusinessException("unknown.operateType"); + } + if (null == id) { + throw new BusinessException("id.cannot.be.empty"); } - Assert.notNull(id, "id cannot be empty!"); Long maxId = sysFileService.getMaxIdByLevel2Type(level2Type, null); Long minId = sysFileService.getMinIdByLevel2Type(level2Type, null); if (id > maxId || id < minId) { - throw new BusinessException("The id value is out of range!"); + throw new BusinessException("the.id.value.is.out.of.range"); } Long idValue = null; if ("PREV".equals(operateType)) { @@ -157,16 +159,24 @@ public class DesignItemServiceImpl extends ServiceImpl newTypes = designSingleDTO.getClothes().stream().map(DesignSingleItemDTO::getType).collect(Collectors.toSet()); @@ -223,11 +241,11 @@ public class DesignItemServiceImpl extends ServiceImpl newTypes, String singleOverall, String switchCategory) { if (SingleOverallEnum.SINGLE.getRealName().equals(singleOverall)) { if (newTypes.size() > 1) { - throw new BusinessException("Wrong clothes type !"); + throw new BusinessException("wrong.clothes.type"); } //一个的时候 if (!switchCategory.equals(CollectionUtil.newArrayList(newTypes).get(0))) { - throw new BusinessException("Wrong clothes type !"); + throw new BusinessException("wrong.clothes.type"); } } } @@ -385,9 +403,13 @@ public class DesignItemServiceImpl extends ServiceImpl impleme response.setDesignCollectionItems(designCollectionItems); JSONObject data = responseJSONObject.getJSONObject("data"); if (data == null) { - throw new BusinessException("python response data is null"); + throw new BusinessException("design.interface.exception"); } for (int i = 0; i < pythonObjects.getObjects().size(); i++) { DesignPythonObject item = pythonObjects.getObjects().get(i); @@ -486,7 +486,7 @@ public class DesignServiceImpl extends ServiceImpl impleme if (!StringUtils.isEmpty(synthesisUrl)) { designPythonOutfit.setDesignUrl(synthesisUrl); } else { - throw new BusinessException("design python response synthesis_url is null"); + throw new BusinessException("design.interface.exception"); } designPythonOutfitService.save(designPythonOutfit); JSONArray layers = outfit.getJSONArray("layers"); @@ -629,7 +629,7 @@ public class DesignServiceImpl extends ServiceImpl impleme //校验collection Collection collection = collectionService.getById(reDesignDTO.getCollectionId()); if (Objects.isNull(collection)) { - throw new BusinessException("collection.not.find"); + throw new BusinessException("collection.not.found"); } AuthPrincipalVo userInfo = UserContext.getUserHolder(); //查询用户 sketch library @@ -670,7 +670,7 @@ public class DesignServiceImpl extends ServiceImpl impleme public DesignCollectionVO designItemList(Long designId) { Design design = baseMapper.selectById(designId); if (Objects.isNull(design)) { - throw new BusinessException("design.not.find"); + throw new BusinessException("design.not.found"); } List designItems = designItemService.getByDesignId(designId); if (CollectionUtils.isEmpty(designItems)) { @@ -695,14 +695,14 @@ public class DesignServiceImpl extends ServiceImpl impleme AuthPrincipalVo userInfo = UserContext.getUserHolder(); DesignItem designItem = designItemService.getById(designLikeDTO.getDesignItemId()); if (Objects.isNull(designItem)) { - throw new BusinessException("designItem.not.find"); + throw new BusinessException("designItem.not.found"); } String pictureName = null; UserLike userLike; if (Objects.nonNull(userGroupId)) { UserLikeGroup userLikeGroup = userLikeGroupService.getById(userGroupId); if (Objects.isNull(userLikeGroup)) { - throw new BusinessException("userLikeGroup.not.find"); + throw new BusinessException("userLikeGroup.not.found"); } // if(designItem.getCollectionId().equals(userLikeGroup.getCollectionId())){ // //相同collection直接跳过 不需要往element加元素 @@ -710,11 +710,11 @@ public class DesignServiceImpl extends ServiceImpl impleme // } List oldElements = collectionElementService.getByCollectionId(userLikeGroup.getCollectionId()); if (CollectionUtil.isEmpty(oldElements)) { - throw new BusinessException("old.elements.not.find"); + throw new BusinessException("old.elements.not.found"); } List designItemDetails = designItemDetailService.selectByDesignItemId(designLikeDTO.getDesignItemId()); if (CollectionUtil.isEmpty(designItemDetails)) { - throw new BusinessException("new.designItemDetails.not.find"); + throw new BusinessException("new.designItemDetails.not.found"); } //判断老的element合并到新的是否满足 数量不超过15 List newElementIds = validateMergeElement(oldElements, designItemDetails); @@ -810,9 +810,13 @@ public class DesignServiceImpl extends ServiceImpl impleme public Boolean dislike(DisDesignLikeDTO disDesignLikeDTO) { AuthPrincipalVo userInfo = UserContext.getUserHolder(); UserLike userLike = userLikeService.getById(disDesignLikeDTO.getGroupDetailId()); - Assert.notNull(userLike, "History detail does not exist!"); + if (Objects.isNull(userLike)) { + throw new BusinessException("history.detail.not.found"); + } Design design = getById(disDesignLikeDTO.getDesignId()); - Assert.notNull(design, "design does not exist!"); + if (Objects.isNull(design)) { + throw new BusinessException("design.detail.not.found"); + } if (!userLike.getDesignId().equals(disDesignLikeDTO.getDesignId())) { //不是相同的design不会合并 return Boolean.TRUE; @@ -858,17 +862,25 @@ public class DesignServiceImpl extends ServiceImpl impleme @Override public DesignItemDetailVO detail(Long designPythonOutfitId, Long designItemId) { DesignItem designItem = designItemService.getById(designItemId); - Assert.notNull(designItem, "design item does not exist!"); + if (Objects.isNull(designItem)) { + throw new BusinessException("designItem.not.found"); + } Design design = getById(designItem.getDesignId()); - Assert.notNull(design, "design does not exist!"); + if (Objects.isNull(design)) { + throw new BusinessException("design.not.found"); + } List designItemDetails = designItemDetailService.selectByDesignItemId(designItemId); - Assert.notEmpty(designItemDetails, "designItemDetails does not exist!"); + if (CollectionUtil.isEmpty(designItemDetails)) { + throw new BusinessException("designItemDetails.not.found"); + } // 添加判断designPythonOutfitId是否存在 TDesignPythonOutfit designPythonOutfit = new TDesignPythonOutfit(); Boolean flag = Boolean.FALSE; if (Objects.nonNull(designPythonOutfitId)) { designPythonOutfit = designPythonOutfitService.getById(designPythonOutfitId); - Assert.notNull(designPythonOutfit, "designPythonOutfit does not exist!"); + if (Objects.isNull(designPythonOutfit)) { + throw new BusinessException("designPythonOutfit.not.found"); + } flag = Boolean.TRUE; } @@ -998,7 +1010,7 @@ public class DesignServiceImpl extends ServiceImpl impleme design.setCollectionId(collectionId); design.setAccountId(accountId); if (designMapper.insert(design) <= 0) { - throw new BusinessException("save design failed!"); + throw new BusinessException("save.design.failed"); } return design.getId(); } diff --git a/src/main/java/com/ai/da/service/impl/LibraryModelPointServiceImpl.java b/src/main/java/com/ai/da/service/impl/LibraryModelPointServiceImpl.java index 07b06de1..5b196da1 100644 --- a/src/main/java/com/ai/da/service/impl/LibraryModelPointServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/LibraryModelPointServiceImpl.java @@ -71,7 +71,9 @@ public class LibraryModelPointServiceImpl extends ServiceImpl libraryModelPoints = baseMapper.selectList(queryWrapper); if (CollectionUtil.isEmpty(libraryModelPoints)) { - throw new BusinessException("modelPoint.not.find"); + throw new BusinessException("modelPoint.not.found"); } return libraryModelPoints.get(0); } diff --git a/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java b/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java index 7785f464..6b9aa21c 100644 --- a/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/LibraryServiceImpl.java @@ -20,6 +20,7 @@ import com.ai.da.python.vo.ModelPathObject; import com.ai.da.service.LibraryModelPointService; import com.ai.da.service.LibraryService; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.serializer.SerializerFeature; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -89,7 +90,9 @@ public class LibraryServiceImpl extends ServiceImpl impl if (!StringUtils.isEmpty(query.getLevel1Type())) { LibraryLevel1TypeEnum level1TypeEnum = LibraryLevel1TypeEnum.uploadOf(query.getLevel1Type()); - Assert.notNull(level1TypeEnum, "unknown level1Type " + query.getLevel1Type()); + if (Objects.isNull(level1TypeEnum)) { + throw new BusinessException("unknown.parameter.level1Type"); + } queryWrapper.eq("level1_type", query.getLevel1Type()); } if (!StringUtils.isEmpty(query.getModelSex()) && query.getLevel1Type().equals(LibraryLevel1TypeEnum.SKETCH_BOARD.getRealName())) { @@ -97,7 +100,9 @@ public class LibraryServiceImpl extends ServiceImpl impl } if (!StringUtils.isEmpty(query.getLevel2Type())) { CollectionLevel2TypeEnum level2TypeEnum = CollectionLevel2TypeEnum.of(query.getLevel2Type()); - Assert.notNull(level2TypeEnum, "unknown level2Type " + query.getLevel2Type()); + if (Objects.isNull(level2TypeEnum)) { + throw new BusinessException("unknown.parameter.level2Type"); + } queryWrapper.eq("level2_type", query.getLevel2Type()); } if (!StringUtils.isEmpty(query.getType())) { @@ -156,13 +161,18 @@ public class LibraryServiceImpl extends ServiceImpl impl //用户信息 AuthPrincipalVo userInfo = UserContext.getUserHolder(); LibraryLevel1TypeEnum level1TypeEnum = LibraryLevel1TypeEnum.uploadOf(libraryUploadDTO.getLevel1Type()); - Assert.notNull(level1TypeEnum, "unknown parameter level1Type!"); + if (Objects.isNull(level1TypeEnum)) { + throw new BusinessException("unknown.parameter.level1Type"); + } if (!StringUtils.isEmpty(libraryUploadDTO.getLevel2Type())) { CollectionLevel2TypeEnum level2TypeEnum = CollectionLevel2TypeEnum.of(libraryUploadDTO.getLevel2Type()); - Assert.notNull(level2TypeEnum, "unknown parameter level2Type!"); + if (Objects.isNull(level2TypeEnum)) { + throw new BusinessException("unknown.parameter.level2Type"); + } + } + if (!StringUtils.isEmpty(libraryUploadDTO.getLevel2Type()) || level1TypeEnum.equals(LibraryLevel1TypeEnum.SKETCH_BOARD)) { + throw new BusinessException("level2Type.cannot.be.empty"); } - Assert.isTrue(!(level1TypeEnum.equals(LibraryLevel1TypeEnum.SKETCH_BOARD) - && StringUtils.isEmpty(libraryUploadDTO.getLevel2Type())), "level2Type cannot be empty!"); String path = calculateFileUrl(level1TypeEnum, libraryUploadDTO.getLevel2Type(), libraryUploadDTO.getModelSex(), userInfo.getId()); String bucketName = null; switch (level1TypeEnum) { @@ -173,9 +183,10 @@ public class LibraryServiceImpl extends ServiceImpl impl bucketName = users; break; case MARKETING_SKETCH: - throw new BusinessException("MARKETING_SKETCH type have been removed"); + // 走不到 + throw new BusinessException("MARKETING_SKETCH.type.have.been.removed"); default: - throw new BusinessException("unknown level1_type"); + throw new BusinessException("unknown.level1TypeEnum"); } //保存element元素 if (!StringUtils.isEmpty(libraryUploadDTO.getModelType())) { @@ -200,7 +211,7 @@ public class LibraryServiceImpl extends ServiceImpl impl libraryUpdateVo.setCheckMd5(Boolean.TRUE); return libraryUpdateVo; } else { - throw new BusinessException("unknown modelType"); + throw new BusinessException("unknown.modelType"); } } else { String filePath = minioUtil.upload(bucketName, path, libraryUploadDTO.getFile()); @@ -241,25 +252,26 @@ public class LibraryServiceImpl extends ServiceImpl impl response = client.newCall(request).execute(); } catch (IOException ioException) { log.error("PythonService##processMannequins异常###{}", ExceptionUtil.getThrowableList(ioException)); + throw new BusinessException("processMannequins.interface.exception"); } //去除限流 // AccessLimitUtils.validateOut("design"); - if (Objects.isNull(response)) { - log.error("PythonService##processMannequins异常###{}", "response or body is empty!"); - throw new BusinessException("system error!"); - } if (response.isSuccessful()) { try { + if (Objects.isNull(response.body())) { + throw new BusinessException("processMannequins.interface.exception"); + } String responseBody = response.body().string(); JSONObject responseObject = JSON.parseObject(responseBody); String newMinioPath = responseObject.getString("data"); return newMinioPath; - } catch (IOException e) { - throw new RuntimeException(e); + } catch (IOException | JSONException e) { + log.error(e.getMessage()); + throw new BusinessException("processMannequins.interface.exception"); } } //生成失败 - throw new BusinessException("generate design exception!"); + throw new BusinessException("processMannequins.interface.exception"); } @Override @@ -315,7 +327,7 @@ public class LibraryServiceImpl extends ServiceImpl impl library.setUrl(sysFile.getUrl()); return library; } else { - throw new BusinessException("system error!"); + throw new BusinessException("system.error"); } } @@ -330,7 +342,9 @@ public class LibraryServiceImpl extends ServiceImpl impl @Override public void updateLibraryName(LibraryUpdateDTO libraryUpdateDTO) { List librarys = getByIds(libraryUpdateDTO.getLibraryIds()); - Assert.notEmpty(librarys, "Librarys does not exist!"); + if (CollectionUtils.isEmpty(librarys)) { + throw new BusinessException("librarys.not.found"); + } QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.in("id", libraryUpdateDTO.getLibraryIds()); Library library1 = new Library(); @@ -385,7 +399,7 @@ public class LibraryServiceImpl extends ServiceImpl impl private boolean saveOne(Library library) { if (libraryMapper.insert(library) <= 0) { - throw new BusinessException("save failed!"); + throw new BusinessException("save.library.failed"); } return Boolean.TRUE; } diff --git a/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java b/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java index f02f1070..1b09e1de 100644 --- a/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/PanToneServiceImpl.java @@ -45,7 +45,7 @@ public class PanToneServiceImpl extends ServiceImpl impl queryWrapper.eq("pantone_index", colorLookupTable.getColorIndex()); PanTone panTone = panToneMapper.selectOne(queryWrapper); if (Objects.isNull(panTone)) { - throw new BusinessException("Pantone value does not exist !"); + throw new BusinessException("pantone.not.found"); } return coverPanToneToVo(panTone); } @@ -56,7 +56,7 @@ public class PanToneServiceImpl extends ServiceImpl impl queryWrapper.eq("tcx", txc); List panTones = panToneMapper.selectList(queryWrapper); if (CollectionUtil.isEmpty(panTones)) { - throw new BusinessException("Pantone value does not exist !"); + throw new BusinessException("panTones.not.found"); } return coverPanToneToVo(panTones.get(0)); } @@ -140,7 +140,7 @@ public class PanToneServiceImpl extends ServiceImpl impl @Override public List getRgbByHsvBatch(List hsvBatch) { if (hsvBatch.size() > 8) { - throw new BusinessException("hsv value cannot exceed the maximum of 8"); + throw new BusinessException("hsv.value.cannot.exceed.the.maximum.of.8"); } List colorValues = Lists.newArrayList(); Map valueToHsv = Maps.newHashMap(); @@ -183,7 +183,7 @@ public class PanToneServiceImpl extends ServiceImpl impl , Map indexToValue, Map valueToHsv, List hsvBatch) { if (CollectionUtil.isEmpty(panTones)) { - throw new BusinessException("Pantone value does not exist !"); + throw new BusinessException("panTones.not.found"); } List templateResposne = CopyUtil.copyList(panTones, PantoneVO.class, (o, d) -> { d.setId(o.getPantoneIndex()); diff --git a/src/main/java/com/ai/da/service/impl/PythonTAllInfoServiceImpl.java b/src/main/java/com/ai/da/service/impl/PythonTAllInfoServiceImpl.java index 1360689a..9364ecb1 100644 --- a/src/main/java/com/ai/da/service/impl/PythonTAllInfoServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/PythonTAllInfoServiceImpl.java @@ -31,7 +31,7 @@ public class PythonTAllInfoServiceImpl extends ServiceImpl qw = new QueryWrapper<>(); qw.lambda().eq(PythonTAllInfo::getImagePath, path); @@ -44,7 +44,7 @@ public class PythonTAllInfoServiceImpl extends ServiceImpl impl sysFile.setMd5(MD5Utils.encryptFile(inputStream)); } catch (IOException ioException) { log.info("initSysFile 文件异常###{}", ExceptionUtil.getThrowableList(ioException)); - throw new BusinessException("initSysFile ioException"); + throw new BusinessException("initSysFile.ioException"); } String linuxDomain = fileProperties.getLinuxDomain(); if (!StringUtils.isEmpty(linuxDomain)) { @@ -249,7 +249,7 @@ public class SysFileServiceImpl extends ServiceImpl impl private boolean saveMany(List sysFiles) { if (!this.saveBatch(sysFiles)) { - throw new BusinessException("save system file failed!"); + throw new BusinessException("save.sysFile.failed"); } return Boolean.TRUE; } diff --git a/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java b/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java index 25fd4b2b..5a8c8017 100644 --- a/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/UserLikeGroupServiceImpl.java @@ -1,6 +1,7 @@ package com.ai.da.service.impl; import cn.hutool.core.collection.CollectionUtil; +import com.ai.da.common.config.exception.BusinessException; import com.ai.da.common.context.UserContext; import com.ai.da.common.utils.CopyUtil; import com.ai.da.common.utils.DateUtil; @@ -24,6 +25,7 @@ import org.springframework.util.Assert; import javax.annotation.Resource; import java.util.Date; import java.util.List; +import java.util.Objects; import java.util.TimeZone; /** @@ -53,14 +55,18 @@ public class UserLikeGroupServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("id", userGroupId); UserLikeGroup userLikeGroup = new UserLikeGroup(); @@ -104,7 +110,9 @@ public class UserLikeGroupServiceImpl extends ServiceImpl userLikeVOS = userLikeService.getGroupDetail(userGroupId); userLikeVOS.forEach(o -> { TDesignPythonOutfit tDesignPythonOutfit1 = designPythonOutfitMapper.selectById(o.getDesignOutfitId()); diff --git a/src/main/java/com/ai/da/service/impl/WorkspaceServiceImpl.java b/src/main/java/com/ai/da/service/impl/WorkspaceServiceImpl.java index 0758f2c9..06436572 100644 --- a/src/main/java/com/ai/da/service/impl/WorkspaceServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/WorkspaceServiceImpl.java @@ -34,6 +34,7 @@ import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import org.springframework.web.multipart.MultipartFile; @@ -115,13 +116,13 @@ public class WorkspaceServiceImpl extends ServiceImpl workspaces = baseMapper.selectList(qw); if (!CollectionUtils.isEmpty(workspaces)) { - throw new BusinessException("The workspace name already exists!"); + throw new BusinessException("the.workspaceName.already.exists"); } } @@ -172,7 +173,7 @@ public class WorkspaceServiceImpl extends ServiceImpl(query.getPage(), query.getSize()), qw); IPage convert = page.convert( @@ -226,7 +227,7 @@ public class WorkspaceServiceImpl extends ServiceImpl workspaces = workspaceMapper.selectList(qwIsLastIndex); if (CollectionUtils.isEmpty(workspaces)) { - throw new BusinessException("用户工作空间未查询到最后使用标识"); + throw new BusinessException("the.workspace.lastIndex.not.found"); } vo.setId(workspaces.get(0).getId()); return vo; @@ -238,7 +239,8 @@ public class WorkspaceServiceImpl extends ServiceImpl workspaces = workspaceMapper.selectList(qw); if (!CollectionUtils.isEmpty(workspaces)) { - throw new BusinessException("Unable to delete the workspace you last used"); + throw new BusinessException("unable.to.delete.the.workspace.you.are.currently.using"); } workspaceMapper.deleteBatchIds(deleteIds); return deleteIds; diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 4dd4870a..8abbcdd6 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -1,5 +1,6 @@ # 业务逻辑 system.error=System error! +system.busy=System busy! userName.does.not.exist=UserName does not exist! user.expired=User expired! password.error=Password error! @@ -16,40 +17,109 @@ get.moodBoards.data.is.mismatch=Get moodBoards data is mismatch! get.printBoards.data.is.mismatch=Get printBoards data is mismatch! get.sketchBoards.data.is.mismatch=Get sketchBoards data is mismatch! the.number.of.PIN.top.or.bottom.or.outerwear.sketchBoard.cannot.be.more.than.8=The number of PIN top or bottom or outerwear sketchBoard cannot be more than 8! -modelPoint.not.find=ModelPoint not find! +modelPoint.not.found=ModelPoint not found! attributeRetrieval.interface.exception=AttributeRetrieval interface exception, please try again later! If still failed after trying again please contact administrator! design.interface.exception=Design interface exception, please try again later! If still failed after trying again please contact administrator! +processMannequins.interface.exception=ProcessMannequins interface exception, please try again later! If still failed after trying again please contact administrator! designProcess.interface.exception=DesignProcess interface exception, please try again later! If still failed after trying again please contact administrator! -collection.not.find=Collection not find! -design.not.find=Design not find! -designItem.not.find=DesignItem not find! -userLikeGroup.not.find=UserLikeGroup not find! -oldElements.not.find=OldElements not find! - +collection.not.found=Collection not found! +design.not.found=Design not found! +designItem.not.found=DesignItem not found! +userLikeGroup.not.found=UserLikeGroup not found! +old.elements.not.found=Old elements not found! +new.designItemDetails.not.found=New designItemDetails not found! +save.workspace.failed=Save workspace failed! +save.design.failed=Save design failed! +update.workspace.failed=Update workspace failed! +the.workspace.lastIndex.not.found=The workspace lastIndex not found! +the.workspaceName.already.exists=The workspaceName already exists! +unable.to.delete.the.workspace.you.are.currently.using=Unable to delete the workspace you are currently using! +enumeration.class.not.found=Enumeration class not found! +history.detail.not.found=History detail not found! +designItemDetails.not.found=DesignItemDetails not found! +designPythonOutfit.not.found=DesignPythonOutfit not found! +unknown.parameter.level1Type=Unknown parameter level1Type! +collectionElement.not.found=collectionElement not found! +select1.file.does.not.exist=Select1 file does not exist! +select2.file.does.not.exist=Select2 file does not exist! +generate.print.exception=Generate print exception! +generate.print.failed=Generate print failed! +collectionElements.not.found=CollectionElements not found! +batch.save.libraryList.failed=Batch save libraryList failed! +panTones.not.found=PanTones not found! +hsv.value.cannot.exceed.the.maximum.of.8=Hsv value cannot exceed the maximum of 8! +save.designItem.failed=Save designItem failed! +unknown.type=Unknown type! +unknown.operateType=Unknown operateType! +unknown.level1TypeEnum=Unknown level1TypeEnum! +the.id.value.is.out.of.range=The id value is out of range! +library.not.found=Library not found! +wrong.clothes.type=Wrong clothes type! +sysFile.not.found=SysFile not found! +librarys.not.found=Librarys not found! +groupDetails.not.found=GroupDetails not found! +history.not.found=History not found! +unknown.parameter.level2Type=Unknown parameter level2Type! +MARKETING_SKETCH.type.have.been.removed=MARKETING_SKETCH type have been removed! +unknown.modelType=Unknown modelType! +save.library.failed=Save library failed! # 前端传参校验 -singleOverall.cannot.be.empty=SingleOverall cannot be empty! -colorBoards.cannot.be.empty=ColorBoards cannot be empty! -systemScale.cannot.be.empty=SystemScale cannot be empty! -modelType.cannot.be.empty=ModelType cannot be empty! -modelSex.cannot.be.empty=ModelSex cannot be empty! -templateId.cannot.be.empty=TemplateId cannot be empty! -processId.cannot.be.empty=ProcessId cannot be empty! -timeZone.cannot.be.empty=TimeZone cannot be empty! -userId.cannot.be.empty=UserId cannot be empty! -email.cannot.be.empty=Email cannot be empty! -operationType.cannot.be.empty=OperationType cannot be empty! -password.cannot.be.empty=Password cannot be empty! -emailVerifyCode.cannot.be.empty=EmailVerifyCode cannot be empty! -loginType.cannot.be.empty=LoginType cannot be empty! -userName.cannot.be.empty=UserName cannot be empty! -operationType.cannot.be.empty=OperationType cannot be empty! -sketchBoards.designType.cannot.be.empty=SketchBoards designType cannot be empty! -moodBoards.designType.cannot.be.empty=MoodBoards designType cannot be empty! -printBoards.designType.cannot.be.empty=PrintBoards designType cannot be empty! -unknown.parameter.singleOverall=Unknown parameter singleOverall! -unknown.parameter.switchCategory=Unknown parameter switchCategory! -collectionId.cannot.be.empty=CollectionId cannot be empty! -designPythonOutfitId.cannot.be.empty=DesignPythonOutfitId cannot be empty! -designItemId.cannot.be.empty=DesignItemId cannot be empty! -designId.cannot.be.empty=DesignId cannot be empty! -groupDetailId.cannot.be.empty=GroupDetailId cannot be empty! \ No newline at end of file +singleOverall.cannot.be.empty=singleOverall cannot be empty! +colorBoards.cannot.be.empty=colorBoards cannot be empty! +systemScale.cannot.be.empty=systemScale cannot be empty! +modelType.cannot.be.empty=modelType cannot be empty! +modelSex.cannot.be.empty=modelSex cannot be empty! +templateId.cannot.be.empty=templateId cannot be empty! +processId.cannot.be.empty=processId cannot be empty! +timeZone.cannot.be.empty=timeZone cannot be empty! +userId.cannot.be.empty=userId cannot be empty! +email.cannot.be.empty=email cannot be empty! +operationType.cannot.be.empty=operationType cannot be empty! +password.cannot.be.empty=password cannot be empty! +emailVerifyCode.cannot.be.empty=emailVerifyCode cannot be empty! +loginType.cannot.be.empty=loginType cannot be empty! +userName.cannot.be.empty=userName cannot be empty! +sketchBoards.designType.cannot.be.empty=sketchBoards designType cannot be empty! +moodBoards.designType.cannot.be.empty=moodBoards designType cannot be empty! +printBoards.designType.cannot.be.empty=printBoards designType cannot be empty! +unknown.parameter.singleOverall=unknown parameter singleOverall! +unknown.parameter.switchCategory=unknown parameter switchCategory! +collectionId.cannot.be.empty=collectionId cannot be empty! +designPythonOutfitId.cannot.be.empty=designPythonOutfitId cannot be empty! +designItemId.cannot.be.empty=designItemId cannot be empty! +designId.cannot.be.empty=designId cannot be empty! +groupDetailId.cannot.be.empty=groupDetailId cannot be empty! +validStartTime.cannot.be.empty=validStartTime cannot be empty! +validEndTime.cannot.be.empty=validEndTime cannot be empty! +user_id.cannot.be.empty=user_id cannot be empty! +session_id.cannot.be.empty=session_id cannot be empty! +rgbValue.cannot.be.empty=rgbValue cannot be empty! +file.cannot.be.empty=file cannot be empty! +select1Id.cannot.be.empty=select1Id cannot be empty! +select2Id.cannot.be.empty=select2Id cannot be empty! +isPin.cannot.be.empty=isPin cannot be empty! +designType.cannot.be.empty=designType cannot be empty! +priority.cannot.be.empty=priority cannot be empty! +clothes.cannot.be.empty=clothes cannot be empty! +isPreview.cannot.be.empty=isPreview cannot be empty! +h.cannot.be.empty=h cannot be empty! +s.cannot.be.empty=s cannot be empty! +v.cannot.be.empty=v cannot be empty! +userGroupId.cannot.be.empty=userGroupId cannot be empty! +userGroupName.cannot.be.empty=userGroupName cannot be empty! +libraryId.cannot.be.empty=libraryId cannot be empty! +shoulderLeft.cannot.be.empty=shoulderLeft cannot be empty! +shoulderRight.cannot.be.empty=shoulderRight cannot be empty! +waistbandLeft.cannot.be.empty=waistbandLeft cannot be empty! +waistbandRight.cannot.be.empty=waistbandRight cannot be empty! +handLeft.cannot.be.empty=handLeft cannot be empty! +handRight.cannot.be.empty=handRight cannot be empty! +id.cannot.be.empty=id cannot be empty! +type.cannot.be.empty=type cannot be empty! +color.cannot.be.empty=color cannot be empty! +generateDetailId.cannot.be.empty=generateDetailId cannot be empty! +level1Type.cannot.be.empty=level1Type cannot be empty! +regionNum.cannot.be.empty=regionNum cannot be empty! +phone.cannot.be.empty=phone cannot be empty! +printId.cannot.be.empty=printId cannot be empty! +path.cannot.be.empty=Path cannot be empty! diff --git a/src/main/resources/messages_zh.properties b/src/main/resources/messages_zh.properties index 18da73c2..b6042358 100644 --- a/src/main/resources/messages_zh.properties +++ b/src/main/resources/messages_zh.properties @@ -1 +1,133 @@ -system.error=系统错误! \ No newline at end of file +system.error=系统错误! +system.busy=系统繁忙! +userName.does.not.exist=用户名不存在! +user.expired=用户已过期! +password.error=密码错误! +email.error=邮箱错误! +unknown.authentication.operation.type=未知的认证操作类型! +failed.to.send.mail=发送邮件失败! +email.does.not.exist=邮箱不存在! +unknown.login.type=未知的登录类型! +error.login.type=错误的登录类型! +the.verification.code.has.expired=验证码已过期! +verification.code.error=验证码错误! +user.has.bound.mailbox=用户已绑定邮箱! +get.moodBoards.data.is.mismatch=获取心情板数据不匹配! +get.printBoards.data.is.mismatch=获取印花板数据不匹配! +get.sketchBoards.data.is.mismatch=获取素描板数据不匹配! +the.number.of.PIN.top.or.bottom.or.outerwear.sketchBoard.cannot.be.more.than.8=上衣、裤子或外套素描板数量不能超过8! +modelPoint.not.found=模型点未找到! +attributeRetrieval.interface.exception=属性检索接口异常,请稍后重试!如果重试后仍然失败,请联系管理员! +design.interface.exception=设计接口异常,请稍后重试!如果重试后仍然失败,请联系管理员! +processMannequins.interface.exception=处理模特接口异常,请稍后重试!如果重试后仍然失败,请联系管理员! +designProcess.interface.exception=设计流程接口异常,请稍后重试!如果重试后仍然失败,请联系管理员! +generate.interface.exception=生成接口异常,请稍后重试!如果重试后仍然失败,请联系管理员! +collection.not.found=集合未找到! +design.not.found=设计未找到! +designItem.not.found=设计项目未找到! +userLikeGroup.not.found=用户喜欢的组未找到! +old.elements.not.found=旧元素未找到! +new.designItemDetails.not.found=新设计项目详情未找到! +save.workspace.failed=保存工作空间失败! +save.design.failed=保存设计失败! +update.workspace.failed=更新工作空间失败! +the.workspace.lastIndex.not.found=工作空间的最后索引未找到! +the.workspaceName.already.exists=工作空间名已存在! +unable.to.delete.the.workspace.you.are.currently.using=无法删除当前正在使用的工作空间! +enumeration.class.not.found=枚举类未找到! +history.detail.not.found=历史详情未找到! +designItemDetails.not.found=设计项目详情未找到! +designPythonOutfit.not.found=设计Python服装未找到! +unknown.parameter.level1Type=未知参数 level1Type! +collectionElement.not.found=集合元素未找到! +select1.file.does.not.exist=选择的文件不存在! +select2.file.does.not.exist=选择的文件不存在! +generate.print.exception=生成印花异常! +generate.print.failed=生成印花失败! +collectionElements.not.found=集合元素未找到! +batch.save.libraryList.failed=批量保存库列表失败! +panTones.not.found=PanTones未找到! +hsv.value.cannot.exceed.the.maximum.of.8=HSV 值不能超过最大值 8! +save.designItem.failed=保存设计项目失败! +unknown.type=未知类型! +unknown.operateType=未知操作类型! +unknown.level1TypeEnum=未知 level1TypeEnum! +the.id.value.is.out.of.range=id 值超出范围! +library.not.found=库未找到! +wrong.clothes.type=错误的服装类型! +sysFile.not.found=系统文件未找到! +librarys.not.found=库列表未找到! +groupDetails.not.found=组详情未找到! +history.not.found=历史记录未找到! +unknown.parameter.level2Type=未知参数 level2Type! +MARKETING_SKETCH.type.have.been.removed=MARKETING_SKETCH 类型已被移除! +unknown.modelType=未知的模型类型! +save.library.failed=保存库失败! +get.file.failed=获取文件失败! +the.path.is.error=路径错误! +batch.save.colorElements.failed=批量保存颜色元素失败! +initSysFile.ioException=初始化系统文件异常! +save.sysFile.failed=保存系统文件失败! +save.pythonTAllInfo.failed=保存 PythonT 信息失败! +save.collection.failed=保存集合失败! +save.designItemDetail.failed=保存设计项目详情失败! +# 前端传参校验 +singleOverall.cannot.be.empty=单体整体不能为空! +colorBoards.cannot.be.empty=颜色板不能为空! +systemScale.cannot.be.empty=系统规模不能为空! +modelType.cannot.be.empty=模型类型不能为空! +modelSex.cannot.be.empty=模型性别不能为空! +templateId.cannot.be.empty=模板ID不能为空! +processId.cannot.be.empty=流程ID不能为空! +timeZone.cannot.be.empty=时区不能为空! +userId.cannot.be.empty=用户ID不能为空! +email.cannot.be.empty=邮箱不能为空! +operationType.cannot.be.empty=操作类型不能为空! +password.cannot.be.empty=密码不能为空! +emailVerifyCode.cannot.be.empty=邮箱验证码不能为空! +loginType.cannot.be.empty=登录类型不能为空! +userName.cannot.be.empty=用户名不能为空! +sketchBoards.designType.cannot.be.empty=素描板设计类型不能为空! +moodBoards.designType.cannot.be.empty=心情板设计类型不能为空! +printBoards.designType.cannot.be.empty=印花板设计类型不能为空! +unknown.parameter.singleOverall=未知参数 singleOverall! +unknown.parameter.switchCategory=未知参数 switchCategory! +collectionId.cannot.be.empty=集合ID不能为空! +designPythonOutfitId.cannot.be.empty=设计Python服装ID不能为空! +designItemId.cannot.be.empty=设计项目ID不能为空! +designId.cannot.be.empty=设计ID不能为空! +groupDetailId.cannot.be.empty=组详情ID不能为空! +validStartTime.cannot.be.empty=有效开始时间不能为空! +validEndTime.cannot.be.empty=有效结束时间不能为空! +user_id.cannot.be.empty=用户ID不能为空! +session_id.cannot.be.empty=会话ID不能为空! +rgbValue.cannot.be.empty=RGB值不能为空! +file.cannot.be.empty=文件不能为空! +select1Id.cannot.be.empty=选择1的ID不能为空! +select2Id.cannot.be.empty=选择2的ID不能为空! +isPin.cannot.be.empty=是否固定不能为空! +designType.cannot.be.empty=设计类型不能为空! +priority.cannot.be.empty=优先级不能为空! +clothes.cannot.be.empty=服装不能为空! +isPreview.cannot.be.empty=是否预览不能为空! +h.cannot.be.empty=H不能为空! +s.cannot.be.empty=S不能为空! +v.cannot.be.empty=V不能为空! +userGroupId.cannot.be.empty=用户组ID不能为空! +userGroupName.cannot.be.empty=用户组名称不能为空! +libraryId.cannot.be.empty=库ID不能为空! +shoulderLeft.cannot.be.empty=左肩不能为空! +shoulderRight.cannot.be.empty=右肩不能为空! +waistbandLeft.cannot.be.empty=左腰带不能为空! +waistbandRight.cannot.be.empty=右腰带不能为空! +handLeft.cannot.be.empty=左手不能为空! +handRight.cannot.be.empty=右手不能为空! +id.cannot.be.empty=ID不能为空! +type.cannot.be.empty=类型不能为空! +color.cannot.be.empty=颜色不能为空! +generateDetailId.cannot.be.empty=生成详情ID不能为空! +level1Type.cannot.be.empty=级别1类型不能为空! +regionNum.cannot.be.empty=区域号不能为空! +phone.cannot.be.empty=电话不能为空! +printId.cannot.be.empty=印花ID不能为空! +path.cannot.be.empty=路径不能为空!