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.flsc.UnifiedFlscOrderReceiveParam;
import cn.superdesk.uniorder.dto.receive.consumer.superdeskmall.unified.flsc.refund.UnifiedFlscRefundOrderReceiveParam;
import cn.superdesk.uniorder.dubbo.facade.order.receive.DubboReceiveMallFlscOrderService;
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 ReceiveMallFlscOrderDubboConsumerService {

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

	/****************************************** kafka 一般订单 福利商城 start ******************************************/

	public R<String> httpUnifiedFlscOrderReceive(UnifiedFlscOrderReceiveParam unifiedFlscOrderReceiveParam) {
		return dubboReceiveMallFlscOrderService.httpUnifiedFlscOrderReceive(unifiedFlscOrderReceiveParam);
	}

	public R<String> httpUnifiedFlscRefundOrderReceive(UnifiedFlscRefundOrderReceiveParam unifiedFlscRefundOrderReceiveParam) {
		return dubboReceiveMallFlscOrderService.httpUnifiedFlscRefundOrderReceive(unifiedFlscRefundOrderReceiveParam);
	}

	public void kafkaUnifiedFlscOrderReceive(String message) {

		dubboReceiveMallFlscOrderService.kafkaUnifiedFlscOrderReceive(message);
	}

	public void kafkaUnifiedFlscRefundOrderReceive(String message) {
		dubboReceiveMallFlscOrderService.kafkaUnifiedFlscRefundOrderReceive(message);
	}

	/**
	 * 商城对账订单推送
	 * @param message
	 */
	public void kafkaUnifiedFlscAccountingOrderReceive(String message) {
		dubboReceiveMallFlscOrderService.kafkaUnifiedFlscAccountingOrderReceive(message);
	}

	/****************************************** kafka 一般订单 福利商城   end ******************************************/
}
