package com.foreverwin.mesnac.meapi.mapper;

import com.foreverwin.mesnac.meapi.dto.ResrceWorkCenter;
import com.foreverwin.mesnac.meapi.model.Resrce;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Leon.L
 * @since 2021-05-26
 */
@Repository
public interface ResrceMapper extends BaseMapper<Resrce> {

    List<Resrce> selectResourceListByType(@Param("site") String site, @Param("resourceType") String resourceType);

    /**
     * 查询站点下所有资源类型与资源关系清单
     *
     * @param site
     * @return
     */
    List<Map<String, Object>> selectResourceTypeResourceList(@Param("site") String site);

    Resrce findByResrce(@Param("site")String site,@Param("resrce")String resrce);

    List<Resrce> findAllResrce(@Param("site")String site);

    List<Resrce> findResourceListByResourceType(@Param("site")String site,@Param("resourceTypeBo")String resourceTypeBo);

    List<Map<String, Object>> selectResourceOperation(@Param("resourceBo") String resourceBo);

    ResrceWorkCenter findResourceAndWorkCenterByResource(Resrce resrce);

    List<Resrce> selectResourceListByUT(@Param("site") String site, @Param("resourceType") String resourceType, @Param("userList") String[] userList);

    String isInspectByResrce(@Param("site") String site, @Param("resrce") String resrce);

}