|  |  | 
 |  |  | import org.apache.ibatis.annotations.Param; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Map; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author ZhuBaoMin | 
 |  |  |  * @date 2024-01-10 11:00 | 
 |  |  |  * @LastEditTime 2024-01-10 11:00 | 
 |  |  |  * @Description | 
 |  |  |  */ | 
 |  |  |  | 
 |  |  | @Mapper | 
 |  |  | public interface BaRoleMapper extends BaseMapper<BaRole> { | 
 |  |  |     int deleteByPrimaryKey(Long id); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询全部 | 
 |  |  |      * @return List<BaRole> | 
 |  |  |      */ | 
 |  |  |     List<BaRole> selectAll() ; | 
 |  |  |     int insert(BaRole record); | 
 |  |  |  | 
 |  |  |     int insertSelective(BaRole record); | 
 |  |  |  | 
 |  |  |     BaRole selectByPrimaryKey(Long id); | 
 |  |  |  | 
 |  |  |     int updateByPrimaryKeySelective(BaRole record); | 
 |  |  |  | 
 |  |  |     int updateByPrimaryKey(BaRole record); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询某个用户所隶属于的角色 | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     List<BaRole> selectByUserId(@Param("userId") Long userId) ; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据角色名称查询记录数量 | 
 |  |  |      * @param roleName | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     Integer getRecordCountByName(@Param("roleName") String roleName); | 
 |  |  |  | 
 |  |  |     ///** | 
 |  |  |     // * 根据指定条件获取角色记录数 | 
 |  |  |     // * @param params | 
 |  |  |     // * @return | 
 |  |  |     // */ | 
 |  |  |     //Long getRecordCount(Map<?, ?> params); | 
 |  |  |     // | 
 |  |  |     ///** | 
 |  |  |     // * 根据指定条件获取角色记录 | 
 |  |  |     // * @param params | 
 |  |  |     // * @return | 
 |  |  |     // */ | 
 |  |  |     //List<VoRole> getRoles(Map<?, ?> params); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询总数 | 
 |  |  |      * @param params 查询条件 | 
 |  |  |      * @return 总数 | 
 |  |  |      * 根据roleId逻辑删除角色对象 | 
 |  |  |      * @param roleId | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     Long selectTotal(Map<?, ?> params) ; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 分页查询一些 | 
 |  |  |      * @param params 查询条件 | 
 |  |  |      * @return 实体集合 | 
 |  |  |      */ | 
 |  |  |     List<BaRole> selectSome(Map<?, ?> params) ; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * insert record to table | 
 |  |  |      * @param record the record | 
 |  |  |      * @return insert count | 
 |  |  |      */ | 
 |  |  |     int insert(BaRole record); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * insert record to table selective | 
 |  |  |      * @param record the record | 
 |  |  |      * @return insert count | 
 |  |  |      */ | 
 |  |  |     int insertSelective(BaRole record); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * update record selective | 
 |  |  |      * @param record the updated record | 
 |  |  |      * @return update count | 
 |  |  |      */ | 
 |  |  |     int updateByPrimaryKeySelective(BaRole record); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * update record | 
 |  |  |      * @param record the updated record | 
 |  |  |      * @return update count | 
 |  |  |      */ | 
 |  |  |     int updateByPrimaryKey(BaRole record); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * delete by primary key | 
 |  |  |      * @param id primaryKey | 
 |  |  |      * @return deleteCount | 
 |  |  |      */ | 
 |  |  |     int deleteByPrimaryKey(Long id); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 逻辑删除 | 
 |  |  |      * @param id primaryKey | 
 |  |  |      * @return update count | 
 |  |  |      */ | 
 |  |  |     int deleteLogicById(Long id); | 
 |  |  |     Integer deleteRoleById(@Param("roleId") Long roleId); | 
 |  |  | } |