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
36bdc8c3
Commit
36bdc8c3
authored
Dec 20, 2022
by
wuxiaokai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路口管理-pagehelper分页查询
parent
9ca3a927
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
TBaseCrossInfoService.java
...ain/java/net/wanji/web/service/TBaseCrossInfoService.java
+12
-7
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 @
36bdc8c3
...
@@ -3,6 +3,8 @@ package net.wanji.web.service;
...
@@ -3,6 +3,8 @@ package net.wanji.web.service;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.common.Result
;
import
net.wanji.web.entity.TBaseAreaInfo
;
import
net.wanji.web.entity.TBaseAreaInfo
;
import
net.wanji.web.entity.TBaseCrossInfo
;
import
net.wanji.web.entity.TBaseCrossInfo
;
...
@@ -48,14 +50,17 @@ public class TBaseCrossInfoService extends ServiceImpl<TBaseCrossInfoMapper, TBa
...
@@ -48,14 +50,17 @@ public class TBaseCrossInfoService extends ServiceImpl<TBaseCrossInfoMapper, TBa
* @return {@link Result}<{@link PageResultPO}<{@link CrossInfoPO}>>
* @return {@link Result}<{@link PageResultPO}<{@link CrossInfoPO}>>
*/
*/
public
Result
<
PageResultPO
<
CrossInfoPO
>>
selectAll
(
CrossInfoVO
crossInfoVO
)
{
public
Result
<
PageResultPO
<
CrossInfoPO
>>
selectAll
(
CrossInfoVO
crossInfoVO
)
{
PageResultPO
<
CrossInfoPO
>
pageResult
=
new
PageResultPO
<>();
PageResultPO
<
CrossInfoPO
>
page
=
new
PageResultPO
<>();
Integer
count
=
crossInfoMapper
.
countSelectAll
(
crossInfoVO
);
PageHelper
.
startPage
(
crossInfoVO
.
getPageNum
(),
crossInfoVO
.
getPageSize
());
//Integer count = crossInfoMapper.countSelectAll(crossInfoVO);
List
<
CrossInfoPO
>
list
=
crossInfoMapper
.
selectAll
(
crossInfoVO
);
List
<
CrossInfoPO
>
list
=
crossInfoMapper
.
selectAll
(
crossInfoVO
);
pageResult
.
setPageNum
(
crossInfoVO
.
getPageNum
());
PageInfo
<
CrossInfoPO
>
borrowPOPageInfo
=
new
PageInfo
<>(
list
);
pageResult
.
setPageSize
(
crossInfoVO
.
getPageSize
());
page
.
setPageNum
(
crossInfoVO
.
getPageNum
());
pageResult
.
setTotal
(
count
);
page
.
setPageSize
(
crossInfoVO
.
getPageSize
());
pageResult
.
setData
(
list
);
return
Result
.
success
(
pageResult
);
page
.
setTotal
((
int
)
borrowPOPageInfo
.
getTotal
());
page
.
setData
(
list
);
return
Result
.
success
(
page
);
}
}
/**
/**
...
...
signal-web-service/src/main/resources/mapper/TBaseCrossInfoMapper.xml
View file @
36bdc8c3
...
@@ -207,9 +207,9 @@
...
@@ -207,9 +207,9 @@
and c.is_send = #{isSend}
and c.is_send = #{isSend}
</if>
</if>
</where>
</where>
<if
test=
"pageNum != null and pageSize != null"
>
<
!--<
if test="pageNum != null and pageSize != null">
limit #{startNum}, #{pageSize}
limit #{startNum}, #{pageSize}
</if>
</if>
-->
</select>
</select>
<select
id=
"countSelectAll"
parameterType=
"net.wanji.web.vo.CrossInfoVO"
resultType=
"integer"
>
<select
id=
"countSelectAll"
parameterType=
"net.wanji.web.vo.CrossInfoVO"
resultType=
"integer"
>
select count(1)
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