package com.erp.tenant.service.order;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.erp.tenant.dto.order.OrderDetailResponse;
import com.erp.tenant.dto.order.OrderPageResponse;
import com.erp.tenant.entity.order.Order;

/**
 * 租户端订单服务接口
 */
public interface OrderService {

    /**
     * 订单分页列表
     */
    IPage<Order> getOrderPage(Long tenantId, String platform, String erpStatus,
                              Long warehouseId, String keyword,
                              String startDate, String endDate,
                              int page, int pageSize);

    /**
     * 订单详情
     */
    OrderDetailResponse getOrderDetail(Long tenantId, Long orderId);

    /**
     * 审核订单（通过）
     */
    boolean approveOrder(Long tenantId, Long orderId, Long operatorId);

    /**
     * 驳回订单
     */
    boolean rejectOrder(Long tenantId, Long orderId, Long operatorId, String reason);

    /**
     * 推送云仓
     */
    boolean pushToWarehouse(Long tenantId, Long orderId);

    /**
     * 手机号脱敏
     */
    String maskPhone(String phone);
}
