package com.xiaoniu.system.groupgoods.groupbuying.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoniu.common.core.resdata.RowsData;
import com.xiaoniu.common.core.vo.LabelAndValueVO;
import com.xiaoniu.system.groupgoods.groupbuying.domain.TbGroupBuyingGoods;
import com.xiaoniu.system.groupgoods.groupbuying.dto.AddGroupBuyingDTO;
import com.xiaoniu.system.groupgoods.groupbuying.dto.EditGroupBuyingDTO;
import com.xiaoniu.system.groupgoods.groupbuying.dto.GroupBuyingListQueryDTO;
import com.xiaoniu.system.groupgoods.groupbuying.dto.SpecificationsListQueryDTO;
import com.xiaoniu.system.groupgoods.groupbuying.vo.GroupBuyingDetailsVO;
import com.xiaoniu.system.groupgoods.groupbuying.vo.GroupBuyingListVO;
import com.xiaoniu.system.groupgoods.groupbuying.vo.SpecificationsListVO;

import java.util.List;

/**
 * <p>
 * 团购商品表 服务类
 * </p>
 *
 * @author haoxuyang
 * @since 2024-10-18 09:19:39
 */
public interface ITbGroupBuyingGoodsService extends IService<TbGroupBuyingGoods> {

    /**
     * 团购商品列表
     *
     * @param dto dto
     * @return RowsData<GroupBuyingListVO>
     */
    RowsData<GroupBuyingListVO> groupBuyingList(GroupBuyingListQueryDTO dto);

    /**
     * 新增团购商品
     *
     * @param dto dto
     */
    void addGroupBuying(AddGroupBuyingDTO dto);

    /**
     * 修改团购商品
     *
     * @param dto dto
     */
    void editGroupBuying(EditGroupBuyingDTO dto);

    /**
     * 团购商品详情
     *
     * @param id 团购id
     * @return GroupBuyingDetailsVO
     */
    GroupBuyingDetailsVO details(Long id);

    /**
     * 根据团购商品id获取商品规格
     *
     * @param dto dto
     * @return List<SpecificationsListVO>
     */
    List<SpecificationsListVO> getSpecificationsListByGroupId(SpecificationsListQueryDTO dto);

    /**
     * 删除团购商品
     *
     * @param id id
     */
    void delGroupBuying(Long id);

    /**
     * 根据团购团购id获取商品规格
     *
     * @param goodsId 商品id
     * @return List<SpecificationsListVO>
     */
    List<SpecificationsListVO> getSpecificationsListByGoodsId(Long goodsId);

    /**
     * 根据类型获取商品集合
     *
     * @param goodType1Id 类型一
     * @param goodType2Id 类型二
     * @return List<LabelAndValueVO>
     */
    List<LabelAndValueVO> getGoodsListByType(Long goodType1Id, Long goodType2Id);

    /**
     * 刷新团购商品
     */
    void refreshGroupsGoods();
}
