package cn.com.ctop.kuaishou.modules.report.mapper;

import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyGroup;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface KuaishouReportDailyGroupMapper extends BaseMapper<KuaishouReportDailyGroup> {
    void loadGroupDailyReport(@Param("accountId") Long accountId, @Param("localPath") String localPath);

    @Update("update ctop_kuaishou_report_daily_group " +
            "set channel_code = substring_index(unit_name, '-', 1) " +
            "where stat_date =#{date}")
    void formatChannelCode(@Param("date") String date);
}
