Compare commits
No commits in common. "c6e82e54cd68a1f2ee59cd1bc368df8ead957a50" and "1234683bdb6f2e210d88ed9b02dce762312e2001" have entirely different histories.
c6e82e54cd
...
1234683bdb
@ -1,11 +1,11 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
|
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
|
||||||
</p>
|
</p>
|
||||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.9</h1>
|
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.8</h1>
|
||||||
<h4 align="center">基于SpringBoot+Vue前后端分离的Java快速开发框架</h4>
|
<h4 align="center">基于SpringBoot+Vue前后端分离的Java快速开发框架</h4>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Vue/stargazers"><img src="https://gitee.com/y_project/RuoYi-Vue/badge/star.svg?theme=dark"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Vue/stargazers"><img src="https://gitee.com/y_project/RuoYi-Vue/badge/star.svg?theme=dark"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Vue"><img src="https://img.shields.io/badge/RuoYi-v3.8.9-brightgreen.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Vue"><img src="https://img.shields.io/badge/RuoYi-v3.8.8-brightgreen.svg"></a>
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
<a href="https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -91,4 +91,4 @@
|
|||||||
|
|
||||||
## 若依前后端分离交流群
|
## 若依前后端分离交流群
|
||||||
|
|
||||||
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) 点击按钮入群。
|
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) 点击按钮入群。
|
4
pom.xml
4
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<version>3.8.9</version>
|
<version>3.8.8</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<velocity.version>2.3</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<oracle.version>12.2.0.1</oracle.version>
|
<oracle.version>12.2.0.1</oracle.version>
|
||||||
<!-- override dependency version -->
|
<!-- override dependency version -->
|
||||||
<tomcat.version>9.0.98</tomcat.version>
|
<tomcat.version>9.0.96</tomcat.version>
|
||||||
<logback.version>1.2.13</logback.version>
|
<logback.version>1.2.13</logback.version>
|
||||||
<spring-security.version>5.7.12</spring-security.version>
|
<spring-security.version>5.7.12</spring-security.version>
|
||||||
<spring-framework.version>5.3.39</spring-framework.version>
|
<spring-framework.version>5.3.39</spring-framework.version>
|
||||||
|
@ -541,7 +541,7 @@ public class Convert
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换为boolean<br>
|
* 转换为boolean<br>
|
||||||
* String支持的值为:true、false、yes、ok、no、1、0、是、否, 如果给定的值为空,或者转换失败,返回默认值<br>
|
* String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br>
|
||||||
* 转换失败不会报错
|
* 转换失败不会报错
|
||||||
*
|
*
|
||||||
* @param value 被转换的值
|
* @param value 被转换的值
|
||||||
@ -570,12 +570,10 @@ public class Convert
|
|||||||
case "yes":
|
case "yes":
|
||||||
case "ok":
|
case "ok":
|
||||||
case "1":
|
case "1":
|
||||||
case "是":
|
|
||||||
return true;
|
return true;
|
||||||
case "false":
|
case "false":
|
||||||
case "no":
|
case "no":
|
||||||
case "0":
|
case "0":
|
||||||
case "否":
|
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
|
@ -108,6 +108,7 @@ public class Arith
|
|||||||
"The scale must be a positive integer or zero");
|
"The scale must be a positive integer or zero");
|
||||||
}
|
}
|
||||||
BigDecimal b = new BigDecimal(Double.toString(v));
|
BigDecimal b = new BigDecimal(Double.toString(v));
|
||||||
return b.divide(BigDecimal.ONE, scale, RoundingMode.HALF_UP).doubleValue();
|
BigDecimal one = new BigDecimal("1");
|
||||||
|
return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -286,32 +286,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||||||
return str.substring(start, end);
|
return str.substring(start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 在字符串中查找第一个出现的 `open` 和最后一个出现的 `close` 之间的子字符串
|
|
||||||
*
|
|
||||||
* @param str 要截取的字符串
|
|
||||||
* @param open 起始字符串
|
|
||||||
* @param close 结束字符串
|
|
||||||
* @return 截取结果
|
|
||||||
*/
|
|
||||||
public static String substringBetweenLast(final String str, final String open, final String close)
|
|
||||||
{
|
|
||||||
if (isEmpty(str) || isEmpty(open) || isEmpty(close))
|
|
||||||
{
|
|
||||||
return NULLSTR;
|
|
||||||
}
|
|
||||||
final int start = str.indexOf(open);
|
|
||||||
if (start != INDEX_NOT_FOUND)
|
|
||||||
{
|
|
||||||
final int end = str.lastIndexOf(close);
|
|
||||||
if (end != INDEX_NOT_FOUND)
|
|
||||||
{
|
|
||||||
return str.substring(start + open.length(), end);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULLSTR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断是否为空,并且不是空白字符
|
* 判断是否为空,并且不是空白字符
|
||||||
*
|
*
|
||||||
|
@ -21,7 +21,6 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用http发送方法
|
* 通用http发送方法
|
||||||
@ -126,19 +125,6 @@ public class HttpUtils
|
|||||||
* @return 所代表远程资源的响应结果
|
* @return 所代表远程资源的响应结果
|
||||||
*/
|
*/
|
||||||
public static String sendPost(String url, String param)
|
public static String sendPost(String url, String param)
|
||||||
{
|
|
||||||
return sendPost(url, param, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 向指定 URL 发送POST方法的请求
|
|
||||||
*
|
|
||||||
* @param url 发送请求的 URL
|
|
||||||
* @param param 请求参数
|
|
||||||
* @param contentType 内容类型
|
|
||||||
* @return 所代表远程资源的响应结果
|
|
||||||
*/
|
|
||||||
public static String sendPost(String url, String param, String contentType)
|
|
||||||
{
|
{
|
||||||
PrintWriter out = null;
|
PrintWriter out = null;
|
||||||
BufferedReader in = null;
|
BufferedReader in = null;
|
||||||
@ -152,7 +138,7 @@ public class HttpUtils
|
|||||||
conn.setRequestProperty("connection", "Keep-Alive");
|
conn.setRequestProperty("connection", "Keep-Alive");
|
||||||
conn.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)");
|
conn.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)");
|
||||||
conn.setRequestProperty("Accept-Charset", "utf-8");
|
conn.setRequestProperty("Accept-Charset", "utf-8");
|
||||||
conn.setRequestProperty("Content-Type", contentType);
|
conn.setRequestProperty("contentType", "utf-8");
|
||||||
conn.setDoOutput(true);
|
conn.setDoOutput(true);
|
||||||
conn.setDoInput(true);
|
conn.setDoInput(true);
|
||||||
out = new PrintWriter(conn.getOutputStream());
|
out = new PrintWriter(conn.getOutputStream());
|
||||||
@ -204,11 +190,6 @@ public class HttpUtils
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String sendSSLPost(String url, String param)
|
public static String sendSSLPost(String url, String param)
|
||||||
{
|
|
||||||
return sendSSLPost(url, param, MediaType.APPLICATION_FORM_URLENCODED_VALUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String sendSSLPost(String url, String param, String contentType)
|
|
||||||
{
|
{
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
String urlNameString = url + "?" + param;
|
String urlNameString = url + "?" + param;
|
||||||
@ -223,7 +204,7 @@ public class HttpUtils
|
|||||||
conn.setRequestProperty("connection", "Keep-Alive");
|
conn.setRequestProperty("connection", "Keep-Alive");
|
||||||
conn.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)");
|
conn.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)");
|
||||||
conn.setRequestProperty("Accept-Charset", "utf-8");
|
conn.setRequestProperty("Accept-Charset", "utf-8");
|
||||||
conn.setRequestProperty("Content-Type", contentType);
|
conn.setRequestProperty("contentType", "utf-8");
|
||||||
conn.setDoOutput(true);
|
conn.setDoOutput(true);
|
||||||
conn.setDoInput(true);
|
conn.setDoInput(true);
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public class JobInvokeUtil
|
|||||||
*/
|
*/
|
||||||
public static List<Object[]> getMethodParams(String invokeTarget)
|
public static List<Object[]> getMethodParams(String invokeTarget)
|
||||||
{
|
{
|
||||||
String methodStr = StringUtils.substringBetweenLast(invokeTarget, "(", ")");
|
String methodStr = StringUtils.substringBetween(invokeTarget, "(", ")");
|
||||||
if (StringUtils.isEmpty(methodStr))
|
if (StringUtils.isEmpty(methodStr))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@ -1148,7 +1148,6 @@ public class ExcelUtil<T>
|
|||||||
String dictType = attr.dictType();
|
String dictType = attr.dictType();
|
||||||
if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value))
|
if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value))
|
||||||
{
|
{
|
||||||
cell.getCellStyle().setDataFormat(this.wb.getCreationHelper().createDataFormat().getFormat(dateFormat));
|
|
||||||
cell.setCellValue(parseDateToStr(dateFormat, value));
|
cell.setCellValue(parseDateToStr(dateFormat, value));
|
||||||
}
|
}
|
||||||
else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value))
|
else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value))
|
||||||
@ -1449,7 +1448,8 @@ public class ExcelUtil<T>
|
|||||||
*/
|
*/
|
||||||
public String encodingFilename(String filename)
|
public String encodingFilename(String filename)
|
||||||
{
|
{
|
||||||
return UUID.randomUUID() + "_" + filename + ".xlsx";
|
filename = UUID.randomUUID() + "_" + filename + ".xlsx";
|
||||||
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.ruoyi.common.utils.spring;
|
package com.ruoyi.common.utils.spring;
|
||||||
|
|
||||||
import org.springframework.aop.framework.Advised;
|
|
||||||
import org.springframework.aop.framework.AopContext;
|
import org.springframework.aop.framework.AopContext;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||||
@ -121,12 +120,7 @@ public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationC
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static <T> T getAopProxy(T invoker)
|
public static <T> T getAopProxy(T invoker)
|
||||||
{
|
{
|
||||||
Object proxy = AopContext.currentProxy();
|
return (T) AopContext.currentProxy();
|
||||||
if (((Advised) proxy).getTargetSource().getTargetClass() == invoker.getClass())
|
|
||||||
{
|
|
||||||
return (T) proxy;
|
|
||||||
}
|
|
||||||
return invoker;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,10 +17,8 @@ import org.springframework.stereotype.Component;
|
|||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
|
||||||
import com.ruoyi.common.enums.HttpMethod;
|
import com.ruoyi.common.enums.HttpMethod;
|
||||||
import com.ruoyi.common.filter.PropertyPreExcludeFilter;
|
import com.ruoyi.common.filter.PropertyPreExcludeFilter;
|
||||||
import com.ruoyi.common.utils.ExceptionUtil;
|
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
@ -54,7 +52,7 @@ public class LogAspect
|
|||||||
* 处理请求前执行
|
* 处理请求前执行
|
||||||
*/
|
*/
|
||||||
@Before(value = "@annotation(controllerLog)")
|
@Before(value = "@annotation(controllerLog)")
|
||||||
public void doBefore(JoinPoint joinPoint, Log controllerLog)
|
public void boBefore(JoinPoint joinPoint, Log controllerLog)
|
||||||
{
|
{
|
||||||
TIME_THREADLOCAL.set(System.currentTimeMillis());
|
TIME_THREADLOCAL.set(System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
@ -109,7 +107,7 @@ public class LogAspect
|
|||||||
if (e != null)
|
if (e != null)
|
||||||
{
|
{
|
||||||
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
||||||
operLog.setErrorMsg(StringUtils.substring(Convert.toStr(e.getMessage(), ExceptionUtil.getExceptionMessage(e)), 0, 2000));
|
operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
|
||||||
}
|
}
|
||||||
// 设置方法名称
|
// 设置方法名称
|
||||||
String className = joinPoint.getTarget().getClass().getName();
|
String className = joinPoint.getTarget().getClass().getName();
|
||||||
|
@ -18,15 +18,12 @@ public class GenConfig
|
|||||||
/** 生成包路径 */
|
/** 生成包路径 */
|
||||||
public static String packageName;
|
public static String packageName;
|
||||||
|
|
||||||
/** 自动去除表前缀 */
|
/** 自动去除表前缀,默认是true */
|
||||||
public static boolean autoRemovePre;
|
public static boolean autoRemovePre;
|
||||||
|
|
||||||
/** 表前缀 */
|
/** 表前缀(类名不会包含表前缀) */
|
||||||
public static String tablePrefix;
|
public static String tablePrefix;
|
||||||
|
|
||||||
/** 是否允许生成文件覆盖到本地(自定义路径) */
|
|
||||||
public static boolean allowOverwrite;
|
|
||||||
|
|
||||||
public static String getAuthor()
|
public static String getAuthor()
|
||||||
{
|
{
|
||||||
return author;
|
return author;
|
||||||
@ -66,14 +63,4 @@ public class GenConfig
|
|||||||
{
|
{
|
||||||
GenConfig.tablePrefix = tablePrefix;
|
GenConfig.tablePrefix = tablePrefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isAllowOverwrite()
|
|
||||||
{
|
|
||||||
return allowOverwrite;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAllowOverwrite(boolean allowOverwrite)
|
|
||||||
{
|
|
||||||
GenConfig.allowOverwrite = allowOverwrite;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ public class ResourcesConfig implements WebMvcConfigurer
|
|||||||
public CorsFilter corsFilter()
|
public CorsFilter corsFilter()
|
||||||
{
|
{
|
||||||
CorsConfiguration config = new CorsConfiguration();
|
CorsConfiguration config = new CorsConfiguration();
|
||||||
|
config.setAllowCredentials(true);
|
||||||
// 设置访问源地址
|
// 设置访问源地址
|
||||||
config.addAllowedOriginPattern("*");
|
config.addAllowedOriginPattern("*");
|
||||||
// 设置访问源请求头
|
// 设置访问源请求头
|
||||||
|
@ -70,7 +70,7 @@ public class SysPermissionService
|
|||||||
// 设置permissions属性,以便数据权限匹配权限
|
// 设置permissions属性,以便数据权限匹配权限
|
||||||
for (SysRole role : roles)
|
for (SysRole role : roles)
|
||||||
{
|
{
|
||||||
if (StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL) && !role.isAdmin())
|
if (StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL))
|
||||||
{
|
{
|
||||||
Set<String> rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId());
|
Set<String> rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId());
|
||||||
role.setPermissions(rolePerms);
|
role.setPermissions(rolePerms);
|
||||||
|
@ -49,7 +49,7 @@ public class TokenService
|
|||||||
|
|
||||||
protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND;
|
protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND;
|
||||||
|
|
||||||
private static final Long MILLIS_MINUTE_TWENTY = 20 * 60 * 1000L;
|
private static final Long MILLIS_MINUTE_TEN = 20 * 60 * 1000L;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
@ -120,21 +120,20 @@ public class TokenService
|
|||||||
|
|
||||||
Map<String, Object> claims = new HashMap<>();
|
Map<String, Object> claims = new HashMap<>();
|
||||||
claims.put(Constants.LOGIN_USER_KEY, token);
|
claims.put(Constants.LOGIN_USER_KEY, token);
|
||||||
claims.put(Constants.JWT_USERNAME, loginUser.getUsername());
|
|
||||||
return createToken(claims);
|
return createToken(claims);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证令牌有效期,相差不足20分钟,自动刷新缓存
|
* 验证令牌有效期,相差不足20分钟,自动刷新缓存
|
||||||
*
|
*
|
||||||
* @param loginUser 登录信息
|
* @param token 令牌
|
||||||
* @return 令牌
|
* @return 令牌
|
||||||
*/
|
*/
|
||||||
public void verifyToken(LoginUser loginUser)
|
public void verifyToken(LoginUser loginUser)
|
||||||
{
|
{
|
||||||
long expireTime = loginUser.getExpireTime();
|
long expireTime = loginUser.getExpireTime();
|
||||||
long currentTime = System.currentTimeMillis();
|
long currentTime = System.currentTimeMillis();
|
||||||
if (expireTime - currentTime <= MILLIS_MINUTE_TWENTY)
|
if (expireTime - currentTime <= MILLIS_MINUTE_TEN)
|
||||||
{
|
{
|
||||||
refreshToken(loginUser);
|
refreshToken(loginUser);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ public class TableDataInfo implements Serializable
|
|||||||
* @param list 列表数据
|
* @param list 列表数据
|
||||||
* @param total 总记录数
|
* @param total 总记录数
|
||||||
*/
|
*/
|
||||||
public TableDataInfo(List<?> list, long total)
|
public TableDataInfo(List<?> list, int total)
|
||||||
{
|
{
|
||||||
this.rows = list;
|
this.rows = list;
|
||||||
this.total = total;
|
this.total = total;
|
||||||
|
@ -365,7 +365,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
/**
|
/**
|
||||||
* 获取路由名称,如没有配置路由名称则取路由地址
|
* 获取路由名称,如没有配置路由名称则取路由地址
|
||||||
*
|
*
|
||||||
* @param name 路由名称
|
* @param routerName 路由名称
|
||||||
* @param path 路由地址
|
* @param path 路由地址
|
||||||
* @return 路由名称(驼峰格式)
|
* @return 路由名称(驼峰格式)
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,6 @@ import com.ruoyi.common.utils.SecurityUtils;
|
|||||||
import com.ruoyi.common.utils.sql.SqlUtil;
|
import com.ruoyi.common.utils.sql.SqlUtil;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||||
import com.ruoyi.framework.config.GenConfig;
|
|
||||||
import com.ruoyi.framework.web.controller.BaseController;
|
import com.ruoyi.framework.web.controller.BaseController;
|
||||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
@ -214,10 +213,6 @@ public class GenController extends BaseController
|
|||||||
@GetMapping("/genCode/{tableName}")
|
@GetMapping("/genCode/{tableName}")
|
||||||
public AjaxResult genCode(@PathVariable("tableName") String tableName)
|
public AjaxResult genCode(@PathVariable("tableName") String tableName)
|
||||||
{
|
{
|
||||||
if (!GenConfig.isAllowOverwrite())
|
|
||||||
{
|
|
||||||
return AjaxResult.error("【系统预设】不允许生成文件覆盖到本地");
|
|
||||||
}
|
|
||||||
genTableService.generatorCode(tableName);
|
genTableService.generatorCode(tableName);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@ ruoyi:
|
|||||||
# 名称
|
# 名称
|
||||||
name: RuoYi
|
name: RuoYi
|
||||||
# 版本
|
# 版本
|
||||||
version: 3.8.9
|
version: 3.8.8
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2025
|
copyrightYear: 2024
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
profile: D:/ruoyi/uploadPath
|
profile: D:/ruoyi/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
@ -138,5 +138,3 @@ gen:
|
|||||||
autoRemovePre: false
|
autoRemovePre: false
|
||||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||||
tablePrefix: sys_
|
tablePrefix: sys_
|
||||||
# 是否允许生成文件覆盖到本地(自定义路径),默认不允许
|
|
||||||
allowOverwrite: false
|
|
@ -181,6 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
update sys_user
|
update sys_user
|
||||||
<set>
|
<set>
|
||||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||||
|
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||||
<if test="email != null ">email = #{email},</if>
|
<if test="email != null ">email = #{email},</if>
|
||||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||||
|
@ -71,9 +71,9 @@ public class ${ClassName} extends ${Entity}
|
|||||||
{
|
{
|
||||||
return $column.javaField;
|
return $column.javaField;
|
||||||
}
|
}
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
public List<${subClassName}> get${subClassName}List()
|
public List<${subClassName}> get${subClassName}List()
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['${permissionPrefix}:add']"
|
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -144,21 +144,21 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['${permissionPrefix}:edit']"
|
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd(scope.row)"
|
@click="handleAdd(scope.row)"
|
||||||
v-hasPermi="['${permissionPrefix}:add']"
|
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['${permissionPrefix}:remove']"
|
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['${permissionPrefix}:add']"
|
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -86,7 +86,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['${permissionPrefix}:edit']"
|
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -97,7 +97,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['${permissionPrefix}:remove']"
|
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -107,7 +107,7 @@
|
|||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['${permissionPrefix}:export']"
|
v-hasPermi="['${moduleName}:${businessName}:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
@ -158,14 +158,14 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['${permissionPrefix}:edit']"
|
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['${permissionPrefix}:remove']"
|
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
plain
|
plain
|
||||||
icon="Plus"
|
icon="Plus"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['${permissionPrefix}:add']"
|
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -136,9 +136,9 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${permissionPrefix}:add']">新增</el-button>
|
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
plain
|
plain
|
||||||
icon="Plus"
|
icon="Plus"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['${permissionPrefix}:add']"
|
v-hasPermi="['${moduleName}:${businessName}:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -83,7 +83,7 @@
|
|||||||
icon="Edit"
|
icon="Edit"
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['${permissionPrefix}:edit']"
|
v-hasPermi="['${moduleName}:${businessName}:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -93,7 +93,7 @@
|
|||||||
icon="Delete"
|
icon="Delete"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['${permissionPrefix}:remove']"
|
v-hasPermi="['${moduleName}:${businessName}:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@ -102,7 +102,7 @@
|
|||||||
plain
|
plain
|
||||||
icon="Download"
|
icon="Download"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['${permissionPrefix}:export']"
|
v-hasPermi="['${moduleName}:${businessName}:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
@ -148,8 +148,8 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
Loading…
Reference in New Issue
Block a user