package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.vo.UserOrderDetailVo;
import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumWrapper;
import com.yonge.cooleshow.biz.dal.entity.TenantAlbum;
import com.yonge.cooleshow.biz.dal.wrapper.UserPaymentOrderWrapper;

import java.util.List;
import java.util.Map;

/**
 * 机构专辑
 * 2023-07-21 17:32:49
 */
public interface TenantAlbumService extends IService<TenantAlbum>  {

	/**
     * 查询详情
     * @param id 详情ID
     * @return TenantAlbum
     */
	TenantAlbum detail(Long id);

    /**
     * 分页查询
     * @param page IPage<TenantAlbum>
     * @param query TenantAlbumWrapper.TenantAlbumQuery
     * @return IPage<TenantAlbum>
     */
    IPage<TenantAlbumWrapper.TenantAlbum> selectPage(IPage<TenantAlbumWrapper.TenantAlbum> page, TenantAlbumWrapper.TenantAlbumQuery query);
	
    /**
     * 添加
     * @param tenantAlbum TenantAlbumWrapper.TenantAlbum
     * @return Boolean
     */
     Boolean add(TenantAlbum tenantAlbum);

    /**
     * 更新
     * @param tenantAlbum TenantAlbumWrapper.TenantAlbum
     * @return Boolean
     */
     Boolean update(TenantAlbumWrapper.TenantAlbum tenantAlbum);

    /**
     * 订单创建前检测
     *
     * @param orderGoodsInfo
     */
    void orderCreate(UserPaymentOrderWrapper.OrderGoodsInfo orderGoodsInfo);

    /**
     * 订单完成后
     *
     * @param userOrderDetailVo
     */
    void orderSuccess(UserOrderDetailVo userOrderDetailVo);

    void insertTenantAlbum(Long tenantId,TenantAlbum tenantAlbum,
                           List<TenantAlbumWrapper.MusicSheetData> musicSheetDataList);

    void updateAlbum(Long id, TenantAlbum tenantAlbum, List<TenantAlbumWrapper.MusicSheetData> musicSheetDataList);

    Map<Long, TenantAlbum> getMapByIds(List<Long> bizIds);

    Map<Long, Long> getMusicCountByIds(List<Long> bizIds);

    void orderAfterSheet(UserPaymentOrderWrapper.OrderGoodsInfo orderGoodsInfo);

    void buyCancel(UserOrderDetailVo userOrderDetailVo);

    /**
     * 根据机构Id获取专辑
     *
     * @param tenantId 机构Id
     */
    List<TenantAlbum> getByTenantId(Long tenantId,Boolean status);

    void updateStatus(Long id, Boolean status);


    /**
     * 添加机构专辑数据
     * @return
     */
    //Boolean addTenantAlbum(TenantAlbum album);

    /**
     * 添加机构Id
     * @param tenantId
     * @return
     */
    //Boolean addTenantId(Long tenantId);

   // Boolean addMusicSheet(List<com.yonge.cooleshow.admin.io.request.TenantAlbumVo.MusicSheetData> data);
}