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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.param.operationCenter.customer.OpCenterCustomerOperatorOrgParam;
import cn.superdesk.uniorder.dto.param.operationCenter.operators.OperationCenterPaymentCustomerParam;
import cn.superdesk.uniorder.dto.param.operationCenter.payment.OperationCenterPayParam;
import cn.superdesk.uniorder.dto.param.operationCenter.payment.OperationCenterPaymentParam;
import cn.superdesk.uniorder.dto.vo.operationCenter.payment.OperationCenterPaymentVo;
import cn.superdesk.uniorder.dubbo.facade.operationCenter.payment.DubboOperationCenterPaymentService;
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/29 11:54
 * Description : dubbo-serice层
 */
@Slf4j
@Component
public class OperationCenterPaymentDubboService {
    @Reference(version = "1.0.0", timeout = 30000, retries = -1)
    private DubboOperationCenterPaymentService dubboOperationCenterPaymentService;

    public  R<String> addOrUpdateOperationCenterPayment(OperationCenterPaymentParam param, Long userId) {
      return  dubboOperationCenterPaymentService.addOrUpdateOperationCenterPayment(param, userId);
    }

    public R<List<OperationCenterPaymentVo>> getOperationCenterPaymentList(OperationCenterPayParam param) {
       return dubboOperationCenterPaymentService.getOperationCenterPaymentList(param);
    }

    public OperationCenterPaymentParam getPaymentById(Long id) {
       return dubboOperationCenterPaymentService.getPaymentById(id);
    }



    public void linkCustomer(OperationCenterPaymentCustomerParam param, Long userId) {
        dubboOperationCenterPaymentService.linkCustomer(param,userId);
    }

    public R<OperationCenterPaymentCustomerParam> linkCustomerByPaymentId(String paymentId) {
        return dubboOperationCenterPaymentService.linkCustomerByPaymentId(paymentId);
    }
}
