From ce5a154cd1b486e5079b3dc160425c23ec0d1aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=92=B8=E9=B1=BC?= Date: Sun, 1 May 2022 22:04:05 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=97=B6=E6=96=87=E4=BB=B6=E5=90=8D=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC=E8=BD=AC=E4=B9=89=E4=B8=BA=E5=8A=A0=E5=8F=B7=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xiaotao/saltedfishcloud/utils/ResourceUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfc-api/src/main/java/com/xiaotao/saltedfishcloud/utils/ResourceUtils.java b/sfc-api/src/main/java/com/xiaotao/saltedfishcloud/utils/ResourceUtils.java index 28c368c9..28a3081a 100644 --- a/sfc-api/src/main/java/com/xiaotao/saltedfishcloud/utils/ResourceUtils.java +++ b/sfc-api/src/main/java/com/xiaotao/saltedfishcloud/utils/ResourceUtils.java @@ -66,6 +66,6 @@ public class ResourceUtils { public static String generateContentDisposition(String filename) throws UnsupportedEncodingException { - return "inline;filename*=UTF-8''"+ URLEncoder.encode(filename, "utf-8"); + return "inline;filename*=UTF-8''"+ URLEncoder.encode(filename, "utf-8").replaceAll("\\+", "%20"); } } -- Gitee From 5f54d8b6e2e3667c0b362ac6dda176b967560f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=92=B8=E9=B1=BC?= Date: Sat, 14 May 2022 11:43:03 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat=20=E7=89=B9=E6=80=A7=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E5=86=8A=E6=96=B9=E5=BC=8F=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E6=83=85=E5=86=B5=E7=9A=84=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saltedfishcloud/config/SysRuntimeConfig.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/config/SysRuntimeConfig.java b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/config/SysRuntimeConfig.java index 6016bb3d..23d65e8e 100644 --- a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/config/SysRuntimeConfig.java +++ b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/config/SysRuntimeConfig.java @@ -4,6 +4,7 @@ import com.xiaotao.saltedfishcloud.constant.MQTopic; import com.xiaotao.saltedfishcloud.enums.ProtectLevel; import com.xiaotao.saltedfishcloud.service.config.ConfigName; import com.xiaotao.saltedfishcloud.service.config.ConfigService; +import com.xiaotao.saltedfishcloud.service.hello.HelloService; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -28,6 +29,9 @@ public class SysRuntimeConfig implements ApplicationRunner { private static ProtectLevel PROTECT_MODE_LEVEL = null; private static SysRuntimeConfig GLOBAL_HOLD_INST; + @Autowired + private HelloService helloService; + @Autowired private ConfigService configService; @@ -99,14 +103,16 @@ public class SysRuntimeConfig implements ApplicationRunner { log.warn("[注册关闭]系统未开启任何用户注册方式"); } + updateFeature(); // 监听配置改变,实时更新状态缓存 configService.addConfigSetListener(e -> { ConfigName key = e.getKey(); if (key == ConfigName.ENABLE_EMAIL_REG) { - enableEmailReg = "true".equals(e.getValue().toLowerCase()); + enableEmailReg = "true".equalsIgnoreCase(e.getValue()); } else if (key == ConfigName.ENABLE_REG_CODE) { - enableRegCode = "true".equals(e.getValue().toLowerCase()); + enableRegCode = "true".equalsIgnoreCase(e.getValue()); } + updateFeature(); }); @@ -118,6 +124,11 @@ public class SysRuntimeConfig implements ApplicationRunner { }, new PatternTopic(MQTopic.PROTECT_LEVEL_SWITCH)); } + public void updateFeature() { + helloService.setFeature("enableRegCode", isEnableRegCode()); + helloService.setFeature("enableEmailReg", isEnableEmailReg()); + } + /** * 从数据库中抓取数据更新配置 */ -- Gitee From 29bdbe3de6376f2ee5ab2d9b013a5bf95abd0b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=92=B8=E9=B1=BC?= Date: Sat, 14 May 2022 23:07:47 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feat=20=E9=82=80=E8=AF=B7=E7=A0=81=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E6=96=B9=E5=BC=8F=E7=9A=84=E7=94=A8=E6=88=B7=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E8=BF=9E=E5=90=8C=E9=82=AE=E7=AE=B1=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=EF=BC=8C=E9=9C=80=E8=A6=81=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiaotao/saltedfishcloud/service/user/UserServiceImp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/user/UserServiceImp.java b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/user/UserServiceImp.java index 338edb7a..372425e7 100644 --- a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/user/UserServiceImp.java +++ b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/user/UserServiceImp.java @@ -275,7 +275,7 @@ public class UserServiceImp implements UserService { if (!code.equals(sysProperties.getCommon().getRegCode())) { throw new JsonException(AccountError.REG_CODE_ERROR); } - return addUser(user, passwd, email, User.TYPE_COMMON); + return addUser(user, passwd, null, User.TYPE_COMMON); } } -- Gitee From 1cb895d14e6fb645a73e53e551d696ac0cc7fd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=92=B8=E9=B1=BC?= Date: Sun, 15 May 2022 20:31:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?chore=20=E5=85=81=E8=AE=B8=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=A1=A8email=E5=AD=97=E6=AE=B5null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- sfc-api/pom.xml | 2 +- sfc-compress/pom.xml | 2 +- sfc-core/pom.xml | 4 ++-- sfc-core/src/main/resources/sql/1.8.6.1.sql | 1 + sfc-core/src/main/resources/sql/full.sql | 2 +- sfc-orm-configure/pom.xml | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 sfc-core/src/main/resources/sql/1.8.6.1.sql diff --git a/pom.xml b/pom.xml index 765804f2..c7ff0049 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ API或脚手架模块版本号仅使用数字加点(如:sfc-ext,sfc-api) 功能组件或咸鱼云根模块需要使用RELEASE或SNAPSHOT后缀(如:sfc-core,sfc-ext-hadoop-store) --> - 1.8.6.0-RELEASE + 1.8.6.1-SNAPSHOT saltedfishcloud 咸鱼云网盘 diff --git a/sfc-api/pom.xml b/sfc-api/pom.xml index ec6bf36f..66fe3087 100644 --- a/sfc-api/pom.xml +++ b/sfc-api/pom.xml @@ -5,7 +5,7 @@ saltedfishcloud com.xiaotao - 1.8.6.0-RELEASE + 1.8.6.1-SNAPSHOT 4.0.0 1.2.2 diff --git a/sfc-compress/pom.xml b/sfc-compress/pom.xml index da4b1367..15562bc2 100644 --- a/sfc-compress/pom.xml +++ b/sfc-compress/pom.xml @@ -7,7 +7,7 @@ com.xiaotao saltedfishcloud - 1.8.6.0-RELEASE + 1.8.6.1-SNAPSHOT sfc-compress diff --git a/sfc-core/pom.xml b/sfc-core/pom.xml index 4dacc204..bb41a705 100644 --- a/sfc-core/pom.xml +++ b/sfc-core/pom.xml @@ -5,7 +5,7 @@ saltedfishcloud com.xiaotao - 1.8.6.0-RELEASE + 1.8.6.1-SNAPSHOT 4.0.0 @@ -70,7 +70,7 @@ com.xiaotao sfc-compress - 1.8.6.0-RELEASE + 1.8.6.1-SNAPSHOT compile diff --git a/sfc-core/src/main/resources/sql/1.8.6.1.sql b/sfc-core/src/main/resources/sql/1.8.6.1.sql new file mode 100644 index 00000000..cb3fd4ef --- /dev/null +++ b/sfc-core/src/main/resources/sql/1.8.6.1.sql @@ -0,0 +1 @@ +ALTER TABLE user modify email VARCHAR(256) DEFAULT NULL; \ No newline at end of file diff --git a/sfc-core/src/main/resources/sql/full.sql b/sfc-core/src/main/resources/sql/full.sql index b2e71c1e..86c629b7 100644 --- a/sfc-core/src/main/resources/sql/full.sql +++ b/sfc-core/src/main/resources/sql/full.sql @@ -198,7 +198,7 @@ CREATE TABLE `user` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `user` varchar(32) DEFAULT NULL, `pwd` varchar(32) DEFAULT NULL, - `email` varchar(256) NOT NULL, + `email` varchar(256) DEFAULT NULL, `last_login` int unsigned DEFAULT NULL, `type` int unsigned DEFAULT '0', `role` varchar(32) DEFAULT NULL, diff --git a/sfc-orm-configure/pom.xml b/sfc-orm-configure/pom.xml index 023f5ed1..6cb8a33c 100644 --- a/sfc-orm-configure/pom.xml +++ b/sfc-orm-configure/pom.xml @@ -5,7 +5,7 @@ saltedfishcloud com.xiaotao - 1.8.6.0-RELEASE + 1.8.6.1-SNAPSHOT 4.0.0 -- Gitee From 3efa77e9d9dabbe02580b3a47a0e94478af079bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=92=B8=E9=B1=BC?= Date: Tue, 24 May 2022 20:15:36 +0800 Subject: [PATCH 5/6] =?UTF-8?q?feat=20=E5=BF=AB=E9=80=9F=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BCdata=E6=B7=BB=E5=8A=A0=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E7=BB=93=E6=9E=9C;=E5=8F=91=E9=80=81=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E9=AA=8C=E8=AF=81=E7=A0=81=E6=B7=BB=E5=8A=A0=E9=82=AE?= =?UTF-8?q?=E7=AE=B1=E6=A0=A1=E9=AA=8C;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saltedfishcloud/controller/FileController.java | 10 ++++++++-- .../saltedfishcloud/controller/UserController.java | 3 ++- .../thumbnail/handler/SimpleImageThumbnailHandler.java | 2 -- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/FileController.java b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/FileController.java index 032093db..383f5c1e 100644 --- a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/FileController.java +++ b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/FileController.java @@ -149,9 +149,9 @@ public class FileController { @RequestParam("md5") String md5) throws IOException { boolean b = fileService.getFileSystem().quickSave(uid, path, name, md5); if (b) { - return JsonResult.emptySuccess(); + return JsonResultImpl.getInstance(true); } else { - return JsonResultImpl.getInstance(100, null, FileSystemError.QUICK_SAVE_NOT_HIT.getMessage()); + return JsonResultImpl.getInstance(100, false, FileSystemError.QUICK_SAVE_NOT_HIT.getMessage()); } } @@ -199,6 +199,12 @@ public class FileController { } + @AllowAnonymous + @GetMapping("getFileList") + public JsonResult getFileList(@PathVariable String uid, @RequestParam("path") String path) { + return JsonResult.emptySuccess(); + } + /** * 搜索目标用户网盘中的文件或文件夹 * @param uid 目标UID,非管理员只能搜索公共用户和自己的资源 diff --git a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/UserController.java b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/UserController.java index 959ff9cc..dcacbe12 100644 --- a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/UserController.java +++ b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/controller/UserController.java @@ -39,6 +39,7 @@ import javax.validation.Valid; import javax.validation.constraints.Email; import javax.validation.constraints.Max; import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.HashMap; @@ -174,7 +175,7 @@ public class UserController { */ @PostMapping("/regcode") @AllowAnonymous - public JsonResult sendRegCode(@RequestParam("email") @Email String email) { + public JsonResult sendRegCode(@Validated @NotBlank @RequestParam("email") @Email String email) { userService.sendRegEmail(email); return JsonResult.emptySuccess(); } diff --git a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/thumbnail/handler/SimpleImageThumbnailHandler.java b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/thumbnail/handler/SimpleImageThumbnailHandler.java index 978b13f1..a6d1f595 100644 --- a/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/thumbnail/handler/SimpleImageThumbnailHandler.java +++ b/sfc-core/src/main/java/com/xiaotao/saltedfishcloud/service/thumbnail/handler/SimpleImageThumbnailHandler.java @@ -1,8 +1,6 @@ package com.xiaotao.saltedfishcloud.service.thumbnail.handler; import com.xiaotao.saltedfishcloud.service.file.thumbnail.ThumbnailHandler; -import com.xiaotao.saltedfishcloud.service.hello.FeatureProvider; -import com.xiaotao.saltedfishcloud.service.hello.HelloService; import com.xiaotao.saltedfishcloud.utils.ImageUtils; import org.springframework.core.io.Resource; import org.springframework.stereotype.Component; -- Gitee From 8260b20584de9e43e37c836a0df11df5e2305c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=92=B8=E9=B1=BC?= Date: Tue, 24 May 2022 21:37:51 +0800 Subject: [PATCH 6/6] =?UTF-8?q?chore=20=E5=B0=8F=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=BF=AD=E4=BB=A3=EF=BC=9A1.8.6.2-RELEASE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/extension/index.md | 1 + docs/quick-start/front-end.md | 2 ++ pom.xml | 2 +- sfc-api/pom.xml | 2 +- sfc-compress/pom.xml | 2 +- sfc-core/pom.xml | 4 ++-- sfc-core/src/main/resources/application.yml | 6 +++--- sfc-orm-configure/pom.xml | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/extension/index.md b/docs/extension/index.md index d452a758..01da6c2e 100644 --- a/docs/extension/index.md +++ b/docs/extension/index.md @@ -1,4 +1,5 @@ # 简介 +拓展功能可以在不修改主程序的情况下,改变系统原有的功能或增加新的功能。目前只支持对纯后端API系统进行有限的功能增强和拓展。通过给后端安装拓展插件来增强与拓展前端系统的功能目前正在开发中。 ## 简要说明 程序会读取 `程序运行路径/ext/` 下的jar文件作为拓展插件来加载。 diff --git a/docs/quick-start/front-end.md b/docs/quick-start/front-end.md index a037d6bd..546e0d56 100644 --- a/docs/quick-start/front-end.md +++ b/docs/quick-start/front-end.md @@ -1,5 +1,7 @@ # 关于前端 +> 目前的前端项目1.x版本停止维护,开发重心将转移到vuetify-refactor分支,重新从0开始采用vite+vue3+vuetify开发可维护性和可拓展性更高,更灵活的前端系统 + 由于本人主要精力放在了后端,前端缺少精心打磨,且前端技术不太专业,所以目前前端的文档较少和可能落后于实际项目情况 待后端基本完善和稳定后,我会再对前端项目进行重构。 diff --git a/pom.xml b/pom.xml index c7ff0049..c4b612c5 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ API或脚手架模块版本号仅使用数字加点(如:sfc-ext,sfc-api) 功能组件或咸鱼云根模块需要使用RELEASE或SNAPSHOT后缀(如:sfc-core,sfc-ext-hadoop-store) --> - 1.8.6.1-SNAPSHOT + 1.8.6.2-RELEASE saltedfishcloud 咸鱼云网盘 diff --git a/sfc-api/pom.xml b/sfc-api/pom.xml index 66fe3087..9e6f84d0 100644 --- a/sfc-api/pom.xml +++ b/sfc-api/pom.xml @@ -5,7 +5,7 @@ saltedfishcloud com.xiaotao - 1.8.6.1-SNAPSHOT + 1.8.6.2-RELEASE 4.0.0 1.2.2 diff --git a/sfc-compress/pom.xml b/sfc-compress/pom.xml index 15562bc2..577a25cb 100644 --- a/sfc-compress/pom.xml +++ b/sfc-compress/pom.xml @@ -7,7 +7,7 @@ com.xiaotao saltedfishcloud - 1.8.6.1-SNAPSHOT + 1.8.6.2-RELEASE sfc-compress diff --git a/sfc-core/pom.xml b/sfc-core/pom.xml index bb41a705..3905f404 100644 --- a/sfc-core/pom.xml +++ b/sfc-core/pom.xml @@ -5,7 +5,7 @@ saltedfishcloud com.xiaotao - 1.8.6.1-SNAPSHOT + 1.8.6.2-RELEASE 4.0.0 @@ -70,7 +70,7 @@ com.xiaotao sfc-compress - 1.8.6.1-SNAPSHOT + 1.8.6.2-RELEASE compile diff --git a/sfc-core/src/main/resources/application.yml b/sfc-core/src/main/resources/application.yml index 1d0cee65..87a9e1ef 100644 --- a/sfc-core/src/main/resources/application.yml +++ b/sfc-core/src/main/resources/application.yml @@ -43,9 +43,9 @@ logging: level: org: warn com: warn - com.xiaotao: debug - com.xiaotao.saltedfishcloud.dao.mybatis: warn - com.xiaotao.saltedfishcloud.SaltedfishcloudApplication: warn + com.xiaotao: info +# com.xiaotao.saltedfishcloud.dao.mybatis: warn +# com.xiaotao.saltedfishcloud.SaltedfishcloudApplication: warn app: version: ^project.version^ diff --git a/sfc-orm-configure/pom.xml b/sfc-orm-configure/pom.xml index 6cb8a33c..d2432583 100644 --- a/sfc-orm-configure/pom.xml +++ b/sfc-orm-configure/pom.xml @@ -5,7 +5,7 @@ saltedfishcloud com.xiaotao - 1.8.6.1-SNAPSHOT + 1.8.6.2-RELEASE 4.0.0 -- Gitee