diff --git a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/constants/FileConstants.java b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/constants/FileConstants.java index 762240a4b..8283239c8 100644 --- a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/constants/FileConstants.java +++ b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/constants/FileConstants.java @@ -82,6 +82,11 @@ public interface FileConstants { */ Long DEFAULT_AVATAR_FILE_ID = 10000L; + /** + * 默认头像的文件文件名 + */ + String DEFAULT_AVATAR_FILE_OBJ_NAME = "defaultAvatar.png"; + /** * 系统默认的头像 */ diff --git a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/exception/enums/FileExceptionEnum.java b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/exception/enums/FileExceptionEnum.java index bcec84a48..67b58a613 100644 --- a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/exception/enums/FileExceptionEnum.java +++ b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/exception/enums/FileExceptionEnum.java @@ -81,7 +81,7 @@ public enum FileExceptionEnum implements AbstractExceptionEnum { /** * 获取文件流错误 */ - FILE_STREAM_ERROR(RuleConstants.BUSINESS_ERROR_TYPE_CODE + FileConstants.FILE_EXCEPTION_STEP_CODE + "09", "获取文件流错误"), + FILE_STREAM_ERROR(RuleConstants.BUSINESS_ERROR_TYPE_CODE + FileConstants.FILE_EXCEPTION_STEP_CODE + "09", "获取文件流异常,具体信息为:{}"), /** * 下载文件错误 diff --git a/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/service/impl/SysFileInfoServiceImpl.java b/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/service/impl/SysFileInfoServiceImpl.java index 7229ac654..1d9e16197 100644 --- a/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/service/impl/SysFileInfoServiceImpl.java +++ b/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/service/impl/SysFileInfoServiceImpl.java @@ -107,7 +107,7 @@ public class SysFileInfoServiceImpl extends ServiceImpl${roses.version} + + + + cn.stylefeng.roses + file-api + ${roses.version} + + diff --git a/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/factory/CustomerFactory.java b/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/factory/CustomerFactory.java index 35eb546c4..0acf318cd 100644 --- a/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/factory/CustomerFactory.java +++ b/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/factory/CustomerFactory.java @@ -10,6 +10,7 @@ import cn.stylefeng.roses.kernel.customer.api.expander.CustomerConfigExpander; import cn.stylefeng.roses.kernel.customer.modular.entity.Customer; import cn.stylefeng.roses.kernel.customer.modular.request.CustomerRequest; import cn.stylefeng.roses.kernel.email.api.pojo.SendMailParam; +import cn.stylefeng.roses.kernel.file.api.constants.FileConstants; import cn.stylefeng.roses.kernel.rule.enums.StatusEnum; import cn.stylefeng.roses.kernel.rule.enums.YesOrNotEnum; @@ -53,8 +54,8 @@ public class CustomerFactory { customer.setVerifiedFlag(YesOrNotEnum.N.getCode()); // 设置默认头像 - customer.setAvatar(10000L); - customer.setAvatarObjectName("10000.png"); + customer.setAvatar(FileConstants.DEFAULT_AVATAR_FILE_ID); + customer.setAvatarObjectName(FileConstants.DEFAULT_AVATAR_FILE_OBJ_NAME); // 设置默认积分0 customer.setScore(0);