package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxMerchantTradeDaily;
import com.iformall.domain.vo.WxMerchantTradeDailyVo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface WxMerchantTradeDailyService {

	/**
     * 根据实体查询分页列表
     *
     * @param record
     * @return
     */
	PageInfo<WxMerchantTradeDaily> listAsPage(WxMerchantTradeDaily record, Integer pageIndex, Integer pageSize);
	
	/**
     * 根据Id获得实体
     *
     * @param id
     * @return
     */
    WxMerchantTradeDaily getById(Long id);
    
        /**
     * 保存或更新实体
     *
     * @param record
     */
    void saveOrUpdate(WxMerchantTradeDaily record);

    /**
     * 根据Id删除实体
     *
     * @param id
     */
    void deleteById(Long id);


     /**
     * 上传当日解单数据
     *
     * @param id
     * @param volume
     */

    ResultData saveDailyTradingVolume(Long userId, Integer volume);

    /**
     * 获取当日解单数据
     */

    ResultData getVolume(WxMerchantTradeDaily wxMerchantTradeDaily,Long userId);


    /**
     * 获取近7日解单数据
     */

    ResultData getVolumeOfWeek(Long userId);


    /**
     * 获取近30日解单数据 ADMIN 端
     */
    ResultData getVolumeOfMonth(Long merchantId);

    /**
     * 获取近30日解单数据(总额) ADMIN 端
     */
    ResultData getVolumeTotalOfMonth(String tenantId);
    /**
     * 根据实体查询分页列表
     *
     * @param record
     * @param pageIndex
     * @param pageSize
     * @return
     */
    PageInfo<WxMerchantTradeDailyVo> listAsPageVo(WxMerchantTradeDaily record, Integer pageIndex, Integer pageSize);

    ResultData update(WxMerchantTradeDaily tradeDailyVo);

    ResultData queryTradeDaily(WxMerchantTradeDaily wxMerchantTradeDaily);

    void exportData(WxMerchantTradeDaily wxMerchantTradeDaily, HttpServletRequest request, HttpServletResponse response);

    ResultData summary(WxMerchantTradeDaily wxMerchantTradeDaily);

}
