package com.czg.product.service;

import com.czg.product.dto.ShopVendorBillPayDTO;
import com.czg.product.dto.ShopVendorDTO;
import com.czg.product.entity.ShopVendor;
import com.czg.product.vo.ShopVendorBillPayRecordVO;
import com.czg.product.vo.ShopVendorBillRecordVO;
import com.czg.product.vo.ShopVendorBillVO;
import com.czg.product.vo.ShopVendorSummaryVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 供应商
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-20
 */
public interface ShopVendorService extends IService<ShopVendor> {
    /**
     * 供应商分页查询
     *
     * @param param 查询参数
     * @return 分页结果
     */
    Page<ShopVendorDTO> getShopVendorPage(ShopVendorDTO param);

    /**
     * 供应商列表查询
     * @param param 查询参数
     * @return 查询结果
     */
    List<ShopVendorDTO> getShopVendorList(ShopVendorDTO param);

    /**
     * 供应商明细
     * @param id 供应商id
     * @return 供应商信息
     */
    ShopVendorDTO getShopVendorById(Long id);

    /**
     * 添加供应商
     *
     * @param dto 供应商信息
     */
    void addShopVendor(ShopVendorDTO dto);

    /**
     * 修改供应商
     *
     * @param dto 供应商信息
     */
    void updateShopVendor(ShopVendorDTO dto);

    /**
     * 删除供应商
     *
     * @param id 供应商id
     */
    void deleteShopVendor(Long id);

    ShopVendorSummaryVO summary(Long shopId);

    /**
     * 账单列表
     *
     * @param shopId 店铺id
     * @return 账单
     */
    Page<ShopVendorBillVO> billList(Long shopId, String key);

    /**
     * 账单记录明细
     *
     * @param shopId   店铺id
     * @param vendorId 供应商id
     * @return 分页
     */
    Page<ShopVendorBillRecordVO> billRecord(Long shopId, Integer vendorId, String key);

    /**
     * 账单付款
     * @param shopId 店铺id
     * @param payDTO 数据
     * @return 是否成功
     */
    Boolean pay(Long shopId, ShopVendorBillPayDTO payDTO);

    Page<ShopVendorBillPayRecordVO> payRecord(Long shopId, Long flowId);

}
