package com.slodon.b2b2c.dao.write.live;

import com.slodon.b2b2c.core.database.BaseWriteMapper;
import com.slodon.b2b2c.live.example.LiveBroadcastExample;
import com.slodon.b2b2c.live.pojo.LiveBroadcast;
import com.slodon.b2b2c.live.vo.LivesVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface LiveBroadWriteMapper extends BaseWriteMapper<LiveBroadcast, LiveBroadcastExample> {

    /**
     * 查找需要更新状态的直播间起始id
     * @return
     */
    int getLivesNum(@Param("roomId") Integer roomId );

    /**
     * 批量修改直播间状态
     * @param livesVOS
     */
    void updateLivesType(@Param("livesVOS") List<LivesVO> livesVOS);

    Integer getLiveRoomId();

    /**
     * 直播间和商品关联关系绑定
     * @param asList
     * @param roomId
     */
    void addLiveGoodsRelation(@Param("asList")  List<Integer> asList, @Param("roomId") Integer roomId);
}
