package com.tuoheng.mapper;

import com.tuoheng.model.po.AuthoritiesPo;
import com.tuoheng.model.query.TenantQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenjiandong
 * @description: TODO
 * @date 2022/10/9 10:39
 */
@Mapper
public interface AuthoritiesMapper {

    int batchInsert(List<AuthoritiesPo> list);

    List<AuthoritiesPo> selectByUserId(@Param("userId") Long userId);

    List<AuthoritiesPo> selectListByUserIdAndClientId(@Param("userId") Long userId, @Param("query") TenantQuery query);

    List<AuthoritiesPo> selectByUserIds(@Param("list") List<Long> userIdList);

    void deleteByUserIdAndClient(Long userId, String clientId);

    List<AuthoritiesPo> selectByUserIdsAndClient(@Param("list") List<Long> userIdList,@Param("clientId") String clientId);
}
