Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
08ab5f2d
Commit
08ab5f2d
authored
May 21, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置表
parent
5092c583
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
CustomSettingApiServiceImpl.java
...prise/service/outer/impl/CustomSettingApiServiceImpl.java
+9
-2
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/CustomSettingApiServiceImpl.java
View file @
08ab5f2d
...
...
@@ -46,7 +46,7 @@ public class CustomSettingApiServiceImpl implements CustomSettingApiService {
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
tableName
+
"不存在"
);
}
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
params
,
Map
.
class
);
String
repeateSetting
=
tableSetting
.
get
RepeateSetting
();
String
repeateSetting
=
tableSetting
.
get
Fields
();
if
(
StringUtils
.
isNotBlank
(
repeateSetting
)){
String
[]
split
=
repeateSetting
.
split
(
","
);
List
<
Criteria
>
criteriaList
=
new
ArrayList
<>();
...
...
@@ -64,7 +64,14 @@ public class CustomSettingApiServiceImpl implements CustomSettingApiService {
queryDTO
.
setConllectionName
(
tableName
);
ServiceResponse
<
List
<
Map
>>
query
=
mongoOperApiService
.
query
(
queryDTO
);
if
(
CollectionUtils
.
isNotEmpty
(
query
.
getResult
())){
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"存在重复记录"
);
if
(
tableSetting
.
getRepeateOpt
()
!=
null
&&
tableSetting
.
getRepeateOpt
()
==
1
){
//等于1表示重复更新
Map
exitMap
=
query
.
getResult
().
get
(
0
);
map
.
forEach
((
k
,
v
)
->
exitMap
.
put
(
k
,
v
));
map
=
exitMap
;
}
else
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"存在重复记录"
);
}
}
}
if
(
map
.
get
(
PRIMARYKEY
)
!=
null
){
...
...
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