package com.foreverwin.mesnac.dispatch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.dispatch.dto.UserResourceDto;
import com.foreverwin.mesnac.dispatch.model.UserResource;
import com.foreverwin.mesnac.meapi.model.NwaUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zjw
 * @since 2021-08-18
 */
@Repository
public interface UserResourceMapper extends BaseMapper<UserResource> {

    List<NwaUser> findEmployeeList(@Param("site") String site, @Param("resourceType") String resourceType);

    List<UserResource> findEnableList(@Param("site") String site, @Param("resource") String resource, @Param("user") String user);

    List<UserResourceDto> findAll(@Param("site") String site, @Param("resource") String resource, @Param("userId") String userId);

    void deleteByUserAndResource(@Param("user")String user,@Param("resource")String resource);


}