package com.ym.mec.biz.service;

import com.ym.mec.auth.api.entity.SysUser;
import com.ym.mec.biz.dal.dto.ReplacementInstrumentActivityDto;
import com.ym.mec.biz.dal.dto.ReplacementInstrumentActivityStatDto;
import com.ym.mec.biz.dal.dto.ReplacementPayDto;
import com.ym.mec.biz.dal.entity.ReplacementInstrumentActivity;
import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
import com.ym.mec.biz.dal.page.ReplacementInstrumentActivityQueryInfo;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.service.BaseService;

import java.util.Map;

public interface ReplacementInstrumentActivityService extends BaseService<Integer, ReplacementInstrumentActivity> {

    Object add(ReplacementInstrumentActivity replacementInstrumentActivity);

    ReplacementInstrumentActivity findByUserId(Integer cooperationOrganId, Integer userId,Integer cooperationId);

    PageInfo<ReplacementInstrumentActivityStatDto> queryReplacementsStat(ReplacementInstrumentActivityQueryInfo queryInfo);

    /**
     * 乐器置换的支付
     *
     * @param replacementPayDto
     * @return
     * @throws Exception
     */
    Map pay(ReplacementPayDto replacementPayDto) throws Exception;

    /**
     * 支付回调处理
     *
     * @param studentPaymentOrder
     * @return
     */
    Boolean orderCallback(StudentPaymentOrder studentPaymentOrder);

    /**
     * 获取置换的详情
     *
     * @param id
     * @return
     */
    ReplacementInstrumentActivityStatDto getInfo(Integer id);

    /**
     * 获取问卷列表
     * @param queryInfo
     * @return
     */
    PageInfo<ReplacementInstrumentActivityStatDto> getPageList(ReplacementInstrumentActivityQueryInfo queryInfo);

    Object apply(ReplacementInstrumentActivityDto replacementInstrumentActivityDto);

    public void resultSync();

    ReplacementInstrumentActivity queryUserInfo(Integer cooperationOrganId, SysUser user,Integer cooperationId);
}
