OnlineTransfer

This commit is contained in:
csc 2025-09-03 18:47:37 +08:00
parent f1473f803e
commit 51df345426
7 changed files with 89 additions and 4 deletions

View File

@ -0,0 +1,7 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<ScalaCodeStyleSettings>
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
</ScalaCodeStyleSettings>
</code_scheme>
</component>

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

15
.idea/git_toolbox_prj.xml Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>

View File

@ -41,6 +41,7 @@ public class OnlineTransfer implements IOnlineTransfer {
Map reqSvcHeader = (Map) map.get(MainUtil.ReqSvcHeader); Map reqSvcHeader = (Map) map.get(MainUtil.ReqSvcHeader);
Map svcBody = (Map) map.get(MainUtil.SvcBody); Map svcBody = (Map) map.get(MainUtil.SvcBody);
log.info("转账 " + svcBody.get("preLogno") + ":" + svcBody.get("trotAccno") + "->" + svcBody.get("amt") + "->" + svcBody.get("trinAccno"));
MainUtil.copyMap(reqSvcHeader, onlineTransfer.getJSONObject(MainUtil.RspSvcHeader), svcHeaderMapping); MainUtil.copyMap(reqSvcHeader, onlineTransfer.getJSONObject(MainUtil.RspSvcHeader), svcHeaderMapping);
MainUtil.copyMap(svcBody, onlineTransfer.getJSONObject(MainUtil.SvcBody), svcBodyMapping); MainUtil.copyMap(svcBody, onlineTransfer.getJSONObject(MainUtil.SvcBody), svcBodyMapping);

View File

@ -15,9 +15,9 @@ public class CopyBipMetadata {
//公共模块后台系统 //公共模块后台系统
File common = new File(bipDir, "com.tytsyw.dsc.common\\src\\com"); File common = new File(bipDir, "com.tytsyw.dsc.common\\src\\com");
//服务定义服务引用 //服务定义服务引用
File service = new File(bipDir, "com.tytsyw.dsc.service\\src\\com"); File service = new File(bipDir, "com.tytsyw.dsc.service\\src\\com");
//组合服务服务接口 //组合服务服务接口
File scene = new File(bipDir, "com.tytsyw.dsc.scene\\src\\com"); File scene = new File(bipDir, "com.tytsyw.dsc.scene\\src\\com");
File outPutDir = new File(metadataDir, "tenantBusinessManager"); File outPutDir = new File(metadataDir, "tenantBusinessManager");

View File

@ -0,0 +1,53 @@
package com.tytsyw.bip.tools;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import java.io.IOException;
import java.util.List;
public class ZooKeeperServiceDiscovery {
private static final String ZK_ADDRESS = "localhost:2181";
public static void main(String[] args) throws IOException, InterruptedException, KeeperException {
ZooKeeper zk = new ZooKeeper(ZK_ADDRESS, 5000, event -> {
if (event.getState() == Watcher.Event.KeeperState.SyncConnected) {
System.out.println("Connected to ZooKeeper");
}
});
// 等待连接建立
Thread.sleep(2000);
// 获取服务列表
List<String> services = zk.getChildren("/", false);
System.out.println("Services: " + services);
//排序
services.sort(String::compareTo);
for (String service : services) {
System.out.println("Service: " + service);
List<String> children = zk.getChildren("/" + service, false);
children.sort(String::compareTo);
for (String child : children) {
List<String> children1 = zk.getChildren("/" + service + "/" + child, false);
System.out.println(" child: " + child + " children: " + children1);
for (String child1 : children1) {
if ("providers".equals(child1)) {
byte[] data = zk.getData("/" + service + "/" + child + "/" + child1, false, null);
if (data != null) {
System.out.println(" providers: " + new String(data));
}
break;
}
}
}
}
zk.close();
}
}

View File

@ -101,6 +101,10 @@
{ {
"attrValue": "DetailIsFile", "attrValue": "DetailIsFile",
"attrName": "DetailStyle" "attrName": "DetailStyle"
},
{
"attrValue": "SEQ:18",
"attrName": "serviceSerialNo"
} }
] ]
}, },