Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tagManager
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
lanmw
tagManager
Commits
17c724b7
Commit
17c724b7
authored
Jan 11, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取当前登录用户机构接口
parent
16a7be87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
auth-common-1.0.2-SNAPSHOT.jar
lib/auth-common-1.0.2-SNAPSHOT.jar
+0
-0
TagCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
+5
-5
TagFileCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagFileCtrl.java
+3
-2
No files found.
lib/auth-common-1.0.2-SNAPSHOT.jar
View file @
17c724b7
No preview for this file type
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
View file @
17c724b7
...
...
@@ -73,7 +73,7 @@ public class TagCtrl {
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
,
@RequestParam
(
required
=
false
)
String
deptIdPath
)
throws
TagNotExistException
{
//获取当前登录用户机构
deptIdPath
=
UserInfoUtils
.
getDataRoleOrg
(
);
deptIdPath
=
/**UserInfoUtils.getDataRoleOrg()*/
String
.
valueOf
(
GrantedAuthHelper
.
getUserOrg
()
);
//考虑一个用户对应多个机构的情况
List
<
String
>
orgIds
=
new
ArrayList
<>();
...
...
@@ -87,7 +87,7 @@ public class TagCtrl {
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
,
@RequestParam
(
required
=
false
)
String
deptIdPath
)
throws
TagNotExistException
{
//获取当前登录用户机构id
deptIdPath
=
UserInfoUtils
.
getDataRoleOrg
(
);
deptIdPath
=
/**UserInfoUtils.getDataRoleOrg()*/
String
.
valueOf
(
GrantedAuthHelper
.
getUserOrg
()
);
//考虑一个用户对应多个机构的情况
List
<
String
>
orgIds
=
new
ArrayList
<>();
orgIds
.
add
(
deptIdPath
);
...
...
@@ -106,7 +106,7 @@ public class TagCtrl {
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
)
throws
TagNotExistException
{
String
userName
=
UserInfoUtils
.
getUserId
();
deptIdPath
=
UserInfoUtils
.
getDataRoleOrg
(
);
deptIdPath
=
/**UserInfoUtils.getDataRoleOrg()*/
String
.
valueOf
(
GrantedAuthHelper
.
getUserOrg
()
);
//考虑一个用户对应多个机构的情况
List
<
String
>
orgIds
=
new
ArrayList
<>();
orgIds
.
add
(
deptIdPath
);
...
...
@@ -123,7 +123,7 @@ public class TagCtrl {
@RequestParam
(
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
"pageSize"
)
Integer
pageSize
)
throws
TagNotExistException
{
String
userName
=
UserInfoUtils
.
getUserId
();
deptIdPath
=
UserInfoUtils
.
getDataRoleOrg
(
);
deptIdPath
=
/**UserInfoUtils.getDataRoleOrg()*/
String
.
valueOf
(
GrantedAuthHelper
.
getUserOrg
()
);
//考虑一个用户对应多个机构的情况
List
<
String
>
orgIds
=
new
ArrayList
<>();
orgIds
.
add
(
deptIdPath
);
...
...
@@ -155,7 +155,7 @@ public class TagCtrl {
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
,
@RequestParam
(
required
=
false
)
String
deptIdPath
)
throws
TagNotExistException
{
String
userName
=
UserInfoUtils
.
getUserId
();
deptIdPath
=
UserInfoUtils
.
getDataRoleOrg
(
);
deptIdPath
=
/**UserInfoUtils.getDataRoleOrg()*/
String
.
valueOf
(
GrantedAuthHelper
.
getUserOrg
()
);
//考虑一个用户对应多个机构的情况
List
<
String
>
orgIds
=
new
ArrayList
<>();
orgIds
.
add
(
deptIdPath
);
...
...
src/main/java/com/keymobile/tagmanager/api/TagFileCtrl.java
View file @
17c724b7
...
...
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.keymobile.auth.common.security.GrantedAuthHelper
;
import
com.keymobile.tagmanager.model.Page
;
import
com.keymobile.tagmanager.service.TagFileService
;
import
com.keymobile.tagmanager.util.UserInfoUtils
;
...
...
@@ -27,7 +28,7 @@ public class TagFileCtrl {
@GetMapping
(
"/exportTag"
)
public
int
export
(
HttpServletResponse
response
,
@RequestParam
(
required
=
false
,
value
=
"deptIdPath"
)
String
deptIdPath
)
{
deptIdPath
=
UserInfoUtils
.
getDataRoleOrg
(
);
deptIdPath
=
/**UserInfoUtils.getDataRoleOrg()*/
String
.
valueOf
(
GrantedAuthHelper
.
getUserOrg
()
);
return
tagExportService
.
exportExcel
(
deptIdPath
,
response
);
}
...
...
@@ -36,7 +37,7 @@ public class TagFileCtrl {
@RequestParam
(
required
=
false
,
value
=
"deptIdPath"
)
String
deptIdPath
)
throws
Exception
{
String
userName
=
UserInfoUtils
.
getUserName
();
String
userId
=
UserInfoUtils
.
getUserId
();
deptIdPath
=
UserInfoUtils
.
getDataRoleOrg
(
);
deptIdPath
=
/**UserInfoUtils.getDataRoleOrg()*/
String
.
valueOf
(
GrantedAuthHelper
.
getUserOrg
()
);
return
tagExportService
.
importExcel
(
userName
,
userId
,
deptIdPath
,
file
);
}
...
...
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