package com.mosty.rwzx.remote;

import com.alibaba.fastjson.JSON;
import com.mosty.base.feign.service.MostyJcglFeignService;
import com.mosty.base.feign.service.MostyYszxFeignService;
import com.mosty.base.model.vo.jcgl.TbJcglDsfVo;
import com.mosty.common.base.domain.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author dw
 * @since 2022/7/23
 * 外部调用基础管理接口
 **/
@Service
@Slf4j
public class TbJcglAdaptRemoteService {
    @Resource
    private MostyJcglFeignService jcglFeignService;

    public TbJcglDsfVo getDsfInfo(String code){
        ResponseResult<TbJcglDsfVo> responseResult = jcglFeignService.getDsfInfo(code);
        if (responseResult == null || !responseResult.isSuccess()) {
            log.error("获取第三方信息失败 responseResult = {}", JSON.toJSONString(responseResult));
            return null;
        }
        return responseResult.getData();
    }
}
