|
@@ -107,7 +107,7 @@ public class DebuggerController extends TextWebSocketHandler {
|
|
|
}
|
|
|
|
|
|
public void listDevices(Session session) {
|
|
|
- Map<String, Session> sessions = WebsocketDebuggerUtil.getSessions();
|
|
|
+ Map<String, Session> sessions = WebsocketSellerUtil.getSession();
|
|
|
List<JSONObject> devices = new ArrayList<>();
|
|
|
for (String s : sessions.keySet()) {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
@@ -130,7 +130,7 @@ public class DebuggerController extends TextWebSocketHandler {
|
|
|
JSONObject jsonObject = (JSONObject) data;
|
|
|
String seq = jsonObject.getString("seq");
|
|
|
Boolean debug = jsonObject.getBoolean("debug");
|
|
|
- Map<String, Session> sessions = WebsocketDebuggerUtil.getSessions();
|
|
|
+ Map<String, Session> sessions = WebsocketSellerUtil.getSession();
|
|
|
boolean key = sessions.containsKey(seq);
|
|
|
if (key) {
|
|
|
WsEvent wsEvent = new WsEvent("setDebug", debug);
|
|
@@ -145,7 +145,7 @@ public class DebuggerController extends TextWebSocketHandler {
|
|
|
JSONObject jsonObject = (JSONObject) data;
|
|
|
String seq = jsonObject.getString("seq");
|
|
|
String kind = jsonObject.getString("kind");
|
|
|
- Map<String, Session> sessions = WebsocketDebuggerUtil.getSessions();
|
|
|
+ Map<String, Session> sessions = WebsocketSellerUtil.getSession();
|
|
|
boolean key = sessions.containsKey(seq);
|
|
|
if (key) {
|
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
@@ -174,7 +174,7 @@ public class DebuggerController extends TextWebSocketHandler {
|
|
|
jsonObject1.put("user_id", id);
|
|
|
WsEvent wsEvent = new WsEvent("openGate", jsonObject1);
|
|
|
WebsocketDebuggerUtil.sendMessage(sessions.get("seq"), wsEvent);
|
|
|
- WsEvent wsEvent1 = new WsEvent("authCode", new Result(10000, formattedNumber, true));
|
|
|
+ WsEvent wsEvent1 = new WsEvent("authCode",Result.success(formattedNumber) );
|
|
|
WebsocketDebuggerUtil.sendMessage(session, wsEvent1);
|
|
|
} else {
|
|
|
WsEvent wsEvent =EventWsErrUtil.getWsErr("device offline");
|