@RequestMapping("/queryPage") public String queryPage(UserDto dto, Model model) { PageInfo pageModel = userService.queryPage(dto); model.addAttribute("pageModel", pageModel); return "user/user"; }
Service接口
定义Service接口,声明分页查询的方法。
public interface UserService { PageInfo queryPage(UserDto dto); }
Service实现类
实现Service接口,编写具体的分页查询逻辑。
@Override public PageInfo queryPage(UserDto dto) { PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); List list = this.queryUser(dto.getUser()); PageInfo pageInfo = new PageInfo<>(list); return pageInfo; }
This document outlines the recommended naming conventions for HTML attributes in Fast Components, focusing on readability and consistency with existing standards. ...
[详细]