package com.moon.server.mapper.sys; import com.moon.server.entity.sys.RoleEntity; import org.apache.ibatis.annotations.Mapper; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * 角色表 * @author sws * @date 2022-09-29 */ @Mapper @ResponseBody public interface RoleMapper { /** * 查询记录数 * * @param name 名称 * @param depid 单位ID * @return 记录数 */ public Integer selectCount(String name, Integer depid); /** * 分页查询 * * @param name 名称 * @param depid 单位ID * @param limit 记录数 * @param offset 偏移量 * @return 列表 */ public List selectByPage(String name, Integer depid, Integer limit, Integer offset); /** * 插入一条 * * @param roleEntity * @return */ public Integer insertRole(RoleEntity roleEntity); /** * 插入多条 * * @param list * @return */ public Integer insertRoles(List list); /** * 删除一条 * * @param id * @return */ public Integer deleteRole(int id); /** * 删除多条 * * @param ids * @return */ public Integer deleteRoles(List ids); /** * 更新一条 * * @param roleEntity * @return */ public Integer updateRole(RoleEntity roleEntity); /** * 查询单条数据 * * @param id * @return */ public RoleEntity selectRole(int id); /** * 查询所有 * * @return */ public List selectRoleAll(); }