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

import cn.superdesk.uniorder.dao.entity.order.OrderSourceType;
import cn.superdesk.uniorder.dubbo.facade.order._leaveover.DubboOrderSourceTypeService;
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 OrderSourceTypeDubboConsumerService {

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

	public List<OrderSourceType> findAll(Map<String, Object> queryMap) {
		return orderSourceTypeService.findAll(queryMap);
	}

	public void add(OrderSourceType t) {
		orderSourceTypeService.addObj(t);
	}

	public OrderSourceType findById(Long id) {
		return orderSourceTypeService.findById(id);
	}

	public void update(OrderSourceType t) {
		orderSourceTypeService.updateObj(t);
	}

	public void delete(Long id) {
		orderSourceTypeService.deleteObj(id);
	}
}
