forked from iod/ControlProxy
update old release
This commit is contained in:
parent
82dc43d174
commit
6fc49ad77c
@ -14,7 +14,7 @@ plugins {
|
||||
id 'java'
|
||||
id 'java-library'
|
||||
}
|
||||
version = "1.4.1"
|
||||
version = "1.4.2"
|
||||
group = 'org.bdware.sc.controlproxy'
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
|
@ -110,27 +110,24 @@ module SearchModule {
|
||||
////{"params":[{"type":"owner","keyword":"说明"},{"type":"doid","keyword":"aibd"}],"count":"10","offset":"0"}
|
||||
//返回:{"data":[{},{},{}],"count":3}
|
||||
@ArgSchema({
|
||||
"!params" : [{
|
||||
"!type" : "string", "!keyword" : "string", "mode" : "string"
|
||||
}], "count" : "integer", "offset" : "integer"
|
||||
})
|
||||
export function search(arg) {
|
||||
arg = convertArgToJson(arg);
|
||||
var req = {
|
||||
"searchMode" : []
|
||||
};
|
||||
for (var i = 0; i < arg.params.length; i ++){
|
||||
var mode = "MAY";
|
||||
if (arg.params[i].mode != null){
|
||||
mode = arg.params[i].mode;
|
||||
}
|
||||
req.searchMode.push({
|
||||
"key" : arg.params[i].type, "value" : arg.params[i].keyword, "type" : mode
|
||||
});
|
||||
}
|
||||
req.offset = arg.offset;
|
||||
req.count = arg.count;
|
||||
var res = executeContract("Registry", "searchDo", JSON.stringify(req));
|
||||
// arg = convertArgToJson(arg);
|
||||
// var req = {
|
||||
// "searchMode" : []
|
||||
// };
|
||||
// for (var i = 0; i < arg.params.length; i ++){
|
||||
// var mode = "MAY";
|
||||
// if (arg.params[i].mode != null){
|
||||
// mode = arg.params[i].mode;
|
||||
// }
|
||||
// req.searchMode.push({
|
||||
// "key" : arg.params[i].type, "value" : arg.params[i].keyword, "type" : mode
|
||||
// });
|
||||
// }
|
||||
// req.offset = arg.offset;
|
||||
// req.count = arg.count;
|
||||
var res = executeContract("Registry", "searchDo", JSON.stringify(arg));
|
||||
return res.result;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user