Commit 2b7715ae authored by Quxl's avatar Quxl

xxx

parent e9aa114f
...@@ -108,7 +108,7 @@ public class AdminTokenServiceImpl implements AdminTokenService { ...@@ -108,7 +108,7 @@ public class AdminTokenServiceImpl implements AdminTokenService {
String path = request.getRequestURI().replace(request.getContextPath(), ""); String path = request.getRequestURI().replace(request.getContextPath(), "");
String prefix = path.split("/")[1]; String prefix = path.split("/")[1];
String content = JSON.toJSONString(request.getParameterMap()); String content = JSON.toJSONString(request.getParameterMap());
String ip = ServletUtil.readReqJson(request); String ip = ServletUtil.remoteIp(request);
String sql = "insert into fc_logs (type, loginid, prefix, path, ip, content, create_time) values (?, ?, ?, ?, ?, ?, ?)"; String sql = "insert into fc_logs (type, loginid, prefix, path, ip, content, create_time) values (?, ?, ?, ?, ?, ?, ?)";
Object[] objs = new Object[]{LOG_TYPE, loginid, prefix, path, ip, content, now}; Object[] objs = new Object[]{LOG_TYPE, loginid, prefix, path, ip, content, now};
jdbcTemplate.executeUpdate(sql, objs); jdbcTemplate.executeUpdate(sql, objs);
......
...@@ -112,7 +112,7 @@ public class MemberTokenServiceImpl implements MemberTokenService { ...@@ -112,7 +112,7 @@ public class MemberTokenServiceImpl implements MemberTokenService {
String path = request.getRequestURI().replace(request.getContextPath(), ""); String path = request.getRequestURI().replace(request.getContextPath(), "");
String prefix = path.split("/")[1]; String prefix = path.split("/")[1];
String content = JSON.toJSONString(request.getParameterMap()); String content = JSON.toJSONString(request.getParameterMap());
String ip = ServletUtil.readReqJson(request); String ip = ServletUtil.remoteIp(request);
String sql = "insert into fc_logs (type, loginid, prefix, path, ip, content, create_time) values (?, ?, ?, ?, ?, ?, ?)"; String sql = "insert into fc_logs (type, loginid, prefix, path, ip, content, create_time) values (?, ?, ?, ?, ?, ?, ?)";
Object[] objs = new Object[]{LOG_TYPE, loginid, prefix, path, ip, content, now}; Object[] objs = new Object[]{LOG_TYPE, loginid, prefix, path, ip, content, now};
jdbcTemplate.executeUpdate(sql, objs); jdbcTemplate.executeUpdate(sql, objs);
......
...@@ -103,7 +103,7 @@ public class UserTokenServiceImpl implements UserTokenService { ...@@ -103,7 +103,7 @@ public class UserTokenServiceImpl implements UserTokenService {
String path = request.getRequestURI().replace(request.getContextPath(), ""); String path = request.getRequestURI().replace(request.getContextPath(), "");
String prefix = path.split("/")[1]; String prefix = path.split("/")[1];
String content = JSON.toJSONString(request.getParameterMap()); String content = JSON.toJSONString(request.getParameterMap());
String ip = ServletUtil.readReqJson(request); String ip = ServletUtil.remoteIp(request);
String sql = "insert into fc_logs (type, loginid, prefix, path, ip, content, create_time) values (?, ?, ?, ?, ?, ?, ?)"; String sql = "insert into fc_logs (type, loginid, prefix, path, ip, content, create_time) values (?, ?, ?, ?, ?, ?, ?)";
Object[] objs = new Object[]{LOG_TYPE, loginid, prefix, path, ip, content, now}; Object[] objs = new Object[]{LOG_TYPE, loginid, prefix, path, ip, content, now};
jdbcTemplate.executeUpdate(sql, objs); jdbcTemplate.executeUpdate(sql, objs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment