package com.hzs.activity.recommend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.activity.recommend.param.AcDirectPushUpgradeListParam;
import com.hzs.activity.recommend.vo.AcDirectPushUpgradeListVO;
import com.hzs.common.core.web.page.TableDataInfo;
import com.hzs.common.domain.activity.recommend.AcRecomUpgradeRecord;
import com.hzs.common.domain.activity.recommend.AcRecomUpgradeRecordExt;
import com.hzs.common.domain.sale.order.SaOrder;

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

/**
 * 推荐升级业务表 服务类
 */
public interface IAcRecomUpgradeRecordService extends IService<AcRecomUpgradeRecord> {

    /**
     * 撤单更新数据
     *
     * @param orderId    订单ID
     * @param pkModified 更新人ID
     * @return Integer
     */
    Boolean cancelOrder(Long orderId, Long pkModified);

    /**
     * 查询活动时间段内撤单记录
     *
     * @param upgradeRecord 推荐升级业务表
     * @return AcRecomUpgradeRecord
     */
    AcRecomUpgradeRecord selectUpgradeRecordByOrderId(AcRecomUpgradeRecordExt upgradeRecord);

    /**
     * 查询推荐的人数
     *
     * @param upgradeRecord 推荐升级业务表
     * @return Integer
     */
    List<Long> selectRecommendNumber(AcRecomUpgradeRecordExt upgradeRecord);

    /**
     * 更新升级状态
     *
     * @param pkIds      id集合
     * @param pkModified 更新人
     * @return Boolean
     */
    Boolean updateUpgradeStatusById(List<Long> pkIds, Long pkModified, Integer upGradeStatus);

    /**
     * 判断会员是否达标并且查询对应订单
     */
    List<SaOrder> listRecomOrder(Long pkMember, Integer pkGrade, Integer num, Date startTime, Date endTime);

    List<AcDirectPushUpgradeListVO> queryList(AcDirectPushUpgradeListParam param);
}
