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
408b909a
Commit
408b909a
authored
May 31, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置表
parent
73580145
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
CustomSettingApiService.java
...a/com/gic/enterprise/service/CustomSettingApiService.java
+37
-0
CustomSettingApiServiceImpl.java
...prise/service/outer/impl/CustomSettingApiServiceImpl.java
+23
-3
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/CustomSettingApiService.java
View file @
408b909a
...
...
@@ -30,6 +30,43 @@ public interface CustomSettingApiService {
*/
ServiceResponse
<
Map
<
String
,
Object
>>
getDetail
(
String
tableName
,
String
searchParams
);
/**
* getDetail
* @Title: getDetail
* @Description: 查询详情
* @author taogs
* @param tableName
* @param searchParamMap
* @return com.gic.api.base.commons.ServiceResponse<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
ServiceResponse
<
Map
<
String
,
Object
>>
getDetail
(
String
tableName
,
Map
<
String
,
Object
>
searchParamMap
);
/**
* getDetail
* @Title: getDetail
* @Description: 查询详情
* @author taogs
* @param tableName
* @param fieldKey
* @param value
* @return com.gic.api.base.commons.ServiceResponse<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
ServiceResponse
<
Map
<
String
,
Object
>>
getDetail
(
String
tableName
,
String
fieldKey
,
Object
value
);
/**
* getDetail
* @Title: getDetail
* @Description: 查询详情
* @author taogs
* @param tableName
* @param id
* @return com.gic.api.base.commons.ServiceResponse<java.util.Map<java.lang.String,java.lang.Object>>
* @throws
*/
ServiceResponse
<
Map
<
String
,
Object
>>
getDetailByPrimaryKey
(
String
tableName
,
String
id
);
/**
* page
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/CustomSettingApiServiceImpl.java
View file @
408b909a
...
...
@@ -132,14 +132,20 @@ public class CustomSettingApiServiceImpl implements CustomSettingApiService {
@Override
public
ServiceResponse
<
Map
<
String
,
Object
>>
getDetail
(
String
tableName
,
String
searchParams
)
{
log
.
info
(
"getDetail:{},{}"
,
tableName
,
searchParams
);
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
searchParams
,
Map
.
class
);
return
getDetail
(
tableName
,
map
);
}
@Override
public
ServiceResponse
<
Map
<
String
,
Object
>>
getDetail
(
String
tableName
,
Map
<
String
,
Object
>
searchParamMap
)
{
log
.
info
(
"getDetail:{},{}"
,
tableName
,
JSON
.
toJSONString
(
searchParamMap
));
MongoQueryDTO
queryDTO
=
new
MongoQueryDTO
();
if
(
StringUtils
.
isNotBlank
(
searchParams
)){
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
searchParams
,
Map
.
class
);
if
(
MapUtils
.
isNotEmpty
(
searchParamMap
)){
TabTableSetting
tableSetting
=
tableSettingService
.
getTableSetting
(
tableName
);
if
(
tableSetting
==
null
){
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
tableName
+
"不存在"
);
}
List
<
Criteria
>
criteriaList
=
getCriteriaList
(
m
ap
,
tableSetting
);
List
<
Criteria
>
criteriaList
=
getCriteriaList
(
searchParamM
ap
,
tableSetting
);
queryDTO
.
setCriteria
(
criteriaList
);
}
queryDTO
.
setDataBaseName
(
DATABASENAME
);
...
...
@@ -159,6 +165,20 @@ public class CustomSettingApiServiceImpl implements CustomSettingApiService {
}
@Override
public
ServiceResponse
<
Map
<
String
,
Object
>>
getDetail
(
String
tableName
,
String
fieldKey
,
Object
value
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
fieldKey
,
value
);
return
getDetail
(
tableName
,
map
);
}
@Override
public
ServiceResponse
<
Map
<
String
,
Object
>>
getDetailByPrimaryKey
(
String
tableName
,
String
id
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
PRIMARYKEY
,
id
);
return
getDetail
(
tableName
,
map
);
}
@Override
public
ServiceResponse
<
Page
<
Map
>>
page
(
String
tableName
,
String
searchParams
,
Integer
currentPage
,
Integer
pageSize
)
{
log
.
info
(
"page参数:{},{},{},{}"
,
tableName
,
searchParams
,
currentPage
,
pageSize
);
MongoQueryDTO
queryDTO
=
new
MongoQueryDTO
();
...
...
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