feat:分页查询
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -82,6 +82,11 @@
|
||||
<artifactId>xservice-message-starter</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -17,3 +17,8 @@ mybatis:
|
||||
- classpath*:mapper/*/*.xml
|
||||
configuration:
|
||||
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;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.xiang.xservice.auth.api.code.Code01UserErrorCode;
|
||||
import com.xiang.xservice.auth.api.code.Code02RoleErrorCode;
|
||||
@@ -181,6 +182,7 @@ public class XUserServiceImpl implements XUserService {
|
||||
|
||||
@Override
|
||||
public List<UserResp> getUserList(UserQueryRequest request) {
|
||||
PageHelper.startPage(request.getCurrent(), request.getPageSize());
|
||||
List<XUser> userList = userMapper.getUserList(userConvert.toDO(request));
|
||||
if (CollectionUtils.isEmpty(userList)) {
|
||||
return Lists.newArrayList();
|
||||
|
||||
Reference in New Issue
Block a user