diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index fbcab775..c1bd5e0a 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1 +1 @@
-custom: http://doc.ruoyi.vip/ruoyi-vue/other/donate.html
+custom: http://doc.acupuncture.vip/acupuncture-vue/other/donate.html
diff --git a/LICENSE b/LICENSE
index 8564f294..53d171cc 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2018 RuoYi
+Copyright (c) 2018 acupuncture
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/README.md b/README.md
deleted file mode 100644
index 058fd43e..00000000
--- a/README.md
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-RuoYi v3.8.9
-基于SpringBoot+Vue前后端分离的Java快速开发框架
-
-
-
-
-
-
-## 平台简介
-
-若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
-
-* 前端采用Vue、Element UI。
-* 后端采用Spring Boot、Spring Security、Redis & Jwt。
-* 权限认证使用Jwt,支持多终端认证系统。
-* 支持加载动态权限菜单,多方式轻松权限控制。
-* 高效率开发,使用代码生成器可以一键生成前后端代码。
-* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Vue3),保持同步更新。
-* 提供了单应用版本[RuoYi-Vue-fast](https://gitcode.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://gitcode.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
-* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
-* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
-
-## 内置功能
-
-1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
-2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
-3. 岗位管理:配置系统用户所属担任职务。
-4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
-5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
-6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
-7. 参数管理:对系统动态配置常用参数。
-8. 通知公告:系统通知公告信息发布维护。
-9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
-10. 登录日志:系统登录日志记录查询包含登录异常。
-11. 在线用户:当前系统中活跃用户状态监控。
-12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
-13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
-14. 系统接口:根据业务代码自动生成相关的api接口文档。
-15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
-16. 缓存监控:对系统的缓存信息查询,命令统计等。
-17. 在线构建器:拖动表单元素生成相应的HTML代码。
-18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
-
-## 在线体验
-
-- admin/admin123
-- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
-
-演示地址:http://vue.ruoyi.vip
-文档地址:http://doc.ruoyi.vip
-
-## 演示图
-
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-  |
-  |
-
-
-
-
-## 若依前后端分离交流群
-
-QQ群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [](https://jq.qq.com/?_wv=1027&k=SpyH2875) [](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ZFAPAbp09S2ltvwrJzp7wGlbopsc0rwi&authKey=HB2cxpxP2yspk%2Bo3WKTBfktRCccVkU26cgi5B16u0KcAYrVu7sBaE7XSEqmMdFQp&noverify=0&group_code=174951577) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Fn2aF5IHpwsy8j6VlalNJK6qbwFLFHat&authKey=uyIT%2B97x2AXj3odyXpsSpVaPMC%2Bidw0LxG5MAtEqlrcBcWJUA%2FeS43rsF1Tg7IRJ&noverify=0&group_code=161281055) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=XIzkm_mV2xTsUtFxo63bmicYoDBA6Ifm&authKey=dDW%2F4qsmw3x9govoZY9w%2FoWAoC4wbHqGal%2BbqLzoS6VBarU8EBptIgPKN%2FviyC8j&noverify=0&group_code=138988063) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DkugnCg68PevlycJSKSwjhFqfIgrWWwR&authKey=pR1Pa5lPIeGF%2FFtIk6d%2FGB5qFi0EdvyErtpQXULzo03zbhopBHLWcuqdpwY241R%2F&noverify=0&group_code=151450850) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=F58bgRa-Dp-rsQJThiJqIYv8t4-lWfXh&authKey=UmUs4CVG5OPA1whvsa4uSespOvyd8%2FAr9olEGaWAfdLmfKQk%2FVBp2YU3u2xXXt76&noverify=0&group_code=224622315) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Nxb2EQ5qozWa218Wbs7zgBnjLSNk_tVT&authKey=obBKXj6SBKgrFTJZx0AqQnIYbNOvBB2kmgwWvGhzxR67RoRr84%2Bus5OadzMcdJl5&noverify=0&group_code=287842588) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=numtK1M_I4eVd2Gvg8qtbuL8JgX42qNh&authKey=giV9XWMaFZTY%2FqPlmWbkB9g3fi0Ev5CwEtT9Tgei0oUlFFCQLDp4ozWRiVIzubIm&noverify=0&group_code=187944233) 点击按钮入群。
\ No newline at end of file
diff --git a/ruoyi-admin/pom.xml b/acupuncture-admin/pom.xml
similarity index 84%
rename from ruoyi-admin/pom.xml
rename to acupuncture-admin/pom.xml
index 34a40e84..5b7e7765 100644
--- a/ruoyi-admin/pom.xml
+++ b/acupuncture-admin/pom.xml
@@ -1,96 +1,96 @@
-
-
-
- ruoyi
- com.ruoyi
- 3.8.9
-
- 4.0.0
- jar
- ruoyi-admin
-
-
- web服务入口
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- true
-
-
-
-
- io.springfox
- springfox-boot-starter
-
-
-
-
- io.swagger
- swagger-models
- 1.6.2
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.ruoyi
- ruoyi-framework
-
-
-
-
- com.ruoyi
- ruoyi-quartz
-
-
-
-
- com.ruoyi
- ruoyi-generator
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- 2.5.15
-
- true
-
-
-
-
- repackage
-
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
- 3.1.0
-
- false
- ${project.artifactId}
-
-
-
- ${project.artifactId}
-
-
+
+
+
+ acupuncture
+ com.acupuncture
+ 3.8.9
+
+ 4.0.0
+ jar
+ acupuncture-admin
+
+
+ web服务入口
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ true
+
+
+
+
+ io.springfox
+ springfox-boot-starter
+
+
+
+
+ io.swagger
+ swagger-models
+ 1.6.2
+
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+
+ com.acupuncture
+ acupuncture-framework
+
+
+
+
+ com.acupuncture
+ acupuncture-quartz
+
+
+
+
+ com.acupuncture
+ acupuncture-generator
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.5.15
+
+ true
+
+
+
+
+ repackage
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 3.1.0
+
+ false
+ ${project.artifactId}
+
+
+
+ ${project.artifactId}
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/acupuncture-admin/src/main/java/com/acupuncture/AcupunctureApplication.java
similarity index 87%
rename from ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
rename to acupuncture-admin/src/main/java/com/acupuncture/AcupunctureApplication.java
index e3c56ee5..c08c3fb4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
+++ b/acupuncture-admin/src/main/java/com/acupuncture/AcupunctureApplication.java
@@ -1,30 +1,30 @@
-package com.ruoyi;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-
-/**
- * 启动程序
- *
- * @author ruoyi
- */
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-public class RuoYiApplication
-{
- public static void main(String[] args)
- {
- // System.setProperty("spring.devtools.restart.enabled", "false");
- SpringApplication.run(RuoYiApplication.class, args);
- System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
- " .-------. ____ __ \n" +
- " | _ _ \\ \\ \\ / / \n" +
- " | ( ' ) | \\ _. / ' \n" +
- " |(_ o _) / _( )_ .' \n" +
- " | (_,_).' __ ___(_ o _)' \n" +
- " | |\\ \\ | || |(_,_)' \n" +
- " | | \\ `' /| `-' / \n" +
- " | | \\ / \\ / \n" +
- " ''-' `'-' `-..-' ");
- }
-}
+package com.acupuncture;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+
+/**
+ * 启动程序
+ *
+ * @author acupuncture
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+public class AcupunctureApplication
+{
+ public static void main(String[] args)
+ {
+ // System.setProperty("spring.devtools.restart.enabled", "false");
+ SpringApplication.run(AcupunctureApplication.class, args);
+ System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
+ " .-------. ____ __ \n" +
+ " | _ _ \\ \\ \\ / / \n" +
+ " | ( ' ) | \\ _. / ' \n" +
+ " |(_ o _) / _( )_ .' \n" +
+ " | (_,_).' __ ___(_ o _)' \n" +
+ " | |\\ \\ | || |(_,_)' \n" +
+ " | | \\ `' /| `-' / \n" +
+ " | | \\ / \\ / \n" +
+ " ''-' `'-' `-..-' ");
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java b/acupuncture-admin/src/main/java/com/acupuncture/RuoYiServletInitializer.java
similarity index 76%
rename from ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
rename to acupuncture-admin/src/main/java/com/acupuncture/RuoYiServletInitializer.java
index 9d82a237..64bc70df 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
+++ b/acupuncture-admin/src/main/java/com/acupuncture/RuoYiServletInitializer.java
@@ -1,18 +1,18 @@
-package com.ruoyi;
-
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
-
-/**
- * web容器中进行部署
- *
- * @author ruoyi
- */
-public class RuoYiServletInitializer extends SpringBootServletInitializer
-{
- @Override
- protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
- {
- return application.sources(RuoYiApplication.class);
- }
-}
+package com.acupuncture;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+ * web容器中进行部署
+ *
+ * @author acupuncture
+ */
+public class RuoYiServletInitializer extends SpringBootServletInitializer
+{
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
+ {
+ return application.sources(AcupunctureApplication.class);
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/common/CaptchaController.java
similarity index 83%
rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
rename to acupuncture-admin/src/main/java/com/acupuncture/web/controller/common/CaptchaController.java
index e1a397e6..caf277f9 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
+++ b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/common/CaptchaController.java
@@ -1,94 +1,94 @@
-package com.ruoyi.web.controller.common;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-import javax.annotation.Resource;
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.FastByteArrayOutputStream;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.google.code.kaptcha.Producer;
-import com.ruoyi.common.config.RuoYiConfig;
-import com.ruoyi.common.constant.CacheConstants;
-import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.common.utils.sign.Base64;
-import com.ruoyi.common.utils.uuid.IdUtils;
-import com.ruoyi.system.service.ISysConfigService;
-
-/**
- * 验证码操作处理
- *
- * @author ruoyi
- */
-@RestController
-public class CaptchaController
-{
- @Resource(name = "captchaProducer")
- private Producer captchaProducer;
-
- @Resource(name = "captchaProducerMath")
- private Producer captchaProducerMath;
-
- @Autowired
- private RedisCache redisCache;
-
- @Autowired
- private ISysConfigService configService;
- /**
- * 生成验证码
- */
- @GetMapping("/captchaImage")
- public AjaxResult getCode(HttpServletResponse response) throws IOException
- {
- AjaxResult ajax = AjaxResult.success();
- boolean captchaEnabled = configService.selectCaptchaEnabled();
- ajax.put("captchaEnabled", captchaEnabled);
- if (!captchaEnabled)
- {
- return ajax;
- }
-
- // 保存验证码信息
- String uuid = IdUtils.simpleUUID();
- String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid;
-
- String capStr = null, code = null;
- BufferedImage image = null;
-
- // 生成验证码
- String captchaType = RuoYiConfig.getCaptchaType();
- if ("math".equals(captchaType))
- {
- String capText = captchaProducerMath.createText();
- capStr = capText.substring(0, capText.lastIndexOf("@"));
- code = capText.substring(capText.lastIndexOf("@") + 1);
- image = captchaProducerMath.createImage(capStr);
- }
- else if ("char".equals(captchaType))
- {
- capStr = code = captchaProducer.createText();
- image = captchaProducer.createImage(capStr);
- }
-
- redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
- // 转换流信息写出
- FastByteArrayOutputStream os = new FastByteArrayOutputStream();
- try
- {
- ImageIO.write(image, "jpg", os);
- }
- catch (IOException e)
- {
- return AjaxResult.error(e.getMessage());
- }
-
- ajax.put("uuid", uuid);
- ajax.put("img", Base64.encode(os.toByteArray()));
- return ajax;
- }
-}
+package com.acupuncture.web.controller.common;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.FastByteArrayOutputStream;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.google.code.kaptcha.Producer;
+import com.acupuncture.common.config.RuoYiConfig;
+import com.acupuncture.common.constant.CacheConstants;
+import com.acupuncture.common.constant.Constants;
+import com.acupuncture.common.core.domain.AjaxResult;
+import com.acupuncture.common.core.redis.RedisCache;
+import com.acupuncture.common.utils.sign.Base64;
+import com.acupuncture.common.utils.uuid.IdUtils;
+import com.acupuncture.system.service.ISysConfigService;
+
+/**
+ * 验证码操作处理
+ *
+ * @author acupuncture
+ */
+@RestController
+public class CaptchaController
+{
+ @Resource(name = "captchaProducer")
+ private Producer captchaProducer;
+
+ @Resource(name = "captchaProducerMath")
+ private Producer captchaProducerMath;
+
+ @Autowired
+ private RedisCache redisCache;
+
+ @Autowired
+ private ISysConfigService configService;
+ /**
+ * 生成验证码
+ */
+ @GetMapping("/captchaImage")
+ public AjaxResult getCode(HttpServletResponse response) throws IOException
+ {
+ AjaxResult ajax = AjaxResult.success();
+ boolean captchaEnabled = configService.selectCaptchaEnabled();
+ ajax.put("captchaEnabled", captchaEnabled);
+ if (!captchaEnabled)
+ {
+ return ajax;
+ }
+
+ // 保存验证码信息
+ String uuid = IdUtils.simpleUUID();
+ String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid;
+
+ String capStr = null, code = null;
+ BufferedImage image = null;
+
+ // 生成验证码
+ String captchaType = RuoYiConfig.getCaptchaType();
+ if ("math".equals(captchaType))
+ {
+ String capText = captchaProducerMath.createText();
+ capStr = capText.substring(0, capText.lastIndexOf("@"));
+ code = capText.substring(capText.lastIndexOf("@") + 1);
+ image = captchaProducerMath.createImage(capStr);
+ }
+ else if ("char".equals(captchaType))
+ {
+ capStr = code = captchaProducer.createText();
+ image = captchaProducer.createImage(capStr);
+ }
+
+ redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
+ // 转换流信息写出
+ FastByteArrayOutputStream os = new FastByteArrayOutputStream();
+ try
+ {
+ ImageIO.write(image, "jpg", os);
+ }
+ catch (IOException e)
+ {
+ return AjaxResult.error(e.getMessage());
+ }
+
+ ajax.put("uuid", uuid);
+ ajax.put("img", Base64.encode(os.toByteArray()));
+ return ajax;
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/common/CommonController.java
similarity index 91%
rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
rename to acupuncture-admin/src/main/java/com/acupuncture/web/controller/common/CommonController.java
index d51d61d0..aeffe438 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
+++ b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/common/CommonController.java
@@ -1,163 +1,163 @@
-package com.ruoyi.web.controller.common;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-import com.ruoyi.common.config.RuoYiConfig;
-import com.ruoyi.common.constant.Constants;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.file.FileUploadUtils;
-import com.ruoyi.common.utils.file.FileUtils;
-import com.ruoyi.framework.config.ServerConfig;
-
-/**
- * 通用请求处理
- *
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/common")
-public class CommonController
-{
- private static final Logger log = LoggerFactory.getLogger(CommonController.class);
-
- @Autowired
- private ServerConfig serverConfig;
-
- private static final String FILE_DELIMETER = ",";
-
- /**
- * 通用下载请求
- *
- * @param fileName 文件名称
- * @param delete 是否删除
- */
- @GetMapping("/download")
- public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
- {
- try
- {
- if (!FileUtils.checkAllowDownload(fileName))
- {
- throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
- }
- String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
- String filePath = RuoYiConfig.getDownloadPath() + fileName;
-
- response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
- FileUtils.setAttachmentResponseHeader(response, realFileName);
- FileUtils.writeBytes(filePath, response.getOutputStream());
- if (delete)
- {
- FileUtils.deleteFile(filePath);
- }
- }
- catch (Exception e)
- {
- log.error("下载文件失败", e);
- }
- }
-
- /**
- * 通用上传请求(单个)
- */
- @PostMapping("/upload")
- public AjaxResult uploadFile(MultipartFile file) throws Exception
- {
- try
- {
- // 上传文件路径
- String filePath = RuoYiConfig.getUploadPath();
- // 上传并返回新文件名称
- String fileName = FileUploadUtils.upload(filePath, file);
- String url = serverConfig.getUrl() + fileName;
- AjaxResult ajax = AjaxResult.success();
- ajax.put("url", url);
- ajax.put("fileName", fileName);
- ajax.put("newFileName", FileUtils.getName(fileName));
- ajax.put("originalFilename", file.getOriginalFilename());
- return ajax;
- }
- catch (Exception e)
- {
- return AjaxResult.error(e.getMessage());
- }
- }
-
- /**
- * 通用上传请求(多个)
- */
- @PostMapping("/uploads")
- public AjaxResult uploadFiles(List files) throws Exception
- {
- try
- {
- // 上传文件路径
- String filePath = RuoYiConfig.getUploadPath();
- List urls = new ArrayList();
- List fileNames = new ArrayList();
- List newFileNames = new ArrayList();
- List originalFilenames = new ArrayList();
- for (MultipartFile file : files)
- {
- // 上传并返回新文件名称
- String fileName = FileUploadUtils.upload(filePath, file);
- String url = serverConfig.getUrl() + fileName;
- urls.add(url);
- fileNames.add(fileName);
- newFileNames.add(FileUtils.getName(fileName));
- originalFilenames.add(file.getOriginalFilename());
- }
- AjaxResult ajax = AjaxResult.success();
- ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
- ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
- ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
- ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
- return ajax;
- }
- catch (Exception e)
- {
- return AjaxResult.error(e.getMessage());
- }
- }
-
- /**
- * 本地资源通用下载
- */
- @GetMapping("/download/resource")
- public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
- throws Exception
- {
- try
- {
- if (!FileUtils.checkAllowDownload(resource))
- {
- throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
- }
- // 本地资源路径
- String localPath = RuoYiConfig.getProfile();
- // 数据库资源地址
- String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
- // 下载名称
- String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
- response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
- FileUtils.setAttachmentResponseHeader(response, downloadName);
- FileUtils.writeBytes(downloadPath, response.getOutputStream());
- }
- catch (Exception e)
- {
- log.error("下载文件失败", e);
- }
- }
-}
+package com.acupuncture.web.controller.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+import com.acupuncture.common.config.RuoYiConfig;
+import com.acupuncture.common.constant.Constants;
+import com.acupuncture.common.core.domain.AjaxResult;
+import com.acupuncture.common.utils.StringUtils;
+import com.acupuncture.common.utils.file.FileUploadUtils;
+import com.acupuncture.common.utils.file.FileUtils;
+import com.acupuncture.framework.config.ServerConfig;
+
+/**
+ * 通用请求处理
+ *
+ * @author acupuncture
+ */
+@RestController
+@RequestMapping("/common")
+public class CommonController
+{
+ private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+ @Autowired
+ private ServerConfig serverConfig;
+
+ private static final String FILE_DELIMETER = ",";
+
+ /**
+ * 通用下载请求
+ *
+ * @param fileName 文件名称
+ * @param delete 是否删除
+ */
+ @GetMapping("/download")
+ public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
+ {
+ try
+ {
+ if (!FileUtils.checkAllowDownload(fileName))
+ {
+ throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
+ }
+ String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
+ String filePath = RuoYiConfig.getDownloadPath() + fileName;
+
+ response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+ FileUtils.setAttachmentResponseHeader(response, realFileName);
+ FileUtils.writeBytes(filePath, response.getOutputStream());
+ if (delete)
+ {
+ FileUtils.deleteFile(filePath);
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("下载文件失败", e);
+ }
+ }
+
+ /**
+ * 通用上传请求(单个)
+ */
+ @PostMapping("/upload")
+ public AjaxResult uploadFile(MultipartFile file) throws Exception
+ {
+ try
+ {
+ // 上传文件路径
+ String filePath = RuoYiConfig.getUploadPath();
+ // 上传并返回新文件名称
+ String fileName = FileUploadUtils.upload(filePath, file);
+ String url = serverConfig.getUrl() + fileName;
+ AjaxResult ajax = AjaxResult.success();
+ ajax.put("url", url);
+ ajax.put("fileName", fileName);
+ ajax.put("newFileName", FileUtils.getName(fileName));
+ ajax.put("originalFilename", file.getOriginalFilename());
+ return ajax;
+ }
+ catch (Exception e)
+ {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
+ /**
+ * 通用上传请求(多个)
+ */
+ @PostMapping("/uploads")
+ public AjaxResult uploadFiles(List files) throws Exception
+ {
+ try
+ {
+ // 上传文件路径
+ String filePath = RuoYiConfig.getUploadPath();
+ List urls = new ArrayList();
+ List fileNames = new ArrayList();
+ List newFileNames = new ArrayList();
+ List originalFilenames = new ArrayList();
+ for (MultipartFile file : files)
+ {
+ // 上传并返回新文件名称
+ String fileName = FileUploadUtils.upload(filePath, file);
+ String url = serverConfig.getUrl() + fileName;
+ urls.add(url);
+ fileNames.add(fileName);
+ newFileNames.add(FileUtils.getName(fileName));
+ originalFilenames.add(file.getOriginalFilename());
+ }
+ AjaxResult ajax = AjaxResult.success();
+ ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
+ ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
+ ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
+ ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
+ return ajax;
+ }
+ catch (Exception e)
+ {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
+ /**
+ * 本地资源通用下载
+ */
+ @GetMapping("/download/resource")
+ public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
+ throws Exception
+ {
+ try
+ {
+ if (!FileUtils.checkAllowDownload(resource))
+ {
+ throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
+ }
+ // 本地资源路径
+ String localPath = RuoYiConfig.getProfile();
+ // 数据库资源地址
+ String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
+ // 下载名称
+ String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
+ response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+ FileUtils.setAttachmentResponseHeader(response, downloadName);
+ FileUtils.writeBytes(downloadPath, response.getOutputStream());
+ }
+ catch (Exception e)
+ {
+ log.error("下载文件失败", e);
+ }
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/monitor/CacheController.java
similarity index 92%
rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java
rename to acupuncture-admin/src/main/java/com/acupuncture/web/controller/monitor/CacheController.java
index 504c0fde..f06ac1b1 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java
+++ b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/monitor/CacheController.java
@@ -1,121 +1,121 @@
-package com.ruoyi.web.controller.monitor;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeSet;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisCallback;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.constant.CacheConstants;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.domain.SysCache;
-
-/**
- * 缓存监控
- *
- * @author ruoyi
- */
-@RestController
-@RequestMapping("/monitor/cache")
-public class CacheController
-{
- @Autowired
- private RedisTemplate redisTemplate;
-
- private final static List caches = new ArrayList();
- {
- caches.add(new SysCache(CacheConstants.LOGIN_TOKEN_KEY, "用户信息"));
- caches.add(new SysCache(CacheConstants.SYS_CONFIG_KEY, "配置信息"));
- caches.add(new SysCache(CacheConstants.SYS_DICT_KEY, "数据字典"));
- caches.add(new SysCache(CacheConstants.CAPTCHA_CODE_KEY, "验证码"));
- caches.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "防重提交"));
- caches.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "限流处理"));
- caches.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "密码错误次数"));
- }
-
- @PreAuthorize("@ss.hasPermi('monitor:cache:list')")
- @GetMapping()
- public AjaxResult getInfo() throws Exception
- {
- Properties info = (Properties) redisTemplate.execute((RedisCallback