package cn.superdesk.uniorder.dubbo.consumer.operationCenter.operators;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.param.operationCenter.base.OperationCenterParam;
import cn.superdesk.uniorder.dto.param.operationCenter.operators.OperationCenterOperatorsParam;
import cn.superdesk.uniorder.dto.vo.operationCenter.base.OperationCenterVo;
import cn.superdesk.uniorder.dto.vo.operationCenter.operators.OperationCenterOperatorsVo;
import cn.superdesk.uniorder.dto.vo.operationCenter.order.OperationCenterOrderFormVo;
import cn.superdesk.uniorder.dubbo.facade.operationCenter.operators.DubboOperationCenterOperatorsService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author : zx
 * @Create : 2023/3/28 11:08
 * Description : dubbo-运营商
 */
@Slf4j
@Component
public class OperationCenterOperatorsDubboService {
    @Reference(version = "1.0.0", timeout = 30000, retries = -1)
    private DubboOperationCenterOperatorsService dubboOperationCenterOperatorsService;

    public R<List<OperationCenterOperatorsVo>> getOpCenterOperatorList(OperationCenterOperatorsParam param) {
        return dubboOperationCenterOperatorsService.getOpCenterOperatorList(param);
    }

    public R<List<OperationCenterVo>> selectOperationCenterOperators(OperationCenterParam param) {
        R<List<OperationCenterVo>> result = new R<>();
        List<OperationCenterVo> list = dubboOperationCenterOperatorsService.selectOperationCenterOperators(param);
        result.setData(list);
        return result;
    }
}
