Administrator
2024-06-28 f5eb6bd9e0f5011ec071a96e68872ada1840cbc6
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoBa/BaPrivilegeMapper.java
New file
@@ -0,0 +1,45 @@
package com.dy.pipIrrGlobal.daoBa;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoBa.BaPrivilege;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface BaPrivilegeMapper extends BaseMapper<BaPrivilege> {
     /**
     * 查询全部
     * @return List<BaPrivilege>
     */
    List<BaPrivilege> selectAll() ;
    /**
     * 查询某个用户所隶属所有角色的所有权限
     * @param userId 用户ID
     * @return List<Integer>
     */
    List<Integer> selectPrivilegeByUserId(@Param("userId") Long userId) ;
    /**
     * 查询某个角色所隶属于该角色的所有权限
     * @param roleId 用户ID
     * @return List<Integer>
     */
    List<Integer> selectPrivilegeByRoleId(@Param("roleId") Long roleId) ;
    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int putin(BaPrivilege record);
    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(BaPrivilege record);
}