Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue
Conflicts: ruoyi-ui/src/views/monitor/online/index.vue ruoyi-ui/src/views/system/user/index.vue ruoyi-ui/vue.config.js ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java
This commit is contained in:
commit
c53d5fd1f6
|
@ -0,0 +1,2 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
|
@ -39,7 +39,7 @@
|
||||||
<el-table-column label="登录名称" align="center" prop="userName" :show-overflow-tooltip="true" />
|
<el-table-column label="登录名称" align="center" prop="userName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="部门名称" align="center" prop="deptName" />
|
<el-table-column label="部门名称" align="center" prop="deptName" />
|
||||||
<el-table-column label="主机" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
|
<el-table-column label="主机" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="登录地点" align="center" prop="loginLocation" />
|
<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="浏览器" align="center" prop="browser" />
|
<el-table-column label="浏览器" align="center" prop="browser" />
|
||||||
<el-table-column label="操作系统" align="center" prop="os" />
|
<el-table-column label="操作系统" align="center" prop="os" />
|
||||||
<el-table-column label="登录时间" align="center" prop="loginTime" width="180">
|
<el-table-column label="登录时间" align="center" prop="loginTime" width="180">
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
<el-table-column label="用户编号" align="center" prop="userId" />
|
<el-table-column label="用户编号" align="center" prop="userId" />
|
||||||
<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" />
|
<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="用户昵称" align="center" prop="nickName" :show-overflow-tooltip="true" />
|
<el-table-column label="用户昵称" align="center" prop="nickName" :show-overflow-tooltip="true" />
|
||||||
|
|
|
@ -117,7 +117,11 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
config.optimization.runtimeChunk('single')
|
config.optimization.runtimeChunk('single'),
|
||||||
|
{
|
||||||
|
from: path.resolve(__dirname, './public/robots.txt'),//防爬虫文件
|
||||||
|
to:'./',//到根目录下
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class HttpUtils
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String urlNameString = url + "?" + param;
|
String urlNameString = url;
|
||||||
log.info("sendPost - {}", urlNameString);
|
log.info("sendPost - {}", urlNameString);
|
||||||
URL realUrl = new URL(urlNameString);
|
URL realUrl = new URL(urlNameString);
|
||||||
URLConnection conn = realUrl.openConnection();
|
URLConnection conn = realUrl.openConnection();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.html.EscapeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取IP方法
|
* 获取IP方法
|
||||||
|
@ -40,7 +41,7 @@ public class IpUtils
|
||||||
{
|
{
|
||||||
ip = request.getRemoteAddr();
|
ip = request.getRemoteAddr();
|
||||||
}
|
}
|
||||||
|
ip = EscapeUtil.clean(ip);// 清除Xss特殊字符
|
||||||
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,11 +58,11 @@ public class GenUtils
|
||||||
{
|
{
|
||||||
column.setHtmlType(GenConstants.HTML_INPUT);
|
column.setHtmlType(GenConstants.HTML_INPUT);
|
||||||
|
|
||||||
// 如果是浮点型
|
// 如果是浮点型 统一用BigDecimal
|
||||||
String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
|
String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
|
||||||
if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0)
|
if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0)
|
||||||
{
|
{
|
||||||
column.setJavaType(GenConstants.TYPE_DOUBLE);
|
column.setJavaType(GenConstants.TYPE_BIGDECIMAL);
|
||||||
}
|
}
|
||||||
// 如果是整形
|
// 如果是整形
|
||||||
else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)
|
else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)
|
||||||
|
|
Loading…
Reference in New Issue