package com.sckw.system.dao;

import com.sckw.system.model.KwsAuthority;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author czh
 * @desc 角色机构(数据权限)
 * @date 2023/6/15
 */
@Mapper
public interface KwsAuthorityDao {

    /**
     * 新增
     * @param record
     * @return
     */
    int insert(KwsAuthority record);

    /**
     * 更新
     * @param record
     * @return
     */
    int update(KwsAuthority record);

    /**
     * 详情查询
     * @param id
     * @return
     */
    List<KwsAuthority> selectByRoleId(Long id);

    /**
     * 详情查询
     * @param list
     * @return
     */
    List<KwsAuthority> selectByRoleIds(List<Long> list);

    /**
     * @param list KwsAuthority
     * @return int
     * @desc: 批量保存
     * @author: czh
     * @date: 2023/6/15
     */
    int saveBatch(@Param(value = "list") List<KwsAuthority> list);

}
