package com.ibeetl.admin.flow.dao;

import com.ibeetl.admin.flow.entity.DirectedChannelUrlEntity;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.core.mapper.BaseMapper;

import java.util.List;

@SqlResource(value = "flow.channelUrl")
public interface DirectedChannelUrlDao extends BaseMapper<DirectedChannelUrlEntity> {

    PageQuery<DirectedChannelUrlEntity> searchChannelUrl(PageQuery<DirectedChannelUrlEntity> page);

    List<DirectedChannelUrlEntity> findByFesAndChannel(@Param("fescod") String fescod, @Param("orderchannel") String orderchannel);

    List<DirectedChannelUrlEntity> findByFesAndChannelByFescod(@Param("fescod") String fescod);

    DirectedChannelUrlEntity findChannelUrlById(String id);

    void saveChannelFestival(DirectedChannelUrlEntity entity);

    void saveParityChannelFestival(DirectedChannelUrlEntity entity);

    void saveChannelUrl(DirectedChannelUrlEntity entity);

    void updateChannelFestival(DirectedChannelUrlEntity entity);

    void updateParityChannelFestival(DirectedChannelUrlEntity entity);

    void updateChannelUrl(DirectedChannelUrlEntity entity);

    void deleteChannelFestival(String fescod, String channel);

    void deleteParityChannelFestival(DirectedChannelUrlEntity entity);

    void deleteChannelUrlById(DirectedChannelUrlEntity entity);


    void deleteByPromofescod(@Param("promocode") String promocode);
}
