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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.receive.consumer.superdeskmall.proxyclient.ProxyClientOrderOptBecomeInvalidQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade.order.receive.DubboReceiveProxyClientOrderService;
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 ReceiveProxyClientOrderDubboConsumerService {

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

	/****************************************** kafka 代客下单 start ******************************************/

	public void kafkaProxyClientOrderReceive(String message) {
		dubboReceiveProxyClientOrderService.kafkaProxyClientOrderReceive(message);
	}

	/**
	 * 订单作废
	 *
	 * @param queryCriteria
	 * @return
	 */
	public R<String> proxyClientOrderOptBecomeInvalid(ProxyClientOrderOptBecomeInvalidQueryCriteria queryCriteria) {
		return dubboReceiveProxyClientOrderService.proxyClientOrderOptBecomeInvalid(queryCriteria);
	}

	/****************************************** kafka 代客下单   end ******************************************/
}
