package cn.superdesk.uniorder.openapi.service.qchjc.organisation;

import cn.superdesk.uniorder.dubbo.facade.organisation.DubboSysSupplierService;
import cn.superdesk.uniorder.openapi.api._thirdpart.qchjc._dto.organisation.QchjcSupplierDto;
import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson2.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author xc
 * @description 处理集采供应商相关数据
 * @date 2022/3/24 17:37
 */
@Slf4j
@Component
public class SupplierService {

    @Reference(version = "1.0.0", timeout = 300000, retries = -1)
    private DubboSysSupplierService dubboSysSupplierService;

    /**
     * 同步集采供应商数据
     * @param dto
     */
    public void receiveSupplierData(QchjcSupplierDto dto) {
        //同步数据
        dubboSysSupplierService.mergeReceiveSupplier4Qchjc(JSON.toJSONString(dto));
    }

}
