|
|
|
@ -216,6 +216,7 @@ public class UserService{ |
|
|
|
|
*/ |
|
|
|
|
public JSONResponse<DefaultRes, Page<List<Friend>>> searchFriend(SearchFrom searchFrom) { |
|
|
|
|
Page<List<Friend>> page=friendMapper.count(searchFrom.getUserId(),searchFrom.getName(),searchFrom.getServiceAddress(),friendSize); |
|
|
|
|
page.setCurrentPage(searchFrom.getCurrentPage()); |
|
|
|
|
List<Friend> list=friendMapper.getFriend(searchFrom.getUserId(),searchFrom.getName(),searchFrom.getServiceAddress(),(searchFrom.getCurrentPage()-1)*friendSize,friendSize); |
|
|
|
|
page.setBody(list); |
|
|
|
|
return new JSONResponse<DefaultRes,Page<List<Friend>>>(DefaultRes.ok,Result.OK).setBody(page); |
|
|
|
|