Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
api
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
首航-临时账号
api
Commits
b8e6774e
Commit
b8e6774e
authored
Sep 24, 2019
by
java-李谡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加redis方法
parent
fe89cc89
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
18 deletions
+10
-18
jedis-2.9.0.jar
WebContent/WEB-INF/lib/jedis-2.9.0.jar
+0
-0
RedisUtils.java
src/com/ejweb/core/util/RedisUtils.java
+2
-18
UserController.java
src/com/ejweb/modules/user/api/UserController.java
+0
-0
LoginBean.java
src/com/ejweb/modules/user/bean/LoginBean.java
+8
-0
No files found.
WebContent/WEB-INF/lib/jedis-2.9.0.jar
0 → 100644
View file @
b8e6774e
File added
src/com/ejweb/core/util/RedisUtils.java
View file @
b8e6774e
...
@@ -24,7 +24,7 @@ public class RedisUtils {
...
@@ -24,7 +24,7 @@ public class RedisUtils {
* @param indexDb
* @param indexDb
* @return boolean
* @return boolean
**/
**/
public
boolean
exists
(
String
key
,
int
indexDb
)
{
public
boolean
exists
(
String
key
,
int
indexDb
)
{
Jedis
jedis
=
jedisPool
.
getResource
();
Jedis
jedis
=
jedisPool
.
getResource
();
jedis
.
select
(
indexDb
);
jedis
.
select
(
indexDb
);
boolean
exist
=
jedis
.
exists
(
key
);
boolean
exist
=
jedis
.
exists
(
key
);
...
@@ -34,22 +34,6 @@ public class RedisUtils {
...
@@ -34,22 +34,6 @@ public class RedisUtils {
return
exist
;
return
exist
;
}
}
/**
* 删除key
*
* @param key
* @param indexDb
* @return
*/
public
long
del
(
String
key
,
int
indexDb
)
{
Jedis
jedis
=
jedisPool
.
getResource
();
jedis
.
select
(
indexDb
);
long
s
=
jedis
.
del
(
key
);
if
(
null
!=
jedis
&&
null
!=
jedisPool
)
{
returnResource
(
jedisPool
,
jedis
);
}
return
s
;
}
/**
/**
* 通过key获取储存在redis中的value
* 通过key获取储存在redis中的value
...
@@ -124,7 +108,7 @@ public class RedisUtils {
...
@@ -124,7 +108,7 @@ public class RedisUtils {
try
{
try
{
jedis
=
jedisPool
.
getResource
();
jedis
=
jedisPool
.
getResource
();
jedis
.
select
(
indexDb
);
jedis
.
select
(
indexDb
);
Integer
expireTime
=
jedis
.
ttl
(
key
).
intValue
();
Integer
expireTime
=
jedis
.
ttl
(
key
).
intValue
();
res
=
jedis
.
incr
(
key
);
res
=
jedis
.
incr
(
key
);
// jedis.expireAt(key, expireTime);
// jedis.expireAt(key, expireTime);
...
...
src/com/ejweb/modules/user/api/UserController.java
View file @
b8e6774e
This diff is collapsed.
Click to expand it.
src/com/ejweb/modules/user/bean/LoginBean.java
View file @
b8e6774e
...
@@ -17,6 +17,7 @@ public class LoginBean extends GenericBean {
...
@@ -17,6 +17,7 @@ public class LoginBean extends GenericBean {
private
String
verifyCode
;
private
String
verifyCode
;
private
String
permission
;
private
String
permission
;
private
String
clientip
;
private
String
clientip
;
private
String
userIp
;
public
String
getPermission
()
{
public
String
getPermission
()
{
return
permission
;
return
permission
;
...
@@ -58,4 +59,11 @@ public class LoginBean extends GenericBean {
...
@@ -58,4 +59,11 @@ public class LoginBean extends GenericBean {
this
.
clientip
=
clientip
;
this
.
clientip
=
clientip
;
}
}
public
String
getUserIp
()
{
return
userIp
;
}
public
void
setUserIp
(
String
userIp
)
{
this
.
userIp
=
userIp
;
}
}
}
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