添加外部接口
This commit is contained in:
@@ -6,6 +6,7 @@ import com.njcn.system.api.fallback.EpdFeignClientFallbackFactory;
|
|||||||
import com.njcn.system.pojo.dto.EpdDTO;
|
import com.njcn.system.pojo.dto.EpdDTO;
|
||||||
import com.njcn.system.pojo.param.EleEpdPqdParam;
|
import com.njcn.system.pojo.param.EleEpdPqdParam;
|
||||||
import com.njcn.system.pojo.po.EleEpdPqd;
|
import com.njcn.system.pojo.po.EleEpdPqd;
|
||||||
|
import com.njcn.system.pojo.vo.EleEpdPqdListVO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -59,4 +60,7 @@ public interface EpdFeignClient {
|
|||||||
HttpResult<List<EleEpdPqd>> findListByShowName(@RequestParam("name") String name);
|
HttpResult<List<EleEpdPqd>> findListByShowName(@RequestParam("name") String name);
|
||||||
@PostMapping("/selectByClassId")
|
@PostMapping("/selectByClassId")
|
||||||
HttpResult<List<EleEpdPqd>> selectByClassId(@RequestParam("classId") String classId);
|
HttpResult<List<EleEpdPqd>> selectByClassId(@RequestParam("classId") String classId);
|
||||||
|
|
||||||
|
@PostMapping("/selectAll")
|
||||||
|
HttpResult<List<EleEpdPqdListVO>> selectAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.njcn.system.api.EpdFeignClient;
|
|||||||
import com.njcn.system.pojo.dto.EpdDTO;
|
import com.njcn.system.pojo.dto.EpdDTO;
|
||||||
import com.njcn.system.pojo.param.EleEpdPqdParam;
|
import com.njcn.system.pojo.param.EleEpdPqdParam;
|
||||||
import com.njcn.system.pojo.po.EleEpdPqd;
|
import com.njcn.system.pojo.po.EleEpdPqd;
|
||||||
|
import com.njcn.system.pojo.vo.EleEpdPqdListVO;
|
||||||
import com.njcn.system.utils.SystemEnumUtil;
|
import com.njcn.system.utils.SystemEnumUtil;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -112,6 +113,12 @@ public class EpdFeignClientFallbackFactory implements FallbackFactory<EpdFeignCl
|
|||||||
log.error("{}异常,降级处理,异常为:{}","根据数据分类查询字典信息集合",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","根据数据分类查询字典信息集合",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<EleEpdPqdListVO>> selectAll() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据数据分类查询字典信息集合",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user