Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
fe343666
Commit
fe343666
authored
Sep 03, 2021
by
季圣华
Browse files
优化功能权限接口
parent
4b9065b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/FunctionController.java
View file @
fe343666
...
...
@@ -161,16 +161,14 @@ public class FunctionController {
item
.
put
(
"value"
,
function
.
getId
());
item
.
put
(
"title"
,
function
.
getName
());
item
.
put
(
"attributes"
,
function
.
getName
());
Boolean
flag
=
ubValue
.
contains
(
"["
+
function
.
getId
().
toString
()
+
"]"
);
if
(
flag
)
{
item
.
put
(
"checked"
,
true
);
}
List
<
Function
>
funList
=
functionService
.
findRoleFunction
(
function
.
getNumber
());
if
(
funList
.
size
()>
0
)
{
JSONArray
funArr
=
getFunctionList
(
funList
,
type
,
keyId
);
item
.
put
(
"children"
,
funArr
);
dataArray
.
add
(
item
);
}
else
{
Boolean
flag
=
ubValue
.
contains
(
"["
+
function
.
getId
().
toString
()
+
"]"
);
item
.
put
(
"checked"
,
flag
);
dataArray
.
add
(
item
);
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/controller/SystemConfigController.java
View file @
fe343666
...
...
@@ -13,6 +13,7 @@ import com.jsh.erp.service.userBusiness.UserBusinessService;
import
com.jsh.erp.utils.BaseResponseInfo
;
import
com.jsh.erp.utils.FileUtils
;
import
com.jsh.erp.utils.StringUtil
;
import
com.jsh.erp.utils.Tools
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -126,6 +127,9 @@ public class SystemConfigController {
if
(
StringUtil
.
isEmpty
(
bizPath
)){
bizPath
=
""
;
}
String
token
=
request
.
getHeader
(
"X-Access-Token"
);
Long
tenantId
=
Tools
.
getTenantIdByToken
(
token
);
bizPath
=
bizPath
+
File
.
separator
+
tenantId
;
savePath
=
this
.
uploadLocal
(
file
,
bizPath
);
if
(
StringUtil
.
isNotEmpty
(
savePath
)){
res
.
code
=
200
;
...
...
Write
Preview
Supports
Markdown
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