Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
d6226507
Commit
d6226507
authored
Jan 09, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加应用serviceApi参数字段
parent
4a534f42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
11 deletions
+26
-11
base-manager/src/main/java/com/mortals/xhx/module/app/dao/ibatis/AppDatasetDaoImpl.java
.../mortals/xhx/module/app/dao/ibatis/AppDatasetDaoImpl.java
+3
-2
base-manager/src/main/java/com/mortals/xhx/module/app/web/AppDatasetController.java
.../com/mortals/xhx/module/app/web/AppDatasetController.java
+20
-9
base-manager/src/test/java/com/mortals/httpclient/app/AppDatasetController.http
...java/com/mortals/httpclient/app/AppDatasetController.http
+3
-0
No files found.
base-manager/src/main/java/com/mortals/xhx/module/app/dao/ibatis/AppDatasetDaoImpl.java
View file @
d6226507
...
@@ -36,8 +36,9 @@ public class AppDatasetDaoImpl extends BaseCRUDDaoMybatis<AppDatasetEntity,Long>
...
@@ -36,8 +36,9 @@ public class AppDatasetDaoImpl extends BaseCRUDDaoMybatis<AppDatasetEntity,Long>
}
else
if
(
pageInfo
.
getPrePageResult
()
==
-
1
)
{
}
else
if
(
pageInfo
.
getPrePageResult
()
==
-
1
)
{
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
SQLID_CUSTOM_LIST
),
paramDto
);
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
SQLID_CUSTOM_LIST
),
paramDto
);
}
else
{
}
else
{
RowBounds
rowBounds
=
new
RowBounds
(
pageInfo
.
getBeginIndex
(),
pageInfo
.
getPrePageResult
());
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
SQLID_CUSTOM_LIST
),
paramDto
);
list
=
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
SQLID_CUSTOM_LIST
),
this
.
cpyQueryParamDto
(
paramDto
),
rowBounds
);
/* RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId(SQLID_CUSTOM_LIST), this.cpyQueryParamDto(paramDto), rowBounds);*/
}
}
pageInfo
.
setTotalResult
(
count
);
pageInfo
.
setTotalResult
(
count
);
result
.
setPageInfo
(
pageInfo
);
result
.
setPageInfo
(
pageInfo
);
...
...
base-manager/src/main/java/com/mortals/xhx/module/app/web/AppDatasetController.java
View file @
d6226507
...
@@ -62,22 +62,33 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
...
@@ -62,22 +62,33 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
@Override
@Override
protected
void
doListBefore
(
AppDatasetEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
protected
void
doListBefore
(
AppDatasetEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
/* if(!ObjectUtils.isEmpty(query.getOrConditionList()))
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getOrConditionList
()))
{
AppDatasetQuery
appDatasetQuery
=
new
AppDatasetQuery
();
AppDatasetQuery
appDatasetQuery
=
new
AppDatasetQuery
();
appDatasetQuery.set
And
ConditionList(query.getOrConditionList());
appDatasetQuery
.
set
Or
ConditionList
(
query
.
getOrConditionList
());
appDatasetQuery
.
setAppId
(
query
.
getAppId
());
appDatasetQuery
.
setAppId
(
query
.
getAppId
());
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
Result
<
AppInfoFieldEntity
>
customResult
=
this
.
service
.
findCustomList
(
appDatasetQuery
,
pageInfo
,
context
);
Result
<
AppInfoFieldEntity
>
customResult
=
this
.
service
.
findCustomList
(
appDatasetQuery
,
pageInfo
,
context
);
//根据查询条件的数量去除数量不足的结果
int
count
=
query
.
getOrConditionList
().
size
();
List
<
Long
>
datasetIdList
=
customResult
.
getList
().
stream
().
map
(
item
->
item
.
getDatasetId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
datasetIdList
=
customResult
.
getList
().
stream
().
map
(
item
->
item
.
getDatasetId
()).
collect
(
Collectors
.
toList
());
if (!ObjectUtils.isEmpty(datasetIdList)) {
Map
<
Long
,
Long
>
collect
=
datasetIdList
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
,
Collectors
.
counting
()));
query.setIdList(datasetIdList);
List
<
Long
>
dataSets
=
collect
.
entrySet
().
stream
().
map
(
entrySet
->
{
if
(
entrySet
.
getValue
()
==
count
)
{
return
entrySet
.
getKey
();
}
else
{
return
null
;
}
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
dataSets
))
{
query
.
setIdList
(
dataSets
);
}
else
{
query
.
setIdList
(
ListUtil
.
toList
(
0L
));
}
}
query
.
setOrConditionList
(
null
);
query
.
setOrConditionList
(
null
);
}
}*/
if
(!
ObjectUtils
.
isEmpty
(
query
.
getFieldCode
())
||
!
ObjectUtils
.
isEmpty
(
query
.
getFieldName
()))
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getFieldCode
())||!
ObjectUtils
.
isEmpty
(
query
.
getFieldName
()))
{
AppDatasetQuery
appDatasetQuery
=
new
AppDatasetQuery
();
AppDatasetQuery
appDatasetQuery
=
new
AppDatasetQuery
();
appDatasetQuery
.
setFieldCode
(
query
.
getFieldCode
());
appDatasetQuery
.
setFieldCode
(
query
.
getFieldCode
());
appDatasetQuery
.
setFieldName
(
query
.
getFieldName
());
appDatasetQuery
.
setFieldName
(
query
.
getFieldName
());
...
@@ -90,7 +101,7 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
...
@@ -90,7 +101,7 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
List
<
Long
>
datasetIdList
=
customResult
.
getList
().
stream
().
map
(
item
->
item
.
getDatasetId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
datasetIdList
=
customResult
.
getList
().
stream
().
map
(
item
->
item
.
getDatasetId
()).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
datasetIdList
))
{
if
(!
ObjectUtils
.
isEmpty
(
datasetIdList
))
{
query
.
setIdList
(
datasetIdList
);
query
.
setIdList
(
datasetIdList
);
}
else
{
}
else
{
query
.
setIdList
(
ListUtil
.
toList
(
0L
));
query
.
setIdList
(
ListUtil
.
toList
(
0L
));
}
}
}
}
...
@@ -113,7 +124,7 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
...
@@ -113,7 +124,7 @@ public class AppDatasetController extends BaseCRUDJsonBodyMappingController<AppD
list
.
add
(
condition
);
list
.
add
(
condition
);
AppDatasetEntity
appDatasetEntity
=
new
AppDatasetEntity
();
AppDatasetEntity
appDatasetEntity
=
new
AppDatasetEntity
();
// appDatasetEntity.setAndConditionList(list);
// appDatasetEntity.setAndConditionList(list);
System
.
out
.
println
(
JSON
.
toJSONString
(
appDatasetEntity
));
System
.
out
.
println
(
JSON
.
toJSONString
(
appDatasetEntity
));
}
}
...
...
base-manager/src/test/java/com/mortals/httpclient/app/AppDatasetController.http
View file @
d6226507
...
@@ -35,6 +35,9 @@ Content-Type: application/json
...
@@ -35,6 +35,9 @@ Content-Type: application/json
{
{
"fieldName": "制定机关",
"fieldName": "制定机关",
"fieldValue": "%四川省人民政府%"
"fieldValue": "%四川省人民政府%"
},{
"fieldName": "标题",
"fieldValue": "%管理办法%"
}
}
],
],
"page": 1,
"page": 1,
...
...
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