diff --git a/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/controller/SysFileInfoController.java b/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/controller/SysFileInfoController.java index 3370c9e47..01c1d4528 100644 --- a/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/controller/SysFileInfoController.java +++ b/kernel-d-file/file-business/src/main/java/cn/stylefeng/roses/kernel/file/modular/controller/SysFileInfoController.java @@ -82,7 +82,7 @@ public class SysFileInfoController { * @author fengshuonan * @date 2020/11/29 11:29 */ - @GetResource(name = "私有文件预览", path = FILE_PRIVATE_PREVIEW_URL, requiredPermission = false) + @GetResource(name = "私有文件预览", path = FileConstants.FILE_PRIVATE_PREVIEW_URL, requiredPermission = false) public void privatePreview(@Validated(SysFileInfoRequest.detail.class) SysFileInfoRequest sysFileInfoRequest) { HttpServletResponse response = HttpServletUtil.getResponse(); sysFileInfoRequest.setSecretFlag(YesOrNotEnum.Y.getCode()); @@ -95,7 +95,7 @@ public class SysFileInfoController { * @author majianguo * @date 2020/12/27 13:17 */ - @GetResource(name = "公有文件预览", path = FILE_PUBLIC_PREVIEW_URL, requiredPermission = false, requiredLogin = false) + @GetResource(name = "公有文件预览", path = FileConstants.FILE_PUBLIC_PREVIEW_URL, requiredPermission = false, requiredLogin = false) public void publicPreview(@Validated(SysFileInfoRequest.detail.class) SysFileInfoRequest sysFileInfoRequest) { HttpServletResponse response = HttpServletUtil.getResponse(); sysFileInfoRequest.setSecretFlag(YesOrNotEnum.N.getCode()); @@ -108,7 +108,7 @@ public class SysFileInfoController { * @author fengshuonan * @date 2020/11/29 11:29 */ - @GetResource(name = "文件预览,通过bucketName和objectName", path = FILE_PREVIEW_BY_OBJECT_NAME, requiredPermission = false) + @GetResource(name = "文件预览,通过bucketName和objectName", path = FileConstants.FILE_PREVIEW_BY_OBJECT_NAME, requiredPermission = false) public void previewByBucketNameObjectName(@Validated(SysFileInfoRequest.previewByObjectName.class) SysFileInfoRequest sysFileInfoRequest) { HttpServletResponse response = HttpServletUtil.getResponse(); sysFileInfoService.previewByBucketAndObjName(sysFileInfoRequest, response); diff --git a/kernel-d-validator/validator-sdk-count/src/main/java/cn/stylefeng/roses/kemel/validator/count/DefaultCountValidator.java b/kernel-d-validator/validator-sdk-count/src/main/java/cn/stylefeng/roses/kemel/validator/count/DefaultCountValidator.java index 533edfb1f..78522ced0 100644 --- a/kernel-d-validator/validator-sdk-count/src/main/java/cn/stylefeng/roses/kemel/validator/count/DefaultCountValidator.java +++ b/kernel-d-validator/validator-sdk-count/src/main/java/cn/stylefeng/roses/kemel/validator/count/DefaultCountValidator.java @@ -2,12 +2,12 @@ package cn.stylefeng.roses.kemel.validator.count; import cn.hutool.core.convert.Convert; import cn.stylefeng.roses.kernel.cache.api.CacheOperatorApi; +import cn.stylefeng.roses.kernel.cache.api.constants.CacheConstants; import cn.stylefeng.roses.kernel.validator.api.CountValidatorApi; +import cn.stylefeng.roses.kernel.validator.api.constants.ValidatorConstants; import cn.stylefeng.roses.kernel.validator.api.exception.CountValidateException; import cn.stylefeng.roses.kernel.validator.api.exception.enums.CountValidateExceptionEnum; -import static cn.stylefeng.roses.kernel.cache.api.constants.CacheConstants.CACHE_DELIMITER; - /** * 默认的计数校验器 * @@ -29,10 +29,10 @@ public class DefaultCountValidator implements CountValidatorApi { long currentTimeSeconds = System.currentTimeMillis() / 1000; // 上一次操作时间秒数的缓存key COUNT_VALIDATE:key:RECORD_SECONDS - String recordTimeSecondsKey = COUNT_VALIDATE_CACHE_KEY_PREFIX + CACHE_DELIMITER + key + CACHE_DELIMITER + RECORD_TIME_SECONDS; + String recordTimeSecondsKey = ValidatorConstants.COUNT_VALIDATE_CACHE_KEY_PREFIX + CacheConstants.CACHE_DELIMITER + key + CacheConstants.CACHE_DELIMITER + ValidatorConstants.RECORD_TIME_SECONDS; // 上一次执行次数的记录缓存key COUNT_VALIDATE:key:COUNT_NUMBER - String countNumberKey = COUNT_VALIDATE_CACHE_KEY_PREFIX + CACHE_DELIMITER + key + CACHE_DELIMITER + COUNT_NUMBER; + String countNumberKey = ValidatorConstants.COUNT_VALIDATE_CACHE_KEY_PREFIX + CacheConstants.CACHE_DELIMITER + key + CacheConstants.CACHE_DELIMITER + ValidatorConstants.COUNT_NUMBER; // 获取缓存中上一次操作时间秒数 Object recordTimeSecondsObject = cacheOperatorApi.get(recordTimeSecondsKey);