package cn.superdesk.uniorder.dubbo.consumer.order.receive;

import cn.superdesk.uniorder.common.pagination.PageQueryParam;
import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.base.UnifiedOrder;
import cn.superdesk.uniorder.dto.receive.consumer.superdeskappservices.flashdeliver.FlashDeliverOrderReceiveParam;
import cn.superdesk.uniorder.dto.receive.consumer.superdeskappservices.flashdeliver.FlashDeliverRefundOrderReceiveParam;
import cn.superdesk.uniorder.dubbo.facade.order.receive.DubboReceiveFlashDeliverOrderService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2021/11/30 下午5:07
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/11/30 下午5:07
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@Component
public class ReceiveFlashDeliverOrderDubboConsumerService {


	@Reference(version = "1.0.0", timeout = 180000, retries = -1)
	private DubboReceiveFlashDeliverOrderService dubboReceiveFlashDeliverOrderService;


	/****************************************** kafka 服务之窗 楼闪送 start ******************************************/

	public R<String> httpFlashDeliverOrderReceive(FlashDeliverOrderReceiveParam orderReceiveParam) {
		return dubboReceiveFlashDeliverOrderService.httpFlashDeliverOrderReceive(orderReceiveParam);
	}

	public R<String> httpFlashDeliverOrderRefundReceive(FlashDeliverRefundOrderReceiveParam refundOrderReceiveParam) {
		return dubboReceiveFlashDeliverOrderService.httpFlashDeliverOrderRefundReceive(refundOrderReceiveParam);
	}

	public void kafkaFlashDeliverOrderReceive(String message) {
		dubboReceiveFlashDeliverOrderService.kafkaFlashDeliverOrderReceive(message);
	}

	public void kafkaFlashDeliverOrderRefundReceive(String message) {
		dubboReceiveFlashDeliverOrderService.kafkaFlashDeliverOrderRefundReceive(message);
	}

	public void kafkaFlashDeliverOrderStateUpdate(String message) {

		dubboReceiveFlashDeliverOrderService.kafkaFlashDeliverOrderReceiveStateUpdate(message);
	}

	/****************************************** kafka 服务之窗 楼闪送   end ******************************************/

	/****************************************** kafka patchUnifiedOrderFieldOutVirt start ******************************************/

	public void kafkaFlashDeliverPatchUnifiedOrderFieldOutVirt(String message) {

		dubboReceiveFlashDeliverOrderService.kafkaFlashDeliverPatchUnifiedOrderFieldOutVirt(message);
	}

	public R<List<UnifiedOrder>> patchFlashDeliverPatchUnifiedOrderFieldOutVirt(PageQueryParam pageQueryParam) {

		return dubboReceiveFlashDeliverOrderService.patchFlashDeliverPatchUnifiedOrderFieldOutVirt(pageQueryParam);
	}

	/****************************************** kafka patchUnifiedOrderFieldOutVirt   end ******************************************/
}
