package com.ruoyi.web.modules.order.facade.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.web.modules.account.dto.MemberOrderQueryDTO;
import com.ruoyi.web.modules.merchant.facade.IMerchantOrderFacade;
import com.ruoyi.web.modules.order.facade.IOrderFacade;
import com.ruoyi.web.modules.order.service.IOrderService;
import com.ruoyi.web.modules.store.facade.IShopOrderFacade;

@Service
@Primary
public class OrderFacadeImpl implements IOrderFacade, IShopOrderFacade, IMerchantOrderFacade
{
    @Autowired
    private IOrderService orderService;

    @Override
    public boolean hasUnfinishedOrdersByShop(Long shopId)
    {
        return orderService.hasUnfinishedOrdersByShop(shopId);
    }

    @Override
    public boolean hasUnfinishedOrdersByMerchant(Long merchantId)
    {
        return orderService.hasUnfinishedOrdersByMerchant(merchantId);
    }

    @Override
    public TableDataInfo pageOrdersByMember(Long memberId, MemberOrderQueryDTO query)
    {
        return orderService.pageOrdersByMember(memberId, query);
    }

    @Override
    public Object getOrderDetail(Long memberId, Long orderId)
    {
        return orderService.getOrderDetail(memberId, orderId);
    }
}
