package com.bonus.core.order.api;

import com.bonus.core.order.common.model.OrderInfo;
import com.bonus.core.order.common.service.OrderDetailService;
import com.bonus.core.order.common.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public class OrderMarketingApi {
   @Autowired
   @Lazy
   protected OrderInfoService orderInfoService;
   @Autowired
   @Lazy
   protected OrderDetailService orderDetailService;

   public List<OrderInfo> listOrder(Long custId, LocalDate beginDate, LocalDate endDate, List<Integer> mealTimeTypes, List<Integer> orderTypes) {
      return this.orderInfoService.listCustOrder(custId, beginDate, endDate, mealTimeTypes, orderTypes);
   }
}
