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

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

import org.apache.ibatis.annotations.Param;

import com.ym.mec.biz.dal.entity.TenantPaymentOrder;
import com.ym.mec.biz.dal.enums.DealStatusEnum;
import com.ym.mec.common.dal.BaseDAO;

public interface TenantPaymentOrderDao extends BaseDAO<Long, TenantPaymentOrder> {

	/**
	 * 查询用户所有订单
	 * @param userId
	 * @return
	 */
	List<TenantPaymentOrder> queryByUserId(Integer userId);

	/**
	 * 查询用户所有订单
	 * @param userId
	 * @param activitiesId
	 * @return
	 */
	List<TenantPaymentOrder> queryByUserIdAndActivitiesId(@Param("userId") Integer userId, @Param("activitiesId") Integer activitiesId);

	/**
	 * 根据订单号查询订单
	 *
	 * @param orderNo
	 * @return
	 */
	TenantPaymentOrder findOrderByOrderNo(@Param("orderNo") String orderNo);

	/**
	 * 查询支付中订单
	 *
	 * @param status
	 * @return
	 */
	List<TenantPaymentOrder> findOrdersByStatus(@Param("status") DealStatusEnum status, @Param("paymentChannel") String paymentChannel);

	TenantPaymentOrder getOrderMoneyAmount(Map<String, Object> params);
}