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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.vo.unified.UnifiedOrderCommonHeadSum;
import cn.superdesk.uniorder.dto.vo.unified.UnifiedOrderReturnVo;
import cn.superdesk.uniorder.dto.vo.unified.ViewUnifiedOrderReturn;
import cn.superdesk.uniorder.dubbo.facade.order.base.DubboUnifiedRefundOrderService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;


@Slf4j
@Component
public class UnifiedOrderReturnDubboConsumerService {

	@Reference(version = "1.0.0", timeout = 30000, retries = -1)
	private DubboUnifiedRefundOrderService dubboUnifiedOrderReturnService;

	public R<List<UnifiedOrderReturnVo>> getPage(String token, Map<String, Object> params, int pageNum,
	                                             int pageSize) {

		return dubboUnifiedOrderReturnService.getPage(params, pageNum, pageSize);
	}

	public UnifiedOrderCommonHeadSum getPageH(String token, Map<String, Object> params) {

		return dubboUnifiedOrderReturnService.getPageH(params);
	}

	public List<ViewUnifiedOrderReturn> findView(Map<String, Object> returnparams) {

		return dubboUnifiedOrderReturnService.findView(returnparams);
	}
}
