Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
eb2a24dc
Commit
eb2a24dc
authored
Sep 29, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
name错误修正
parent
cf0c2126
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
12 deletions
+79
-12
pom.xml
+2
-1
src/main/java/com/ruoyi/common/utils/Md5Utils.java
+67
-0
src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
+1
-2
src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java
+1
-1
src/main/java/com/ruoyi/project/monitor/online/domain/UserOnline.java
+5
-5
src/main/java/com/ruoyi/project/system/menu/domain/Menu.java
+1
-1
src/main/resources/mybatis/monitor/OnlineMapper.xml
+2
-2
No files found.
pom.xml
View file @
eb2a24dc
...
...
@@ -36,6 +36,7 @@
<kaptcha.version>
2.3.2
</kaptcha.version>
<swagger.version>
2.7.0
</swagger.version>
<jsoup.version>
1.11.3
</jsoup.version>
<poi.version>
3.17
</poi.version>
</properties>
<dependencies>
...
...
@@ -238,7 +239,7 @@
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
3.17
</version>
<version>
${poi.version}
</version>
</dependency>
</dependencies>
...
...
src/main/java/com/ruoyi/common/utils/Md5Utils.java
0 → 100644
View file @
eb2a24dc
package
com
.
ruoyi
.
common
.
utils
;
import
java.security.MessageDigest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* Md5加密方法
*
* @author ruoyi
*/
public
class
Md5Utils
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
Md5Utils
.
class
);
private
static
byte
[]
md5
(
String
s
)
{
MessageDigest
algorithm
;
try
{
algorithm
=
MessageDigest
.
getInstance
(
"MD5"
);
algorithm
.
reset
();
algorithm
.
update
(
s
.
getBytes
(
"UTF-8"
));
byte
[]
messageDigest
=
algorithm
.
digest
();
return
messageDigest
;
}
catch
(
Exception
e
)
{
log
.
error
(
"MD5 Error..."
,
e
);
}
return
null
;
}
private
static
final
String
toHex
(
byte
hash
[])
{
if
(
hash
==
null
)
{
return
null
;
}
StringBuffer
buf
=
new
StringBuffer
(
hash
.
length
*
2
);
int
i
;
for
(
i
=
0
;
i
<
hash
.
length
;
i
++)
{
if
((
hash
[
i
]
&
0xff
)
<
0x10
)
{
buf
.
append
(
"0"
);
}
buf
.
append
(
Long
.
toString
(
hash
[
i
]
&
0xff
,
16
));
}
return
buf
.
toString
();
}
public
static
String
hash
(
String
s
)
{
try
{
return
new
String
(
toHex
(
md5
(
s
)).
getBytes
(
"UTF-8"
),
"UTF-8"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"not supported charset...{}"
,
e
);
return
s
;
}
}
}
src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
View file @
eb2a24dc
...
...
@@ -37,7 +37,6 @@ import org.slf4j.LoggerFactory;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel
;
import
com.ruoyi.framework.config.RuoYiConfig
;
import
com.ruoyi.framework.shiro.web.session.OnlineWebSessionManager
;
import
com.ruoyi.framework.web.domain.AjaxResult
;
/**
...
...
@@ -47,7 +46,7 @@ import com.ruoyi.framework.web.domain.AjaxResult;
*/
public
class
ExcelUtil
<
T
>
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
OnlineWebSessionManager
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
ExcelUtil
.
class
);
public
Class
<
T
>
clazz
;
...
...
src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java
View file @
eb2a24dc
...
...
@@ -49,7 +49,7 @@ public class AsyncFactory
online
.
setLastAccessTime
(
session
.
getLastAccessTime
());
online
.
setExpireTime
(
session
.
getTimeout
());
online
.
setIpaddr
(
session
.
getHost
());
online
.
setLo
n
ginLocation
(
AddressUtils
.
getRealAddressByIP
(
session
.
getHost
()));
online
.
setLoginLocation
(
AddressUtils
.
getRealAddressByIP
(
session
.
getHost
()));
online
.
setBrowser
(
session
.
getBrowser
());
online
.
setOs
(
session
.
getOs
());
online
.
setStatus
(
session
.
getStatus
());
...
...
src/main/java/com/ruoyi/project/monitor/online/domain/UserOnline.java
View file @
eb2a24dc
...
...
@@ -25,7 +25,7 @@ public class UserOnline extends BaseEntity
private
String
ipaddr
;
/** 登录地址 */
private
String
lo
n
ginLocation
;
private
String
loginLocation
;
/** 浏览器类型 */
private
String
browser
;
...
...
@@ -88,14 +88,14 @@ public class UserOnline extends BaseEntity
this
.
ipaddr
=
ipaddr
;
}
public
String
getLo
n
ginLocation
()
public
String
getLoginLocation
()
{
return
lo
n
ginLocation
;
return
loginLocation
;
}
public
void
setLo
nginLocation
(
String
lon
ginLocation
)
public
void
setLo
ginLocation
(
String
lo
ginLocation
)
{
this
.
lo
nginLocation
=
lon
ginLocation
;
this
.
lo
ginLocation
=
lo
ginLocation
;
}
public
String
getBrowser
()
...
...
src/main/java/com/ruoyi/project/system/menu/domain/Menu.java
View file @
eb2a24dc
...
...
@@ -5,7 +5,7 @@ import java.util.List;
import
com.ruoyi.framework.web.domain.BaseEntity
;
/**
*
角色对象
sys_menu
*
菜单权限表
sys_menu
*
* @author ruoyi
*/
...
...
src/main/resources/mybatis/monitor/OnlineMapper.xml
View file @
eb2a24dc
...
...
@@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"loginName"
column=
"login_name"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"ipaddr"
column=
"ipaddr"
/>
<result
property=
"lo
nginLocation"
column=
"login_location"
/>
<result
property=
"lo
ginLocation"
column=
"login_location"
/>
<result
property=
"browser"
column=
"browser"
/>
<result
property=
"os"
column=
"os"
/>
<result
property=
"status"
column=
"status"
/>
...
...
@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert
id=
"saveOnline"
parameterType=
"UserOnline"
>
replace into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{lo
n
ginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
</insert>
<delete
id=
"deleteOnlineById"
parameterType=
"String"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment