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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.receive.consumer.superdeskmall.unified.qyng.UnifiedQyngOrderReceiveParam;
import cn.superdesk.uniorder.dto.receive.consumer.superdeskmall.unified.qyng.refund.UnifiedQyngRefundOrderReceiveParam;
import cn.superdesk.uniorder.dubbo.facade.order.receive.DubboReceiveMallQyngOrderService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @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 ReceiveMallQyngOrderDubboConsumerService {

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

	/****************************************** kafka 一般订单 企业内购 start ******************************************/

	public R<String> httpUnifiedQyngOrderReceive(UnifiedQyngOrderReceiveParam unifiedQyngOrderReceiveParam) {
		return dubboReceiveMallQyngOrderService.httpUnifiedQyngOrderReceive(unifiedQyngOrderReceiveParam);
	}

	public R<String> httpUnifiedQyngRefundOrderReceive(UnifiedQyngRefundOrderReceiveParam unifiedQyngRefundOrderReceiveParam) {
		return dubboReceiveMallQyngOrderService.httpUnifiedQyngRefundOrderReceive(unifiedQyngRefundOrderReceiveParam);
	}

	public void kafkaUnifiedQyngOrderReceive(String message) {

		dubboReceiveMallQyngOrderService.kafkaUnifiedQyngOrderReceive(message);
	}

	public void kafkaUnifiedQyngRefundOrderReceive(String message) {
		dubboReceiveMallQyngOrderService.kafkaUnifiedQyngRefundOrderReceive(message);
	}

	/****************************************** kafka 一般订单 企业内购   end ******************************************/
}
