pms国网上送代码提交
This commit is contained in:
@@ -7,6 +7,7 @@ import com.njcn.system.pojo.po.SysDicTreePO;
|
||||
import com.njcn.system.pojo.vo.DictTreeVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@@ -26,4 +27,13 @@ public interface DictTreeFeignClient {
|
||||
|
||||
@PostMapping("/query")
|
||||
HttpResult<List<DictTreeVO>> query(@RequestParam("pid") String pid) ;
|
||||
|
||||
@GetMapping("/queryAll")
|
||||
HttpResult<List<SysDicTreePO>> queryAll() ;
|
||||
|
||||
|
||||
@GetMapping("/queryTree")
|
||||
HttpResult<List<SysDicTreePO>> queryTree() ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,18 @@ public class DictTreeFeignClientFallbackFactory implements FallbackFactory<DictT
|
||||
log.error("{}异常,降级处理,异常为:{}","根据字典pid获取字典树数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<SysDicTreePO>> queryAll() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取所有字典树数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<SysDicTreePO>> queryTree() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取树形数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user