From 24b1b15ac0869e063796cf79064eb43d90201193 Mon Sep 17 00:00:00 2001 From: scq <1139040563@qq.com> Date: Tue, 11 Jul 2023 22:57:57 +0800 Subject: [PATCH] all interface refactor --- backend/yjs/ControlProxy.yjs | 70 ++++++++++----------- backend/yjs/ShanxiAuditPRoxy.yjs | 8 +++ backend/yjs/ShanxiDataRepo.yjs | 41 +++++++++++++ backend/yjs/ShanxiGlobalRouter.yjs | 98 ++++++++++++++++++++++++++++++ backend/yjs/ShanxiRegistry.yjs | 65 ++++++++++++++++++++ backend/yjs/audit.yjs | 2 +- 6 files changed, 248 insertions(+), 36 deletions(-) create mode 100644 backend/yjs/ShanxiAuditPRoxy.yjs create mode 100644 backend/yjs/ShanxiDataRepo.yjs create mode 100644 backend/yjs/ShanxiGlobalRouter.yjs create mode 100644 backend/yjs/ShanxiRegistry.yjs diff --git a/backend/yjs/ControlProxy.yjs b/backend/yjs/ControlProxy.yjs index 7fde766..17d4236 100755 --- a/backend/yjs/ControlProxy.yjs +++ b/backend/yjs/ControlProxy.yjs @@ -1,9 +1,9 @@ -import "repodetail.yjs"; -import "search.yjs"; -import "audit.yjs"; -import "networking.yjs"; import "DAC.yjs"; import "union.yjs"; +import "ShanxiAuditPRoxy.yjs"; +import "ShanxiDataRepo.yjs"; +import "ShanxiGlobalRouter.yjs"; +import "ShanxiRegistry"; //网关为Gateway //路由器改名为Resolver,中文名为标识解析系统 //搜索引擎改名为为Registry,中文名为注册表系统 @@ -54,14 +54,14 @@ contract ControlProxy { }; } //网关需新增的接口 - @Description("参数为,{\"doId\":\"bdware.ss/Repox\"}") - export function pingRepo(arg) { - arg = convertArgToJson(arg); - if (arg.doId ==undefined ){ - return { - "msg":"missing arguments repoId ", "code":1 - }; - } + //@Description("参数为,{\"doId\":\"bdware.ss/Repox\"}") + //export function pingRepo(arg) { + //arg = convertArgToJson(arg); + //if (arg.doId ==undefined ){ + // return { + // "msg":"missing arguments repoId ", "code":1 + // }; + //} // var ret = executeContract("Gateway", "pingRepo", arg.doId); // ret = ret.result; // if (ret.rrt > 0) @@ -70,8 +70,8 @@ contract ControlProxy { // }; else return { // "msg":"repo is unconnected", "code":1 // }; - return org.bdware.sc.controlproxy.RepoProxy.pingRepo(arg.doId); - } + //return org.bdware.sc.controlproxy.RepoProxy.pingRepo(arg.doId); + //} @Description("shanxi/TestLocal shanxi/Repository") export function testPingRepo(arg) { @@ -83,14 +83,14 @@ contract ControlProxy { return org.bdware.sc.controlproxy.RepoProxy.getRepoStatistics(arg); } //网关的接口 - @Description("无参数") - export function getRepoList(arg) { + //@Description("无参数") + //export function getRepoList(arg) { //use configed arg.routerId; - ret = executeContract(Global.router, "listRepo", ""); + // ret = executeContract(Global.router, "listRepo", ""); //ret=executeContract("Gateway","listLocalRepo",""); //var list = ret.result - return ret.result; - } + // return ret.result; + //} //网关的接口 @Description("参数为 {\"doId\":\"bdware.ss/Repox\"}") export function deleteRepo(arg) { @@ -106,17 +106,17 @@ contract ControlProxy { }; } //网关的接口 需新增 - @Description("参数为 [{\"doId\":\"bdware.ss/Repox\"},{\"doId\":\"bdware.ss/Repoy\"}]") - export function deleteRepoList(arg) { - arg = convertArgToJson(arg); - var ret = []; - for (var i = 0; - i