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

import com.ym.mec.biz.dal.entity.ChildrenDayDegreeDetail;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ChildrenDayDegreeDetailDao extends BaseDAO<Integer, ChildrenDayDegreeDetail> {

    /**
     * 获取用户某种状态的报名详情
     *
     * @param userId
     * @return
     */
    List<ChildrenDayDegreeDetail> getByUserIdAndStatus(@Param("userId") Integer userId, @Param("status") Integer status);

    /**
     * 批量插入购买详情
     *
     * @param details
     * @return
     */
    int batchAdd(@Param("details") List<ChildrenDayDegreeDetail> details);

    /**
     * 跟新状态信息
     *
     * @param orderId
     * @param status
     * @return
     */
    int updateStatus(@Param("orderId") Long orderId, @Param("status") Integer status);


    /**
     * 根据订单id获取购买详情
     * @param orderId
     * @return
     */
    List<ChildrenDayDegreeDetail> getByOrderId(@Param("orderId") Long orderId);
}
