Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
43b9150d
Commit
43b9150d
authored
Dec 20, 2022
by
wuxiaokai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路口管理-pagehelper分页配置参数
parent
1313ff28
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
TBaseCrossInfoService.java
...ain/java/net/wanji/web/service/TBaseCrossInfoService.java
+2
-7
application.yml
signal-web-service/src/main/resources/application.yml
+3
-1
TBaseCrossInfoMapper.xml
...ervice/src/main/resources/mapper/TBaseCrossInfoMapper.xml
+2
-2
No files found.
signal-web-service/src/main/java/net/wanji/web/service/TBaseCrossInfoService.java
View file @
43b9150d
...
...
@@ -3,8 +3,6 @@ package net.wanji.web.service;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
net.wanji.web.common.Result
;
import
net.wanji.web.entity.TBaseAreaInfo
;
import
net.wanji.web.entity.TBaseCrossInfo
;
...
...
@@ -51,14 +49,11 @@ public class TBaseCrossInfoService extends ServiceImpl<TBaseCrossInfoMapper, TBa
*/
public
Result
<
PageResultPO
<
CrossInfoPO
>>
selectAll
(
CrossInfoVO
crossInfoVO
)
{
PageResultPO
<
CrossInfoPO
>
page
=
new
PageResultPO
<>();
PageHelper
.
startPage
(
crossInfoVO
.
getPageNum
(),
crossInfoVO
.
getPageSize
());
//Integer count = crossInfoMapper.countSelectAll(crossInfoVO);
Integer
count
=
crossInfoMapper
.
countSelectAll
(
crossInfoVO
);
List
<
CrossInfoPO
>
list
=
crossInfoMapper
.
selectAll
(
crossInfoVO
);
PageInfo
<
CrossInfoPO
>
borrowPOPageInfo
=
new
PageInfo
<>(
list
);
page
.
setPageNum
(
crossInfoVO
.
getPageNum
());
page
.
setPageSize
(
crossInfoVO
.
getPageSize
());
page
.
setTotal
((
int
)
borrowPOPageInfo
.
getTotal
());
page
.
setTotal
(
count
);
page
.
setData
(
list
);
return
Result
.
success
(
page
);
}
...
...
signal-web-service/src/main/resources/application.yml
View file @
43b9150d
...
...
@@ -27,7 +27,9 @@ mapper:
pagehelper
:
helper-dialect
:
mysql
reasonable
:
false
support-methods-arguments
:
true
# pagehelper分页 配置参数 supportMethodsArguments 建议不要全局设置
# https://www.cnblogs.com/liran123/p/12889093.html
support-methods-arguments
:
false
params
:
count=countSql
jasypt
:
...
...
signal-web-service/src/main/resources/mapper/TBaseCrossInfoMapper.xml
View file @
43b9150d
...
...
@@ -207,9 +207,9 @@
and c.is_send = #{isSend}
</if>
</where>
<
!--<
if test="pageNum != null and pageSize != null">
<if
test=
"pageNum != null and pageSize != null"
>
limit #{startNum}, #{pageSize}
</if>
-->
</if>
</select>
<select
id=
"countSelectAll"
parameterType=
"net.wanji.web.vo.CrossInfoVO"
resultType=
"integer"
>
select count(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