Search in sources :

Example 1 with Pageable

use of io.github.tesla.ops.common.Pageable in project tesla by linking12.

the class UserController method list.

@GetMapping("/list")
@ResponseBody
Pageable list(@RequestParam Map<String, Object> params) {
    // 查询列表数据
    Query query = new Query(params);
    List<UserDO> sysUserList = userService.list(query);
    int total = userService.count(query);
    Pageable pageUtil = new Pageable(sysUserList, total);
    return pageUtil;
}
Also used : Pageable(io.github.tesla.ops.common.Pageable) Query(io.github.tesla.ops.utils.Query) UserDO(io.github.tesla.ops.system.domain.UserDO) GetMapping(org.springframework.web.bind.annotation.GetMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

Pageable (io.github.tesla.ops.common.Pageable)1 UserDO (io.github.tesla.ops.system.domain.UserDO)1 Query (io.github.tesla.ops.utils.Query)1 GetMapping (org.springframework.web.bind.annotation.GetMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1