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
849b8b53
Commit
849b8b53
authored
Apr 16, 2021
by
wzp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
a4f94d37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
TUserController.java
...nergy/chnmuseum/party/web/controller/TUserController.java
+8
-8
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TUserController.java
View file @
849b8b53
...
...
@@ -173,7 +173,7 @@ public class TUserController extends BaseController {
try
{
TUser
tUser
=
userService
.
selectById
(
id
);
List
<
Role
>
list
=
roleService
.
selectRoleByUserId
(
id
);
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)!=
null
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)
!=
null
)
{
List
<
String
>
list1
=
new
ArrayList
<>();
list
.
forEach
(
r
->
list1
.
add
(
r
.
getId
()));
tUser
.
setRoleList
(
list1
);
...
...
@@ -325,7 +325,7 @@ public class TUserController extends BaseController {
ew
.
eq
(
"type"
,
"3"
);
ew
.
eq
(
"org_id"
,
user
.
getOrgId
());
List
<
TUser
>
list
=
this
.
userService
.
list
(
ew
);
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)!=
null
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)
!=
null
)
{
resultMap
.
put
(
"resultCode"
,
"400"
);
resultMap
.
put
(
"message"
,
"每个单位只能有一个机顶盒账号!"
);
return
resultMap
;
...
...
@@ -353,7 +353,7 @@ public class TUserController extends BaseController {
List
<
String
>
list
=
user
.
getRoleList
();
if
(
null
!=
list
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)!=
null
)
{
if
(
null
!=
list
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)
!=
null
)
{
//查询当前用户拥有的角色
QueryWrapper
<
TUserRole
>
userRoleWrapper
=
new
QueryWrapper
<>();
userRoleWrapper
.
eq
(
"user_id"
,
user
.
getId
());
...
...
@@ -565,9 +565,9 @@ public class TUserController extends BaseController {
return
resultMap
;
}
//密码解密
oldPassWord
=
AESUtils
.
aesDecrypt
(
oldPassWord
);
oldPassWord
=
AESUtils
.
aesDecrypt
(
oldPassWord
);
//密码解密
password
=
AESUtils
.
aesDecrypt
(
password
);
password
=
AESUtils
.
aesDecrypt
(
password
);
if
(
new
String
(
SHA256PasswordEncryptionService
.
createPasswordHash
(
oldPassWord
,
salt
))
.
equals
(
new
String
(
user
.
getPasswordHash
())))
{
...
...
@@ -609,9 +609,9 @@ public class TUserController extends BaseController {
public
Map
<
String
,
Object
>
resetPassword
(
String
userId
)
{
try
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
String
newPassword
=
"gb123456"
;
TUser
user
=
new
TUser
();
user
.
setId
(
userId
);
String
newPassword
=
"gb123456"
;
byte
[]
passwordSalt
=
SecureRandomSaltService
.
generateSalt
();
byte
[]
passwordHash
=
SHA256PasswordEncryptionService
.
createPasswordHash
(
newPassword
,
passwordSalt
);
user
.
setPasswordSalt
(
passwordSalt
);
...
...
@@ -625,7 +625,7 @@ public class TUserController extends BaseController {
stringRedisTemplate
.
delete
(
SHIRO_IS_LOCK
+
userService
.
getById
(
userId
).
getUserName
());
map
.
put
(
"resultCode"
,
"200"
);
map
.
put
(
"message"
,
"重置密码成功"
);
map
.
put
(
"data"
,
newPassword
);
map
.
put
(
"data"
,
""
);
return
map
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"重置密码出错!"
,
e
);
...
...
@@ -672,7 +672,7 @@ public class TUserController extends BaseController {
ew
.
eq
(
"type"
,
"3"
);
ew
.
eq
(
"org_id"
,
user
.
getOrgId
());
List
<
TUser
>
list
=
this
.
userService
.
list
(
ew
);
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)!=
null
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
&&
list
.
get
(
0
)
!=
null
)
{
resultMap
.
put
(
"resultCode"
,
"400"
);
resultMap
.
put
(
"message"
,
"该单位机顶盒账号已存在!"
);
return
resultMap
;
...
...
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