package com.foreverwin.mesnac.dispatch.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.dispatch.dto.UserResourceDto;
import com.foreverwin.mesnac.dispatch.model.UserResource;
import com.foreverwin.mesnac.meapi.model.NwaUser;
import com.foreverwin.modular.core.util.FrontPage;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zjw
 * @since 2021-08-18
 */
public interface UserResourceService extends IService<UserResource> {

    /**
     *  分页查询
     * @param frontPage
     * @return
     */
    IPage<UserResource> selectPage(FrontPage<UserResource> frontPage, UserResource userResource);

    List<UserResource> selectList(UserResource userResource);

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

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

    HashMap<String,Object> findAll(UserResourceDto userResourceDto);

    /**
     * 保存
     * @param userResourceDtoList table列表里面的值
     * @param deleteTableList 要删除的数据
     */
    void saveAll(List<UserResourceDto> userResourceDtoList,List<UserResource> deleteTableList);

}