package com.hzs.activity.recommend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.activity.recommend.AcRecomUpgradeRecord;
import com.hzs.common.domain.activity.recommend.AcRecomUpgradeRecordExt;

import java.util.List;

/**
 * 推荐升级业务表 服务类
 *
 * @author hzs
 * @since 2023-04-27
 */
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);

}
