package com.zfire.mall.manager.commonmapper.listV2;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zfire.mall.manager.bean.front.CustomerPushBean;
import com.zfire.mall.manager.bean.listV2.*;
import com.zfire.mall.manager.zfire.bean.ZfireParamBean;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Set;

public interface CommonCMapper {

    /**
     * 文件下发列表
     */
    public IPage<ComListVO> queryComList(IPage page,@Param("ex") ZfireParamBean zfireParamBean);

    /**
     * 消息通知列表
     */
    public IPage<NoticeRecordReadVO> queryNoticeList(IPage page,@Param("ex") ZfireParamBean zfireParamBean);

    /**
     * 经销商列表
     */
    public IPage<K3CustomerVO> queryK3CutomerList(IPage page,@Param("ex") ZfireParamBean zfireParamBean);

    /**
     * 经销商钱包对应关系列表
     */
    public IPage<CustomerProductTypeRelaVO> queryCustomerProductTypeRela(IPage page,@Param("ex") ZfireParamBean zfireParamBean);
    /**
     * 物料列表
     */
    public IPage<K3MaterialVO> queryK3Material(IPage page,@Param("ex") ZfireParamBean zfireParamBean);
    /**
     * 政策列表
     */
    public IPage<PolicyVO> queryPolicy(IPage page,
                                       @Param("ex") ZfireParamBean zfireParamBean,
                                       @Param("policyIds2") List<String> policyIds2,
                                       @Param("policyIds") List<String> policyIds,
                                       @Param("flag") Integer flag);
    /**
     * 对应经销商列表
     */
    public IPage<PolicyCustomerVO> queryPolicyCustomer(IPage page,@Param("ex") ZfireParamBean zfireParamBean);
    /**
     * 返利钱包列表
     */
    public IPage<WalletRebateVO> queryWalletRebate(IPage page,@Param("ex") ZfireParamBean zfireParamBean);
    /**
     * 销售类型列表
     */
    public IPage<SaleTypeVO> querySaleType(IPage page,@Param("ex") ZfireParamBean zfireParamBean);
    /**
     * 返利钱包使用比例
     */
    public IPage<WalletSaleTypeRelaVO> queryWalletSaleType(IPage page,@Param("ex") ZfireParamBean zfireParamBean);
    /**
     * 信用额度管理
     */
    public IPage<CustomerWalletCreditRecordVO> queryCustomerWalletCreditRecord(IPage page,@Param("ex") ZfireParamBean zfireParamBean);
    /**
     * 收款单列表
     */
    public IPage<K3ReceiptVO> queryK3Receipt(IPage page,
                                             @Param("ex") ZfireParamBean zfireParamBean,
                                             @Param("customerId") String customerId,
                                             @Param("serviceIds") List<String> serviceIds);
    /**
     * 其他应收单
     */
    public IPage<ReceivableItemVO> queryReceivableItem(IPage page,@Param("ex") ZfireParamBean zfireParamBean,
                                                       @Param("examineStatus") String examineStatus,@Param("customerNumber") String customerNumber);
    /**
     * 返利互转单列表
     */
    public IPage<CustomerWalletTransferVO> queryCustomerWalletTransfer(IPage page,
                                                                       @Param("ex") ZfireParamBean zfireParamBean,
                                                                       @Param("examineStatus") String examineStatus,
                                                                       @Param("customerId") String customerId);
    /**
     * 销售返利单列表
     */
    public IPage<RebateOrderVO> queryRebateOrder(IPage page,
                                                 @Param("ex") ZfireParamBean zfireParamBean,
                                                 @Param("examineStatus") String examineStatus,
                                                 @Param("customerId") String customerId,
                                                 @Param("isConfirm") Boolean isConfirm,
                                                 @Param("websitNumber") String websitNumber);
    /**
     * 销售执行明细列表-其他零售单
     */
    public IPage<OrderExecRetailVO> queryOrderExecRetail(IPage page,
                                                         @Param("ex") ZfireParamBean zfireParamBean,
                                                         @Param("customerId") String customerId,
                                                         @Param("serviceIds") List<String> serviceIds,
                                                         @Param("k3CategoryIds") List<String> k3CategoryIds);
    public Integer queryOrderExecRetailCount(@Param("ex") ZfireParamBean zfireParamBean,
                                             @Param("customerId") String customerId,
                                             @Param("serviceIds") List<String> serviceIds,
                                             @Param("k3CategoryIds") List<String> k3CategoryIds);

