
package com.tmerclub.cloud.api.order.feign;

import com.tmerclub.cloud.api.order.bo.EsPurchaseOrderBO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;

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

/**
 * @author tmerclub
 * @date 2020/11/23
 */
public interface PurchaseOrderFeignClient {

    /**
     * 获取采购订单需要保存到es中的数据
     * @param purchaseOrderId 采购订单id
     * @return
     */
    ServerResponseEntity<EsPurchaseOrderBO> saveMongoAndGetEsInfo(Long purchaseOrderId);

    /**
     * 更新采购订单的状态
     * @param purchaseOrderIds 采购订单id
     * @param purchaseOrderStatus 采购订单状态
     * @return
     */
    ServerResponseEntity<Void> updatePurchaseOrderStatus(List<Long> purchaseOrderIds, Integer purchaseOrderStatus);

    /**
     * 获取需要更新库存的商品id列表
     * @param beginTime
     * @param endTime
     * @return
     */
    ServerResponseEntity<List<Long>> listSpuIdOfStockChange(Date beginTime, Date endTime);

    /**
     * 统计未完成的采购订单数
     * @param warehouseId 仓库id
     * @return 未完成数
     */
    Long countUnFinish(Long warehouseId);
}
