pms国网上送代码提交

This commit is contained in:
2023-12-19 08:34:19 +08:00
parent 6d472eb443
commit 8e9019282d
8 changed files with 97 additions and 6 deletions

View File

@@ -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() ;
}

View File

@@ -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);
}
};
}
}