    /**
     * 销售执行明细列表-政策零售单
     */
    public IPage<OrderExecPolicyVO> queryOrderExecPolicy(IPage page,
                                                         @Param("ex") ZfireParamBean zfireParamBean,
                                                         @Param("customerId") String customerId,
                                                         @Param("serviceIds") List<String> serviceIds,
                                                         @Param("k3CategoryIds") List<String> k3CategoryIds);
    public Integer queryOrderExecPolicyCount(@Param("ex") ZfireParamBean zfireParamBean,
                                             @Param("customerId") String customerId,
                                             @Param("serviceIds") List<String> serviceIds,
                                             @Param("k3CategoryIds") List<String> k3CategoryIds);

    /**
     * 销售执行明细-其他零售单列表
     */
    public IPage<RetailOrderVO> queryRetailOrder(IPage page,
                                                 @Param("ex") ZfireParamBean zfireParamBean,
                                                 @Param("customerId") String customerId,
                                                 @Param("examineStatus") String examineStatus,
                                                 @Param("serviceIds") List<String> serviceIds,
                                                 @Param("k3CategoryIds") List<String> k3CategoryIds);
    /**
     * 销售执行明细-销售政策列表
     */
    public IPage<RetailOrderPolicyVO> queryPolicyOrder(IPage page,
                                                       @Param("ex") ZfireParamBean zfireParamBean,
                                                       @Param("customerId") String customerId,
                                                       @Param("examineStatus") String examineStatus,
                                                       @Param("serviceIds") List<String> serviceIds,
                                                       @Param("k3CategoryIds") List<String> k3CategoryIds);
    /**
     * 销售执行明细-家用/商用工程
     */
    public Integer queryEnginOrderCount(@Param("ex") ZfireParamBean zfireParamBean,
                                        @Param("enginOrderType") String enginOrderType,
                                        @Param("serviceIds") List<String> serviceIds,
                                        @Param("k3CategoryIds") List<String> k3CategoryIds,
                                        @Param("customerId") String customerId);
    public IPage<OrderEnginVO> queryEnginOrder(IPage page,
                                               @Param("ex") ZfireParamBean zfireParamBean,
                                               @Param("enginOrderType") String enginOrderType,
                                               @Param("serviceIds") List<String> serviceIds,
                                               @Param("k3CategoryIds") List<String> k3CategoryIds,
                                               @Param("customerId") String customerId);

    /**
     * 对账列表
     */
    public IPage<CustomerWalletRecordVO> queryCustomerWalletRecord(IPage page,@Param("ex") ZfireParamBean zfireParamBean);


    IPage<StageK3CustomerVO> stageListV2(IPage page,
                                         @Param("ex") ZfireParamBean zfireParamBean,
                                         @Param("customerId")String customerId);

    List<CustomerPushBean> listPush(String encrypted);

    IPage<K3CustomerJiaXianVO> jiaXianV2(Page page,@Param("ex") ZfireParamBean zfireParam);

    IPage<K3CustomerVO> queryListV3K3CutomerList(Page page,@Param("ex") ZfireParamBean zfireParam);

    /**
     * 参考成本价格列表
     * @param page
     * @param zfireParamBean
     * @return
     */
    IPage<MaterialReferPriceVO> queryMaterialReferPriceList(Page page,@Param("ex") ZfireParamBean zfireParamBean);


    /**
     * 查询历史余额(快照)
     * @param page
     * @param zfireParamBean
     * @return
     */
    IPage<CustomerWalletAmountVO> queryCustomerWalletAmountList(Page page, @Param("ex") ZfireParamBean zfireParamBean, @Param("time")Date time);

}
