Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-cloud
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
data-hook
gic-cloud
Commits
4dee674f
Commit
4dee674f
authored
Mar 04, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取数平台 脱敏字段调整
parent
6ccb9470
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
FlatQueryController.java
...java/com/gic/cloud/data/hook/web/FlatQueryController.java
+16
-3
No files found.
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/web/FlatQueryController.java
View file @
4dee674f
...
@@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -41,6 +42,12 @@ import java.util.List;
...
@@ -41,6 +42,12 @@ import java.util.List;
@Controller
@Controller
public
class
FlatQueryController
{
public
class
FlatQueryController
{
/** 脱敏字段 */
public
static
final
List
<
String
>
FILTERS_PHONE_ONLY
=
Arrays
.
asList
(
"mobile"
,
"phone"
,
"enterprise_name"
,
"phone_number"
,
"receive_phone_number"
,
"use_phone_number"
);
/** 脱敏字段 */
public
static
final
List
<
String
>
FILTERS_PHONE_AND_CARD
=
Arrays
.
asList
(
"card_num"
,
"mobile"
,
"phone"
,
"enterprise_name"
,
"phone_number"
,
"receive_phone_number"
,
"receive_card_num"
,
"use_phone_number"
,
"use_card_num"
);
/** 自助查询结果与字段过滤服务 */
/** 自助查询结果与字段过滤服务 */
@SuppressWarnings
(
"SpringJavaInjectionPointsAutowiringInspection"
)
@SuppressWarnings
(
"SpringJavaInjectionPointsAutowiringInspection"
)
@Autowired
@Autowired
...
@@ -207,12 +214,18 @@ public class FlatQueryController {
...
@@ -207,12 +214,18 @@ public class FlatQueryController {
Integer
dataPermission
=
this
.
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
SessionContextUtils
.
getLoginUserEnterpriseId
()).
getDataPermission
();
Integer
dataPermission
=
this
.
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
SessionContextUtils
.
getLoginUserEnterpriseId
()).
getDataPermission
();
if
(
dataPermission
!=
null
){
if
(
dataPermission
!=
null
){
for
(
FlatQueryCondition
condition
:
queryConditions
){
for
(
FlatQueryCondition
condition
:
queryConditions
){
if
(
"phone_number"
.
equals
(
condition
.
getFieldName
())){
if
(
dataPermission
==
1
){
condition
.
setEnableEncrypt
(
true
);
if
(
FILTERS_PHONE_ONLY
.
contains
(
condition
.
getFieldName
())){
condition
.
setEnableEncrypt
(
true
);
}
else
{
condition
.
setEnableEncrypt
(
false
);
}
}
}
if
(
dataPermission
==
2
){
if
(
dataPermission
==
2
){
if
(
"card_num"
.
equal
s
(
condition
.
getFieldName
())){
if
(
FILTERS_PHONE_AND_CARD
.
contain
s
(
condition
.
getFieldName
())){
condition
.
setEnableEncrypt
(
true
);
condition
.
setEnableEncrypt
(
true
);
}
else
{
condition
.
setEnableEncrypt
(
false
);
}
}
}
}
}
}
...
...
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