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
619a7bfe
Commit
619a7bfe
authored
Mar 06, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试 事项查询
parent
0ee29257
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
4 deletions
+46
-4
base-manager/src/main/java/com/mortals/xhx/busiz/web/DemoWebApiController.java
.../java/com/mortals/xhx/busiz/web/DemoWebApiController.java
+26
-3
base-manager/src/main/resources/config/mybatis-sqlmap-config.xml
...nager/src/main/resources/config/mybatis-sqlmap-config.xml
+1
-1
base-manager/src/test/java/com/mortals/httpclient/system/system.http
...r/src/test/java/com/mortals/httpclient/system/system.http
+19
-0
No files found.
base-manager/src/main/java/com/mortals/xhx/busiz/web/DemoWebApiController.java
View file @
619a7bfe
...
...
@@ -225,8 +225,7 @@ public class DemoWebApiController {
@UnAuth
public
Rest
<
String
>
testAllMatterPage
(
@RequestBody
SiteEntity
siteEntity
)
{
StopWatch
stopWatch
=
new
StopWatch
(
"stopwatch syncmatter"
);
log
.
info
(
"开始查询事项=="
);
stopWatch
.
start
(
"开始同步事项方法"
);
log
.
info
(
"开始分页查询事项=="
);
MatterQuery
matterQuery
=
new
MatterQuery
();
matterQuery
.
setAreaCode
(
siteEntity
.
getAreaCode
());
matterQuery
.
setSource
(
SourceEnum
.
政务网
.
getValue
());
...
...
@@ -236,18 +235,21 @@ public class DemoWebApiController {
if
(!
ObjectUtils
.
isEmpty
(
matterQuery
.
getSource
()))
{
param
.
getCondition
().
put
(
"source"
,
matterQuery
.
getSource
());
}
int
count
=
matterService
.
getDao
().
getMatterListByAreaCodeCount
(
param
);
log
.
info
(
"本地事项总数:{}"
,
count
);
ArrayList
<
MatterEntity
>
allList
=
new
ArrayList
<>();
if
(
count
>
0
)
{
//分页获取
int
pages
=
count
/
500
+
1
;
for
(
int
i
=
1
;
i
<=
pages
;
i
++)
{
stopWatch
.
start
(
"开始同步事项方法"
);
PageInfo
pageInfo
=
new
PageInfo
();
pageInfo
.
setCurrPage
(
i
);
pageInfo
.
setPrePageResult
(
500
);
Result
<
MatterEntity
>
rest
=
matterService
.
getDao
().
getMatterListByAreaCodePage
(
matterQuery
,
pageInfo
);
allList
.
addAll
(
rest
.
getList
());
stopWatch
.
stop
();
log
.
info
(
"本地事项总数:{},{}s"
,
allList
.
size
(),
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
}
stopWatch
.
stop
();
log
.
info
(
"本地事项总数:{},{}s"
,
allList
.
size
(),
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
...
...
@@ -259,6 +261,27 @@ public class DemoWebApiController {
}
@PostMapping
(
value
=
"testAllMatterCount"
)
@UnAuth
public
Rest
<
String
>
testAllMatterCount
(
@RequestBody
SiteEntity
siteEntity
)
{
StopWatch
stopWatch
=
new
StopWatch
(
"stopwatch syncmatter"
);
log
.
info
(
"开始分页查询事项=="
);
MatterQuery
matterQuery
=
new
MatterQuery
();
matterQuery
.
setAreaCode
(
siteEntity
.
getAreaCode
());
matterQuery
.
setSource
(
SourceEnum
.
政务网
.
getValue
());
ParamDto
param
=
new
ParamDto
();
param
.
getCondition
().
put
(
"areaCode"
,
matterQuery
.
getAreaCode
());
if
(!
ObjectUtils
.
isEmpty
(
matterQuery
.
getSource
()))
{
param
.
getCondition
().
put
(
"source"
,
matterQuery
.
getSource
());
}
int
count
=
matterService
.
getDao
().
getMatterListByAreaCodeCount
(
param
);
log
.
info
(
"本地事项总数:{}"
,
count
);
return
Rest
.
ok
();
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
1001
/
500
);
...
...
base-manager/src/main/resources/config/mybatis-sqlmap-config.xml
View file @
619a7bfe
...
...
@@ -18,7 +18,7 @@
<property
name=
"showSql"
value=
"MySql"
/>
</plugin>
<plugin
interceptor=
"com.mortals.framework.thirty.mybatis.LogInterceptor"
>
<property
name=
"enableExecutorTime"
value=
"
fals
e"
/>
<property
name=
"enableExecutorTime"
value=
"
tru
e"
/>
<property
name=
"showSql"
value=
"false"
/>
</plugin>
</plugins>
...
...
base-manager/src/test/java/com/mortals/httpclient/system/system.http
View file @
619a7bfe
...
...
@@ -104,6 +104,25 @@ Content-Type: application/json
}
###test testAllMatter
POST {{baseUrl}}/test/testAllMatter
Content-Type: application/json
{
"areaCode":"511500000000"
}
###test testAllMatterPage
POST {{baseUrl}}/test/testAllMatterPage
Content-Type: application/json
{
"areaCode":"511500000000"
}
###testre
POST {{baseUrl}}/test/reDepts
Content-Type: application/json
...
...
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