mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-01-10 01:44:14 +00:00
prune: delete ResultBack
This commit is contained in:
parent
bb33d5b0e7
commit
66b18fd63a
@ -15,7 +15,6 @@ import org.bdware.sc.util.JsonUtil;
|
||||
import org.bdware.server.GRPCPool;
|
||||
import org.bdware.server.GlobalConf;
|
||||
import org.bdware.server.action.p2p.MasterClientTCPAction;
|
||||
import org.bdware.server.nodecenter.ResultBack;
|
||||
import org.bdware.server.trustedmodel.MasterProxy;
|
||||
import org.bdware.server.ws.ContractManagerFrameHandler;
|
||||
import org.bdware.units.NetworkManager;
|
||||
@ -649,13 +648,8 @@ public class CMActions implements OnHashCallback {
|
||||
String contractName = json.get("contractName").getAsString();
|
||||
String functionName = json.get("functionName").getAsString();
|
||||
String args = json.get("args").getAsString();
|
||||
|
||||
String test = manager.getGasEvaluates(contractName, functionName, args);
|
||||
|
||||
ResultBack result = new ResultBack();
|
||||
result.action = "onEvaluates";
|
||||
result.data = "success";
|
||||
resultCallback.onResult(JsonUtil.toJson(result));
|
||||
ReplyUtil.simpleReply(resultCallback,"onEvaluates","success");
|
||||
}
|
||||
|
||||
@Action(userPermission = 1L << 16)
|
||||
@ -1599,10 +1593,7 @@ public class CMActions implements OnHashCallback {
|
||||
closePermission = closePermission.replace(", ", "");
|
||||
String resetPermission = manager.resetPermission(contractFileName, closePermission, isOpen);
|
||||
LOGGER.debug(resetPermission);
|
||||
ResultBack result = new ResultBack();
|
||||
result.action = "onSetPermission";
|
||||
result.data = "success";
|
||||
resultCallback.onResult(JsonUtil.toJson(result));
|
||||
ReplyUtil.simpleReply(resultCallback,"onSetPermission","success");
|
||||
}
|
||||
|
||||
@Action(userPermission = 1L << 26, async = true, httpAccess = false)
|
||||
@ -1610,10 +1601,7 @@ public class CMActions implements OnHashCallback {
|
||||
boolean flag = json.get("isDebug").getAsBoolean();
|
||||
String contractID = json.get("contractID").getAsString();
|
||||
String resetPermission = manager.resetDebugFlag(contractID, flag);
|
||||
ResultBack result = new ResultBack();
|
||||
result.action = "onSetDebugFlag";
|
||||
result.data = resetPermission;
|
||||
resultCallback.onResult(JsonUtil.toJson(result));
|
||||
ReplyUtil.simpleReply(resultCallback,"onSetDebugFlag",resetPermission);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -10,7 +10,6 @@ import org.bdware.sc.db.CMTables;
|
||||
import org.bdware.sc.db.KeyValueDBUtil;
|
||||
import org.bdware.sc.util.JsonUtil;
|
||||
import org.bdware.server.GlobalConf;
|
||||
import org.bdware.server.nodecenter.ResultBack;
|
||||
import org.bdware.server.permission.Role;
|
||||
import org.bdware.server.ws.ContractManagerFrameHandler;
|
||||
import org.zz.gmhelper.SM2Util;
|
||||
@ -162,14 +161,9 @@ public class UserManagerAction {
|
||||
List<Jedion.KV> time = KeyValueDBUtil.instance.getKeyValues(CMTables.ApplyTime.toString());
|
||||
List<Jedion.KV> kv = KeyValueDBUtil.instance.getKeyValues(CMTables.ApplyRole.toString());
|
||||
Map<String, Object> ret = new HashMap<>();
|
||||
|
||||
ret.put("kv", kv);
|
||||
ret.put("time", time);
|
||||
ResultBack result = new ResultBack();
|
||||
result.action = "onListUnAuthRole";
|
||||
result.data = ret;
|
||||
resultCallback.onResult(JsonUtil.toJson(result));
|
||||
// resultCallback.onResult("{\"action\":\"onListUnAuthRole\",\"data\":\"success\"}");
|
||||
ReplyUtil.simpleReply(resultCallback,"onListUnAuthRole",ret);
|
||||
}
|
||||
|
||||
@Action(userPermission = 1 << 11)
|
||||
@ -177,13 +171,9 @@ public class UserManagerAction {
|
||||
List<Jedion.KV> kv = KeyValueDBUtil.instance.getKeyValues(CMTables.NodeRole.toString());
|
||||
List<Jedion.KV> time = KeyValueDBUtil.instance.getKeyValues(CMTables.NodeTime.toString());
|
||||
Map<String, Object> ret = new HashMap<>();
|
||||
|
||||
ret.put("kv", kv);
|
||||
ret.put("time", time);
|
||||
ResultBack result = new ResultBack();
|
||||
result.action = "onListAllAuthRole";
|
||||
result.data = ret;
|
||||
resultCallback.onResult(JsonUtil.toJson(result));
|
||||
ReplyUtil.simpleReply(resultCallback,"onListAllAuthRole",ret);
|
||||
}
|
||||
|
||||
@Action(userPermission = 1L << 11)
|
||||
@ -220,11 +210,7 @@ public class UserManagerAction {
|
||||
map.put("ContractProvider", cp);
|
||||
map.put("ContractInstanceManager", cm);
|
||||
map.put("ContractUser", cp);
|
||||
ResultBack result = new ResultBack();
|
||||
result.action = "onCountRole";
|
||||
result.data = map;
|
||||
result.status = true;
|
||||
resultCallback.onResult(JsonUtil.toJson(result));
|
||||
ReplyUtil.simpleReply(resultCallback,"onCountRole",map);
|
||||
}
|
||||
|
||||
@Action(userPermission = 1 << 10)
|
||||
|
Loading…
Reference in New Issue
Block a user