update old release

This commit is contained in:
CaiHQ 2023-11-17 16:36:14 +08:00
parent 82dc43d174
commit 6fc49ad77c
2 changed files with 17 additions and 20 deletions

View File

@ -14,7 +14,7 @@ plugins {
id 'java' id 'java'
id 'java-library' id 'java-library'
} }
version = "1.4.1" version = "1.4.2"
group = 'org.bdware.sc.controlproxy' group = 'org.bdware.sc.controlproxy'
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {

View File

@ -110,27 +110,24 @@ module SearchModule {
////{"params":[{"type":"owner","keyword":"说明"},{"type":"doid","keyword":"aibd"}],"count":"10","offset":"0"} ////{"params":[{"type":"owner","keyword":"说明"},{"type":"doid","keyword":"aibd"}],"count":"10","offset":"0"}
//返回:{"data":[{},{},{}],"count":3} //返回:{"data":[{},{},{}],"count":3}
@ArgSchema({ @ArgSchema({
"!params" : [{
"!type" : "string", "!keyword" : "string", "mode" : "string"
}], "count" : "integer", "offset" : "integer"
}) })
export function search(arg) { export function search(arg) {
arg = convertArgToJson(arg); // arg = convertArgToJson(arg);
var req = { // var req = {
"searchMode" : [] // "searchMode" : []
}; // };
for (var i = 0; i < arg.params.length; i ++){ // for (var i = 0; i < arg.params.length; i ++){
var mode = "MAY"; // var mode = "MAY";
if (arg.params[i].mode != null){ // if (arg.params[i].mode != null){
mode = arg.params[i].mode; // mode = arg.params[i].mode;
} // }
req.searchMode.push({ // req.searchMode.push({
"key" : arg.params[i].type, "value" : arg.params[i].keyword, "type" : mode // "key" : arg.params[i].type, "value" : arg.params[i].keyword, "type" : mode
}); // });
} // }
req.offset = arg.offset; // req.offset = arg.offset;
req.count = arg.count; // req.count = arg.count;
var res = executeContract("Registry", "searchDo", JSON.stringify(req)); var res = executeContract("Registry", "searchDo", JSON.stringify(arg));
return res.result; return res.result;
} }
} }