package com.ym.mec.biz.dal.dao;

import java.util.List;
import java.util.Map;

import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
import org.apache.ibatis.annotations.Param;

import com.ym.mec.biz.dal.dto.ReplacementInstrumentActivityStatDto;
import com.ym.mec.biz.dal.dto.ReplacementInstrumentActivityStatHead;
import com.ym.mec.biz.dal.entity.ReplacementInstrumentActivity;
import com.ym.mec.common.dal.BaseDAO;

public interface ReplacementInstrumentActivityDao extends BaseDAO<Integer, ReplacementInstrumentActivity> {


    ReplacementInstrumentActivity findByUserId(@Param("cooperationOrganId") Integer cooperationOrganId, @Param("userId") Integer userId, @Param("cooperationId") Integer cooperationId);

    List<ReplacementInstrumentActivityStatDto> queryReplacements(Map<String, Object> params);

    int countReplacements(Map<String, Object> params);

    ReplacementInstrumentActivityStatHead countReplacementsInfo(Integer cooperationId);

    int openPay(@Param("replacementInstrumentCooperationId") Integer replacementInstrumentCooperationId);

    ReplacementInstrumentActivity getLock(@Param("id") Integer id);

    /**
     * 获取开启缴费推送的人
     *
     * @param replacementInstrumentCooperationId
     * @return
     */
    List<ReplacementInstrumentActivityStatDto> getPushUsers(@Param("replacementInstrumentCooperationId") Integer replacementInstrumentCooperationId);

    /**
     * 获取置换记录详情
     *
     * @param id
     * @return
     */
    ReplacementInstrumentActivityStatDto getInfo(@Param("id") Integer id);


    /**
     * 获取问卷分页数据
     *
     * @param params
     * @return
     */
    List<ReplacementInstrumentActivityStatDto> getPageList(Map<String, Object> params);

    /**
     * 获取问卷总条数
     *
     * @param params
     * @return
     */
    Integer getCount(Map<String, Object> params);

    /**
     * 置换活动的订单
     *
     * @param ids
     * @return
     */
    List<StudentPaymentOrder> getActivityOrder(@Param("ids") List<Integer> ids);
}
