package com.ym.mec.collectfee.dao;

import com.ym.mec.collectfee.common.dao.BaseDAO;
import com.ym.mec.collectfee.entity.ApplyInfoPage;
import com.ym.mec.collectfee.entity.Order;
import com.ym.mec.collectfee.entity.OrderPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

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

@Component
public interface OrderDao extends BaseDAO<Integer, Order> {

    List<Order> getOrderByUserId(Integer userId);

    List<Order> getOrderByClassId(@Param("classId") Integer classId,@Param("type") Integer type, @Param("voicyPart")String voicyPart, @Param("startTime") String startTime, @Param("endTime") String endTime,@Param("branchId") Integer branchId);

    List<Order> getOrderByBatch(String batchNum);

    int countOrder(@Param("poName") String poName,@Param("voicePort") String voicePort);

    Order getOrderByOrderNo(@Param("orderNo") String orderNo);

    Order findOrderByStatus(@Param("userId") Integer userId,@Param("status") Integer status);

    int getPayOrderNums();

    List<Order> findPayingOrders();

    int updateByIdAndStatus(Map upMap);

    List<Order> findPayingOrdersOver(Map<String,Object> map);

    Integer getPayingOrderNums(int groupId);

    Order findRegOrderByStatus(@Param("userId") Integer userId,@Param("status") Integer status);

    int queryOrderCount(Map<String, Object> params);

    List<Order> queryOrderPage(Map<String, Object> queryInfo);
}