Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
Project
Project
Details
Activity
Releases
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
TCM
tcm-system
Commits
d67cd8f3
Commit
d67cd8f3
authored
Jul 13, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 7.13
parent
b44c9801
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
13 deletions
+44
-13
UserController.java
...com/pangding/web/authority/controller/UserController.java
+1
-0
CompanyServiceImpl.java
...ngding/web/authority/service/impl/CompanyServiceImpl.java
+21
-3
RegisterServiceImpl.java
...gding/web/authority/service/impl/RegisterServiceImpl.java
+9
-7
UserVo.java
src/main/java/com/pangding/web/authority/vo/UserVo.java
+3
-3
BatchDeleteReqVo.java
...com/pangding/web/authority/vo/reqvo/BatchDeleteReqVo.java
+10
-0
No files found.
src/main/java/com/pangding/web/authority/controller/UserController.java
View file @
d67cd8f3
...
...
@@ -82,4 +82,5 @@ public class UserController {
.
checkException
();
return
ResponseResult
.
result
(
userServiceImpl
.
getUserById
(
webUserReqVo
.
getId
()));
}
}
src/main/java/com/pangding/web/authority/service/impl/CompanyServiceImpl.java
View file @
d67cd8f3
...
...
@@ -691,9 +691,27 @@ public class CompanyServiceImpl implements CompanyService {
throw
new
CodeException
(
"删除列表为空,请添加"
);
}
for
(
String
userId
:
userIdList
)
{
UserGetReqVo
getReqVo
=
new
UserGetReqVo
();
getReqVo
.
setId
(
userId
);
userDaoImpl
.
remove
(
getReqVo
);
UserRoleGetReqVo
userRoleGetReqVo
=
new
UserRoleGetReqVo
();
userRoleGetReqVo
.
setUserId
(
userId
);
List
<
UserRoleVo
>
userRoleVoList
=
userRoleDaoImpl
.
loadList
(
userRoleGetReqVo
,
UserRoleVo
.
class
);
if
(
null
!=
userRoleVoList
&&
userRoleVoList
.
size
()
==
1
){
UserRoleGetReqVo
userRoleGetReqVo1
=
new
UserRoleGetReqVo
();
userRoleGetReqVo1
.
setUserId
(
userId
);
userRoleGetReqVo1
.
setRoleId
(
reqVo
.
getRoleId
());
UserRoleVo
userRoleVo
=
userRoleDaoImpl
.
load
(
userRoleGetReqVo1
,
UserRoleVo
.
class
);
userRoleDaoImpl
.
remove
(
userRoleVo
);
UserGetReqVo
userGetReqVo
=
new
UserGetReqVo
();
userGetReqVo
.
setId
(
userId
);
UserVo
userVo
=
userDaoImpl
.
load
(
userGetReqVo
,
UserVo
.
class
);
userVo
.
setStatus
(
1
);
userDaoImpl
.
update
(
userVo
);
}
else
if
(
null
!=
userRoleVoList
&&
userRoleVoList
.
size
()
>
1
){
UserRoleGetReqVo
userRoleGetReqVo1
=
new
UserRoleGetReqVo
();
userRoleGetReqVo1
.
setUserId
(
userId
);
userRoleGetReqVo1
.
setRoleId
(
reqVo
.
getRoleId
());
UserRoleVo
userRoleVo
=
userRoleDaoImpl
.
load
(
userRoleGetReqVo1
,
UserRoleVo
.
class
);
userRoleDaoImpl
.
remove
(
userRoleVo
);
}
}
}
...
...
src/main/java/com/pangding/web/authority/service/impl/RegisterServiceImpl.java
View file @
d67cd8f3
...
...
@@ -28,9 +28,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpSession
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.*
;
/**
* @Author zhangjinyao
...
...
@@ -413,19 +411,23 @@ public class RegisterServiceImpl implements RegisterService {
for
(
UserRoleVo
userRoleVo:
userRoleVoList
)
{
roleIdList
.
add
(
userRoleVo
.
getRoleId
());
}
List
<
String
>
authorityIdList
=
new
ArrayList
();
Set
authorityIdSet
=
new
HashSet
();
for
(
String
roleId:
roleIdList
)
{
RoleAuthorityGetReqVo
roleAuthorityGetReqVo
=
new
RoleAuthorityGetReqVo
();
roleAuthorityGetReqVo
.
setRoleId
(
roleId
);
List
<
RoleAuthorityVo
>
roleAuthorityVoList
=
roleAuthorityDaoImpl
.
loadList
(
roleAuthorityGetReqVo
,
RoleAuthorityVo
.
class
);
if
(
roleAuthorityVoList
!=
null
&&
!
roleAuthorityVoList
.
isEmpty
()){
List
<
String
>
authorityIds
=
new
ArrayList
();
for
(
RoleAuthorityVo
roleAuthorityVo:
roleAuthorityVoList
)
{
authorityId
s
.
add
(
roleAuthorityVo
.
getAuthorityId
());
authorityId
Set
.
add
(
roleAuthorityVo
.
getAuthorityId
());
}
authorityIdList
.
addAll
(
authorityIds
);
}
}
List
<
String
>
authorityIdList
=
new
ArrayList
();
Object
[]
objs
=
authorityIdSet
.
toArray
();
for
(
Object
obj:
objs
)
{
authorityIdList
.
add
((
String
)
obj
);
}
List
<
AuthorityVo
>
levelOneList
=
new
ArrayList
();
for
(
int
i
=
0
;
i
<
authorityIdList
.
size
();
i
++)
{
AuthorityGetReqVo
authorityGetReqVo
=
new
AuthorityGetReqVo
();
...
...
src/main/java/com/pangding/web/authority/vo/UserVo.java
View file @
d67cd8f3
...
...
@@ -24,7 +24,7 @@ public class UserVo extends BaseVo implements InitDao {
private
String
phone
;
private
String
status
;
private
Integer
status
;
private
String
remark
;
...
...
@@ -103,11 +103,11 @@ public class UserVo extends BaseVo implements InitDao {
this
.
phone
=
phone
;
}
public
String
getStatus
()
{
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
...
...
src/main/java/com/pangding/web/authority/vo/reqvo/BatchDeleteReqVo.java
View file @
d67cd8f3
...
...
@@ -9,8 +9,18 @@ import java.util.List;
public
class
BatchDeleteReqVo
{
private
String
reqId
;
private
String
roleId
;
private
List
<
String
>
userIdList
;
public
String
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
String
roleId
)
{
this
.
roleId
=
roleId
;
}
public
String
getReqId
()
{
return
reqId
;
}
...
...
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