Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
chnmuseum-party
Project
Project
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
liqin
chnmuseum-party
Commits
69da943c
Commit
69da943c
authored
Apr 13, 2021
by
wzp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
a5ddfc3e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
9 deletions
+20
-9
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+1
-1
TBoxOperationController.java
...nmuseum/party/web/controller/TBoxOperationController.java
+12
-4
TUserMapper.xml
src/main/resources/mapper/TUserMapper.xml
+7
-4
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
69da943c
...
@@ -110,7 +110,7 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -110,7 +110,7 @@ public class ChinaMobileRestApiController extends BaseController {
@Resource
@Resource
private
TAppRunPicService
appRunPicService
;
private
TAppRunPicService
appRunPicService
;
private
static
final
String
SHIRO_JWT_TOKEN
=
"shiro:jwt:
t
oken:"
;
private
static
final
String
SHIRO_JWT_TOKEN
=
"shiro:jwt:
macT
oken:"
;
//用户登录次数计数 redisKey 前缀
//用户登录次数计数 redisKey 前缀
private
static
final
String
SHIRO_LOGIN_COUNT
=
"shiro_login_count_"
;
private
static
final
String
SHIRO_LOGIN_COUNT
=
"shiro_login_count_"
;
//用户登录是否被锁定 一小时 redisKey 前缀
//用户登录是否被锁定 一小时 redisKey 前缀
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TBoxOperationController.java
View file @
69da943c
...
@@ -21,13 +21,11 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -21,13 +21,11 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.shiro.authz.annotation.RequiresAuthentication
;
import
org.apache.shiro.authz.annotation.RequiresAuthentication
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <pre>
* <pre>
...
@@ -52,6 +50,8 @@ public class TBoxOperationController extends BaseController {
...
@@ -52,6 +50,8 @@ public class TBoxOperationController extends BaseController {
@Resource
@Resource
private
StringRedisTemplate
stringRedisTemplate
;
private
StringRedisTemplate
stringRedisTemplate
;
private
static
final
String
SHIRO_JWT_MACTOKEN
=
"shiro:jwt:macToken:"
;
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
...
@@ -145,6 +145,14 @@ public class TBoxOperationController extends BaseController {
...
@@ -145,6 +145,14 @@ public class TBoxOperationController extends BaseController {
}
}
if
(
3
==
tBoxOperation
.
getStatus
())
{
if
(
3
==
tBoxOperation
.
getStatus
())
{
tBoxOperation
.
setMac
(
""
);
tBoxOperation
.
setMac
(
""
);
TUser
u
=
userService
.
getOne
(
new
UpdateWrapper
<
TUser
>().
eq
(
"org_id"
,
tBoxOperation
.
getOrganId
()).
eq
(
"type"
,
3
).
eq
(
"is_deleted"
,
false
));
Set
<
String
>
keys
=
stringRedisTemplate
.
keys
(
SHIRO_JWT_MACTOKEN
+
"*"
);
ValueOperations
<
String
,
String
>
value
=
stringRedisTemplate
.
opsForValue
();
for
(
String
key
:
keys
)
{
if
(
u
.
getId
().
equals
(
value
.
get
(
key
))){
stringRedisTemplate
.
delete
(
key
);
}
}
}
}
boolean
flag
=
tBoxOperationService
.
updateById
(
tBoxOperation
);
boolean
flag
=
tBoxOperationService
.
updateById
(
tBoxOperation
);
UpdateWrapper
<
TUser
>
wrapper
=
new
UpdateWrapper
<>();
UpdateWrapper
<
TUser
>
wrapper
=
new
UpdateWrapper
<>();
...
...
src/main/resources/mapper/TUserMapper.xml
View file @
69da943c
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, user_name, password_hash, password_salt, create_time, update_time, org_id, permanent, effective_date, exired_date, status, phone, email, we_chat, telephone, is_deleted, real_name,type
u.id, u.user_name, u.password_hash, u.password_salt, u.create_time, u.update_time, u.org_id, u.permanent, u.effective_date, u.exired_date, u.status, u.phone, u.email, u.we_chat, u.telephone, u.is_deleted, u.real_name,u.type,u.audit_status,u.area_id
</sql>
</sql>
<select
id=
"selectByUsername"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByUsername"
resultMap=
"BaseResultMap"
>
...
@@ -53,7 +53,8 @@
...
@@ -53,7 +53,8 @@
</select>
</select>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
select u.*,o.name org_name,a.full_name area_name
select u.id, u.user_name,u.create_time, u.update_time, u.org_id, u.permanent, u.effective_date, u.exired_date, u.status, u.phone, u.email, u.we_chat, u.telephone, u.is_deleted, u.real_name,u.type,u.audit_status,u.area_id
,o.name org_name,a.full_name area_name
from t_user u
from t_user u
left join t_organ o on o.id = u.org_id
left join t_organ o on o.id = u.org_id
left join t_area a on u.area_id = a.id
left join t_area a on u.area_id = a.id
...
@@ -61,7 +62,8 @@
...
@@ -61,7 +62,8 @@
</select>
</select>
<select
id=
"getList"
resultMap=
"BaseResultMap"
>
<select
id=
"getList"
resultMap=
"BaseResultMap"
>
select u.*,o.name org_name,a.full_name area_name
select u.id, u.user_name,u.create_time, u.update_time, u.org_id, u.permanent, u.effective_date, u.exired_date, u.status, u.phone, u.email, u.we_chat, u.telephone, u.is_deleted, u.real_name,u.type,u.audit_status,u.area_id
,o.name org_name,a.full_name area_name
from t_user u
from t_user u
left join t_organ o on o.id = u.org_id
left join t_organ o on o.id = u.org_id
left join t_area a on u.area_id = a.id
left join t_area a on u.area_id = a.id
...
@@ -96,7 +98,8 @@
...
@@ -96,7 +98,8 @@
<select
id=
"getUserList"
resultMap=
"BaseResultMap"
>
<select
id=
"getUserList"
resultMap=
"BaseResultMap"
>
select u.*,o.name org_name,a.full_name area_name
select u.id, u.user_name, u.create_time, u.update_time, u.org_id, u.permanent, u.effective_date, u.exired_date, u.status, u.phone, u.email, u.we_chat, u.telephone, u.is_deleted, u.real_name,u.type,u.audit_status,u.area_id
,o.name org_name,a.full_name area_name
from t_user u
from t_user u
left join t_organ o on o.id = u.org_id
left join t_organ o on o.id = u.org_id
left join t_area a on u.area_id = a.id
left join t_area a on u.area_id = a.id
...
...
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