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

import com.ym.mec.biz.dal.dto.musicalListDetailDto;
import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
import com.ym.mec.biz.dal.enums.DealStatusEnum;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface StudentPaymentOrderDetailDao extends BaseDAO<Long, StudentPaymentOrderDetail> {


    /**
     * 批量添加订单详情
     *
     * @param studentPaymentOrderDetailList
     * @return
     */
    int batchAdd(@Param("studentPaymentOrderDetailList") List<StudentPaymentOrderDetail> studentPaymentOrderDetailList);

    /**
     * 查询注册支付的订单详情
     *
     * @param musicGroupId
     * @param status
     * @return
     */
    List<StudentPaymentOrderDetail> findApplyOrderSuccess(@Param("musicGroupId") String musicGroupId, @Param("status") DealStatusEnum status);

    /**
     * 查询订单商品
     *
     * @param orderId
     * @return
     */
    List<StudentPaymentOrderDetail> findApplyOrderGoods(@Param("orderId") Long orderId);

    /**
     * 查询用户报名订单
     *
     * @param userId
     * @param status
     * @return
     */
    List<StudentPaymentOrderDetail> findUserApplyOrder(@Param("userId") Integer userId, @Param("status") DealStatusEnum status);

    /**
     * 乐器采购清单明细
     *
     * @param musicGroupId
     * @return
     */
    List<musicalListDetailDto> getMusicalListDetail(String musicGroupId);

    /**
     * 获取商品名称列表
     *
     * @param paymentOrderNo
     * @return
     */
    List<Map<Long, String>> queryGoodsNames(@Param("paymentOrderNo") List<Long> paymentOrderNo);

    /**
     * 获取对应商品类型总价
     *
     * @param paymentOrderNo
     * @param type
     * @return
     */
    List<Map<Long, BigDecimal>> queryGoodsPrice(@Param("paymentOrderNo") List<Long> paymentOrderNo, @Param("type") String type);

    /**
     * 获取订单商品
     * @param orderId
     * @return
     */
    StudentPaymentOrderDetail findApplyOrderMusical(@Param("orderId") Long orderId);
}