feat:分页查询
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -82,6 +82,11 @@
|
|||||||
<artifactId>xservice-message-starter</artifactId>
|
<artifactId>xservice-message-starter</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -16,4 +16,9 @@ mybatis:
|
|||||||
mapper-locations:
|
mapper-locations:
|
||||||
- classpath*:mapper/*/*.xml
|
- classpath*:mapper/*/*.xml
|
||||||
configuration:
|
configuration:
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: true
|
||||||
|
pagehelper:
|
||||||
|
helperDialect: mysql
|
||||||
|
reasonable: true
|
||||||
|
support-methods-arguments: true
|
||||||
|
params: count=countSql
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.xiang.xservice.auth.service.service.impl;
|
package com.xiang.xservice.auth.service.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.xiang.xservice.auth.api.code.Code01UserErrorCode;
|
import com.xiang.xservice.auth.api.code.Code01UserErrorCode;
|
||||||
import com.xiang.xservice.auth.api.code.Code02RoleErrorCode;
|
import com.xiang.xservice.auth.api.code.Code02RoleErrorCode;
|
||||||
@@ -181,6 +182,7 @@ public class XUserServiceImpl implements XUserService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UserResp> getUserList(UserQueryRequest request) {
|
public List<UserResp> getUserList(UserQueryRequest request) {
|
||||||
|
PageHelper.startPage(request.getCurrent(), request.getPageSize());
|
||||||
List<XUser> userList = userMapper.getUserList(userConvert.toDO(request));
|
List<XUser> userList = userMapper.getUserList(userConvert.toDO(request));
|
||||||
if (CollectionUtils.isEmpty(userList)) {
|
if (CollectionUtils.isEmpty(userList)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
|
|||||||
Reference in New Issue
Block a user