package com.liquidnet.service.kylin.service.partner;

import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.param.KylinGroupBuyActivityCreateParam;
import com.liquidnet.service.kylin.dto.param.KylinGroupBuyActivityUpdateParam;
import com.liquidnet.service.kylin.dto.vo.groupbuy.KylinGroupBuyActivityVo;
import com.liquidnet.service.kylin.dto.vo.groupbuy.KylinGroupBuyPartnerOrderDetailVo;
import com.liquidnet.service.kylin.dto.vo.groupbuy.KylinGroupBuyPartnerOrderListVo;
import com.liquidnet.service.kylin.dto.vo.groupbuy.KylinGroupBuyPartnerOrderStatsVo;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public interface IKylinGroupBuyPartnerService {

    ResponseDto<PageInfo<KylinGroupBuyActivityVo>> list(String name, Integer status, Integer page, Integer size);

    ResponseDto<Map<String, Long>> stats();

    ResponseDto<KylinGroupBuyActivityVo> detail(String activityId);

    ResponseDto<KylinGroupBuyActivityVo> create(KylinGroupBuyActivityCreateParam param);

    ResponseDto<KylinGroupBuyActivityVo> update(KylinGroupBuyActivityUpdateParam param);

    ResponseDto<Boolean> delete(String activityId);

    ResponseDto<Boolean> toggle(String activityId, Integer targetStatus);

    /**
     * 拼团订单顶部统计：总数 + 拼团中/成功/失败。
     */
    ResponseDto<KylinGroupBuyPartnerOrderStatsVo> orderStats();

    /**
     * 拼团订单分页列表。status 仅允许 0/1/2 或空（空=全部含 -1/3）。
     */
    ResponseDto<PageInfo<KylinGroupBuyPartnerOrderListVo>> orderList(String keyword, Integer status,
                                                                     Integer page, Integer size);

    /**
     * 拼团订单详情。
     */
    ResponseDto<KylinGroupBuyPartnerOrderDetailVo> orderDetail(String groupOrderId);

    /**
     * 导出拼团订单（列同列表，筛选同列表）。
     */
    void exportOrders(String keyword, Integer status, HttpServletResponse response);
}
