package com.tanpu.community.service; import com.tanpu.common.api.CommonResp; import com.tanpu.common.exception.BizException; import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoNew; import com.tanpu.community.feign.fatools.FeignClientForFatools; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class FeignService { @Autowired private FeignClientForFatools fatools; public UserInfoNew getUserInfoById(String userId) { CommonResp<UserInfoNew> userInfoNewCommonResp = fatools.queryUsersListNew(userId); if (userInfoNewCommonResp.isNotSuccess()) { throw new BizException("内部接口调用失败"); } return userInfoNewCommonResp.getData(); } }