mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-01-10 01:44:14 +00:00
prune origin doi logic
This commit is contained in:
parent
af298b6ae7
commit
0d4f0243a2
@ -123,23 +123,14 @@ public class CMActions implements OnHashCallback {
|
|||||||
resultCallback.onResult(MISSING_ARGUMENT);
|
resultCallback.onResult(MISSING_ARGUMENT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (args.has("contractDOI") && !args.has("contractID")) {
|
|
||||||
LOGGER.debug("contractDOI: " + args.get("contractDOI").getAsString());
|
if (args.has("contractName")) {
|
||||||
try {
|
cReq.setContractID(args.get("contractName").getAsString());
|
||||||
cReq.setContractDOI(args.get("contractDOI").getAsString());
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
resultCallback.onResult(INVALID_DOI);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (args.has("contractName")) {
|
|
||||||
cReq.setContractID(args.get("contractName").getAsString());
|
|
||||||
}
|
|
||||||
if (args.has("contractID")) {
|
|
||||||
cReq.setContractID(args.get("contractID").getAsString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (args.has("contractID")) {
|
||||||
|
cReq.setContractID(args.get("contractID").getAsString());
|
||||||
|
}
|
||||||
|
|
||||||
if (args.has("isDebug")) {
|
if (args.has("isDebug")) {
|
||||||
cReq.setFromDebug(args.get("isDebug").getAsBoolean());
|
cReq.setFromDebug(args.get("isDebug").getAsBoolean());
|
||||||
}
|
}
|
||||||
@ -544,9 +535,9 @@ public class CMActions implements OnHashCallback {
|
|||||||
jo.remove("isInsnLimit");
|
jo.remove("isInsnLimit");
|
||||||
jo.remove("size");
|
jo.remove("size");
|
||||||
try {
|
try {
|
||||||
if (jo.has("result") && jo.get("result").isJsonPrimitive()){
|
if (jo.has("result") && jo.get("result").isJsonPrimitive()) {
|
||||||
String resultStr = jo.get("result").getAsString();
|
String resultStr = jo.get("result").getAsString();
|
||||||
jo.add("result",JsonParser.parseString(resultStr));
|
jo.add("result", JsonParser.parseString(resultStr));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
|
@ -226,8 +226,6 @@ public class ContractRepositoryHandler extends RepositoryHandlerBase implements
|
|||||||
ContractRequest cr = new ContractRequest();
|
ContractRequest cr = new ContractRequest();
|
||||||
|
|
||||||
cr.setContractID(cc.getContractID());
|
cr.setContractID(cc.getContractID());
|
||||||
cr.setContractDOI(doipMessage.header.parameters.id);
|
|
||||||
|
|
||||||
if (args.has("withDynamicAnalysis")) cr.withDynamicAnalysis = args.get("withDynamicAnalysis").getAsBoolean();
|
if (args.has("withDynamicAnalysis")) cr.withDynamicAnalysis = args.get("withDynamicAnalysis").getAsBoolean();
|
||||||
if (args.has("withEvaluatesAnalysis"))
|
if (args.has("withEvaluatesAnalysis"))
|
||||||
cr.withEvaluatesAnalysis = args.get("withEvaluatesAnalysis").getAsBoolean();
|
cr.withEvaluatesAnalysis = args.get("withEvaluatesAnalysis").getAsBoolean();
|
||||||
|
Loading…
Reference in New Issue
Block a user