package com.xiaoniu.system.pointsgoods.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoniu.common.core.resdata.ChangeStatusDTO;
import com.xiaoniu.common.core.resdata.RowsData;
import com.xiaoniu.common.core.vo.LabelAndValueVO;
import com.xiaoniu.system.pointsgoods.domain.TbPointsGoods;
import com.xiaoniu.system.pointsgoods.dto.EditPointsGoodsDTO;
import com.xiaoniu.system.pointsgoods.dto.PointsGoodsQueryDTO;
import com.xiaoniu.system.pointsgoods.vo.AddPointsGoodsDTO;
import com.xiaoniu.system.pointsgoods.vo.PointsGoodsDetailsVO;
import com.xiaoniu.system.pointsgoods.vo.PointsGoodsListVO;
import com.xiaoniu.system.pointsgoods.vo.PointsGoodsSpecificationsVO;
import com.xiaoniu.system.store.goods.dto.SpecificationQueryDTO;

import java.util.List;

/**
 * <p>
 * 积分商品信息表 服务类
 * </p>
 *
 * @author haoxuyang
 * @since 2024-10-29 06:20:13
 */
public interface ITbPointsGoodsService extends IService<TbPointsGoods> {

    /**
     * 积分商品列表
     * @param dto dto
     * @return  RowsData<PointsGoodsListVO>
     */
    RowsData<PointsGoodsListVO> pointsGoodsList(PointsGoodsQueryDTO dto);

    /**
     * 新增积分商品
     * @param dto dto
     */
    void addPointsGoods(AddPointsGoodsDTO dto);

    /**
     * 修改积分商品
     * @param dto dto
     */
    void editPointsGoods(EditPointsGoodsDTO dto);

    /**
     * 积分商品详情
     * @param id 积分商品id
     * @return PointsGoodsDetailsVO
     */
    PointsGoodsDetailsVO details(Long id);

    /**
     * 修改积分商品状态
     * @param dto dto
     */
    void changeStatus(ChangeStatusDTO dto);

    /**
     * 删除积分商品
     * @param id id
     */
    void delGoods(Long id);

    /**
     * 商品规格列表
     * @param dto dto
     * @return
     */
    List<PointsGoodsSpecificationsVO> specificationList(SpecificationQueryDTO dto);

    /**
     * 根据类型获取商品信息
     * @param typeId 类型id
     * @return List<LabelAndValueVO>
     */
    List<LabelAndValueVO> getGoodsListByType(Long typeId);

    /**
     * 刷新积分商品
     */
    void refreshUserStatistics();
}
