name错误修正

pull/28/MERGE
RuoYi 6 years ago
parent cf0c212681
commit eb2a24dc3c

@ -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>

@ -0,0 +1,67 @@
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;
}
}
}

@ -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;

@ -49,7 +49,7 @@ public class AsyncFactory
online.setLastAccessTime(session.getLastAccessTime());
online.setExpireTime(session.getTimeout());
online.setIpaddr(session.getHost());
online.setLonginLocation(AddressUtils.getRealAddressByIP(session.getHost()));
online.setLoginLocation(AddressUtils.getRealAddressByIP(session.getHost()));
online.setBrowser(session.getBrowser());
online.setOs(session.getOs());
online.setStatus(session.getStatus());

@ -25,7 +25,7 @@ public class UserOnline extends BaseEntity
private String ipaddr;
/** 登录地址 */
private String longinLocation;
private String loginLocation;
/** 浏览器类型 */
private String browser;
@ -88,14 +88,14 @@ public class UserOnline extends BaseEntity
this.ipaddr = ipaddr;
}
public String getLonginLocation()
public String getLoginLocation()
{
return longinLocation;
return loginLocation;
}
public void setLonginLocation(String longinLocation)
public void setLoginLocation(String loginLocation)
{
this.longinLocation = longinLocation;
this.loginLocation = loginLocation;
}
public String getBrowser()

@ -5,7 +5,7 @@ import java.util.List;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* sys_menu
* sys_menu
*
* @author ruoyi
*/

@ -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="longinLocation" column="login_location" />
<result property="loginLocation" 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}, #{longinLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
</insert>
<delete id="deleteOnlineById" parameterType="String">

Loading…
Cancel
Save