package com.ibeetl.admin.core.dao;

import com.ibeetl.admin.core.entity.DouYinChannelEntity;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.annotatoin.Sql;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.mapper.BaseMapper;

import java.util.List;

@SqlResource("core.coreFunction")
public interface ChannelDao extends BaseMapper<DouYinChannelEntity> {
    @Sql("select id,orderchannel,channelname as name,channeltype,inserttime,updatetime,channellevel,parentid,remarks,userid from tb_ordercenter_channel where orderchannel = ?")
    DouYinChannelEntity getChannelByCode(@Param(value = "orderchannel") String orderchannel);
    @Sql("select id,orderchannel,channelname as name,channeltype,inserttime,updatetime,channellevel,parentid,remarks,userid from tb_ordercenter_channel where channellevel is not null ")
    List<DouYinChannelEntity> queryAll();
}
