You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.UsersEntity;
import com.utils.PageUtils;
/**
* 系统用户
*/
public interface UsersService extends IService<UsersEntity> {
//这表明UsersService是专门操作用户数据UsersEntity的服务接口
// 继承了MyBatis-Plus提供的通用CRUD方法如insert, delete, update, select等
PageUtils queryPage(Map<String, Object> params);
//作用:用户数据分页查询
//参数params包含分页参数如当前页码page、每页数量limit和可能的查询条件
//返回值封装了分页信息的PageUtils对象通常包含数据列表、总记录数、总页数等
//场景:在用户管理界面展示用户列表时调用
List<UsersEntity> selectListView(Wrapper<UsersEntity> wrapper);
//作用:根据条件查询用户列表(非分页)
//参数MyBatis-Plus的条件构造器Wrapper可构造复杂查询条件如where name like '%admin%'
//返回值:符合条件的用户实体列表
//场景:需要获取全部符合条件的用户数据时使用(如导出用户数据)
PageUtils queryPage(Map<String, Object> params,Wrapper<UsersEntity> wrapper);
//作用:组合分页参数和查询条件进行分页查询
//参数:
//params分页参数
//wrapper数据过滤条件
//返回值:分页且过滤后的用户数据
//场景:这是最常用的分页查询方法,例如在用户管理界面中根据用户名搜索并分页展示
}