添加外部接口

This commit is contained in:
hzj
2024-09-12 11:39:25 +08:00
parent 701aa3ef37
commit e250e5169b
2 changed files with 11 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import com.njcn.system.api.fallback.EpdFeignClientFallbackFactory;
import com.njcn.system.pojo.dto.EpdDTO;
import com.njcn.system.pojo.param.EleEpdPqdParam;
import com.njcn.system.pojo.po.EleEpdPqd;
import com.njcn.system.pojo.vo.EleEpdPqdListVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -59,4 +60,7 @@ public interface EpdFeignClient {
HttpResult<List<EleEpdPqd>> findListByShowName(@RequestParam("name") String name);
@PostMapping("/selectByClassId")
HttpResult<List<EleEpdPqd>> selectByClassId(@RequestParam("classId") String classId);
@PostMapping("/selectAll")
HttpResult<List<EleEpdPqdListVO>> selectAll();
}

View File

@@ -7,6 +7,7 @@ import com.njcn.system.api.EpdFeignClient;
import com.njcn.system.pojo.dto.EpdDTO;
import com.njcn.system.pojo.param.EleEpdPqdParam;
import com.njcn.system.pojo.po.EleEpdPqd;
import com.njcn.system.pojo.vo.EleEpdPqdListVO;
import com.njcn.system.utils.SystemEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
@@ -112,6 +113,12 @@ public class EpdFeignClientFallbackFactory implements FallbackFactory<EpdFeignCl
log.error("{}异常,降级处理,异常为:{}","根据数据分类查询字典信息集合",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<EleEpdPqdListVO>> selectAll() {
log.error("{}异常,降级处理,异常为:{}","根据数据分类查询字典信息集合",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}