package com.foreverwin.mesnac.meapi.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.foreverwin.mesnac.meapi.dto.SfcDto;
import com.foreverwin.mesnac.meapi.model.Sfc;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Leon.L
 * @since 2021-06-02
 */
@Repository
public interface SfcMapper extends BaseMapper<Sfc> {
    /**
     * 获取资源上活动的sfc
     * @return
     */
    LocalDateTime getSfcStartTime(@Param("sfcBO")String sfcBO);

    SfcDto findSfcData(@Param("site") String site, @Param("sfc") String sfc);

    IPage pageByResrce(Page<Sfc> pagePlus, @Param("ew") QueryWrapper<SfcDto> queryWrapper, @Param("locale") String locale, @Param("globalQuery") String globalQuery);

    Map findOperationBySfc(@Param("site")String site, @Param("sfc")String sfc);

    String findSfcByResrce(@Param("site")String site,@Param("resource")String resource,@Param("sfc")Sfc sfc);

}