package com.xinelu.applet.mapper.trainingorderdetails;


import com.xinelu.manage.domain.trainingorderdetails.TrainingOrderDetails;
import com.xinelu.manage.vo.trainingorderdetails.TrainingDetailsByOrderVO;
import com.xinelu.manage.vo.trainingorderdetails.WaitPayTrainingOrderDetailsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 学习培训订单明细Mapper接口
 *
 * @author xinyilu
 * @date 2023-04-20
 */
public interface TrainingOrderDetailsMapper {
    /**
     * 查询学习培训订单明细
     *
     * @param id 学习培训订单明细主键
     * @return 学习培训订单明细
     */
    TrainingOrderDetails selectTrainingOrderDetailsById(Long id);

    /**
     * 查询学习培训订单明细列表
     *
     * @param trainingOrderDetails 学习培训订单明细
     * @return 学习培训订单明细集合
     */
    List<TrainingOrderDetails> selectTrainingOrderDetailsList(TrainingOrderDetails trainingOrderDetails);

    /**
     * 新增学习培训订单明细
     *
     * @param trainingOrderDetails 学习培训订单明细
     * @return 结果
     */
    int insertTrainingOrderDetails(TrainingOrderDetails trainingOrderDetails);

    /**
     * 修改学习培训订单明细
     *
     * @param trainingOrderDetails 学习培训订单明细
     * @return 结果
     */
    int updateTrainingOrderDetails(TrainingOrderDetails trainingOrderDetails);

    /**
     * 删除学习培训订单明细
     *
     * @param id 学习培训订单明细主键
     * @return 结果
     */
    int deleteTrainingOrderDetailsById(Long id);

    /**
     * 批量删除学习培训订单明细
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteTrainingOrderDetailsByIds(Long[] ids);

    /**
     * 批量新增学习培训订单明细
     *
     * @param trainingOrderDetailsList 学习培训订单明细
     * @return int
     **/
    int insertTrainingOrderDetailsList(List<TrainingOrderDetails> trainingOrderDetailsList);

    /**
     * 查询学习培训订单明细列表数量
     *
     * @param trainingItemId 学习培训订单明细
     * @return int
     **/
    int selectTrainingOrderDetailsByIdCount(Long trainingItemId);

    /**
     * 根据trainingOrderId查询订单编号
     *
     * @param trainingOrderId 订单id
     * @return com.xinyilu.base.vo.trainingorderdetails.TrainingDetailsByOrderVO
     **/
    TrainingDetailsByOrderVO selectTrainingOrderDetailsByOrderId(Long trainingOrderId);

    /**
     * 查询当前护理员培训课程包的购买信息
     *
     * @param trainingItemId          培训课程表id
     * @param nurseStationPersonId    护理员id
     * @param trainingOrderStatusList 订单状态集合
     * @return 结果
     */
    int getBuyTrainingOrderInfo(@Param("trainingItemId") Long trainingItemId, @Param("nurseStationPersonId") Long nurseStationPersonId, @Param("trainingOrderStatusList") List<String> trainingOrderStatusList);

    /**
     * 根据订单编号查询待支付的订单详情信息
     *
     * @param trainingOrderNo     学习培训订单编号
     * @param trainingOrderStatus 学习培训订单状态
     * @return 学习培训订单详情信息
     */
    WaitPayTrainingOrderDetailsVO getWaitPayTrainingOrderDetailsInfo(@Param("trainingOrderNo") String trainingOrderNo, @Param("trainingOrderStatus") String trainingOrderStatus);
}
