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
b01106da
Commit
b01106da
authored
Mar 04, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!14
parents
1c590255
ecf5cf0b
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 @
b01106da
...
...
@@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -41,6 +42,12 @@ import java.util.List;
@Controller
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"
,
"mbr_phone"
);
/** 脱敏字段 */
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"
,
"mbr_card_no"
);
/** 自助查询结果与字段过滤服务 */
@SuppressWarnings
(
"SpringJavaInjectionPointsAutowiringInspection"
)
@Autowired
...
...
@@ -207,12 +214,18 @@ public class FlatQueryController {
Integer
dataPermission
=
this
.
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
SessionContextUtils
.
getLoginUserEnterpriseId
()).
getDataPermission
();
if
(
dataPermission
!=
null
){
for
(
FlatQueryCondition
condition
:
queryConditions
){
if
(
"phone_number"
.
equals
(
condition
.
getFieldName
())){
condition
.
setEnableEncrypt
(
true
);
if
(
dataPermission
==
1
){
if
(
FILTERS_PHONE_ONLY
.
contains
(
condition
.
getFieldName
())){
condition
.
setEnableEncrypt
(
true
);
}
else
{
condition
.
setEnableEncrypt
(
false
);
}
}
if
(
dataPermission
==
2
){
if
(
"card_num"
.
equal
s
(
condition
.
getFieldName
())){
if
(
FILTERS_PHONE_AND_CARD
.
contain
s
(
condition
.
getFieldName
())){
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