|  |  | 
 |  |  | package com.dy.pipIrrGlobal.daoBa; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
 |  |  | import com.dy.pipIrrGlobal.pojoBa.BaRole; | 
 |  |  | import org.apache.ibatis.annotations.Mapper; | 
 |  |  | import org.apache.ibatis.annotations.Param; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author ZhuBaoMin | 
 |  |  |  * @date 2024-01-10 11:00 | 
 |  |  |  * @LastEditTime 2024-01-10 11:00 | 
 |  |  |  * @Description | 
 |  |  |  */ | 
 |  |  |  | 
 |  |  | @Mapper | 
 |  |  | public interface BaRoleMapper extends com.baomidou.mybatisplus.core.mapper.Mapper<BaRole> { | 
 |  |  |     /** | 
 |  |  |      * insert record to table | 
 |  |  |      * @param record the record | 
 |  |  |      * @return insert count | 
 |  |  |      */ | 
 |  |  | public interface BaRoleMapper extends BaseMapper<BaRole> { | 
 |  |  |     int deleteByPrimaryKey(Long id); | 
 |  |  |  | 
 |  |  |     int insert(BaRole record); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * insert record to table selective | 
 |  |  |      * @param record the record | 
 |  |  |      * @return insert count | 
 |  |  |      */ | 
 |  |  |     int insertSelective(BaRole record); | 
 |  |  |  | 
 |  |  |     List<BaRole> select() ; | 
 |  |  |     BaRole selectByPrimaryKey(Long id); | 
 |  |  |  | 
 |  |  |     int updateByPrimaryKeySelective(BaRole record); | 
 |  |  |  | 
 |  |  |     int updateByPrimaryKey(BaRole record); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 查询某个用户所隶属于的角色 | 
 |  |  |      * @param userId 用户ID | 
 |  |  |      * @return List<BaRole> | 
 |  |  |      */ | 
 |  |  |     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); | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据roleId逻辑删除角色对象 | 
 |  |  |      * @param roleId | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     Integer deleteRoleById(@Param("roleId") Long roleId); | 
 |  |  | } |