Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
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
gechengyang
nouiWithSpringMVC
Commits
739cf430
Commit
739cf430
authored
Sep 13, 2020
by
cjh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库字段暴露前端安全需求修改
parent
1f69863f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
NoUiPresentationUtil.java
.../org/sss/presentation/noui/util/NoUiPresentationUtil.java
+44
-2
No files found.
src/main/java/org/sss/presentation/noui/util/NoUiPresentationUtil.java
View file @
739cf430
...
...
@@ -73,7 +73,7 @@ public class NoUiPresentationUtil {
for
(
Map
<
String
,
Object
>
m
:
valueList
)
{
IModule
module
=
moduleList
.
add
();
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
m
.
entrySet
())
handleDatafield
(
context
,
(
IDatafield
<
Object
>)
module
.
get
(
entry
.
getKey
(
)),
entry
.
getValue
());
handleDatafield
(
context
,
(
IDatafield
<
Object
>)
module
.
get
(
changeForELCS
(
entry
.
getKey
()
)),
entry
.
getValue
());
}
}
}
...
...
@@ -257,7 +257,7 @@ public class NoUiPresentationUtil {
IModule
module
=
moduleList
.
get
(
index
);
Collection
<
IDatafield
>
datafields
=
module
.
getDatafields
();
for
(
IDatafield
<
Object
>
datafield
:
datafields
)
{
map
.
put
(
datafield
.
getName
(
),
handle
(
datafield
.
getValue
(),
datafield
));
map
.
put
(
changeForELCS
(
datafield
.
getName
()
),
handle
(
datafield
.
getValue
(),
datafield
));
}
list
.
add
(
map
);
}
...
...
@@ -349,4 +349,46 @@ public class NoUiPresentationUtil {
return
sysmodBytes
;
}
//偏移 头4 尾7
public
static
String
changeForELCS
(
String
str
){
String
btw_str
=
str
.
substring
(
1
,
str
.
length
()-
1
);
String
head
=
change
(
str
.
charAt
(
0
),
4
);
String
tail
=
change
(
str
.
charAt
(
str
.
length
()-
1
),
7
);
return
head
+
btw_str
+
tail
;
}
//根据偏移量转换字符
public
static
String
change
(
char
ch
,
int
offset
){
int
before
=
ch
;
int
after
;
//a-z
if
(
ch
>=
97
&&
ch
<=
122
){
if
(
before
+
offset
<=
122
){
after
=
before
+
offset
;
}
else
{
after
=
(
before
+
offset
)%
122
+
96
;
}
return
String
.
valueOf
((
char
)
after
);
}
//A-Z
if
(
ch
>=
65
&&
ch
<=
90
){
if
(
before
+
offset
<=
90
){
after
=
before
+
offset
;
}
else
{
after
=
(
before
+
offset
)%
90
+
64
;
}
return
String
.
valueOf
((
char
)
after
);
}
//0-9
if
(
ch
>=
48
&&
ch
<=
57
){
if
(
before
+
offset
<=
57
){
after
=
before
+
offset
;
}
else
{
after
=
(
before
+
offset
)%
57
+
47
;
}
return
String
.
valueOf
((
char
)
after
);
}
return
String
.
valueOf
(
ch
);
}
}
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