小程序扫码门禁端显示详情
This commit is contained in:
@@ -61,6 +61,13 @@ public class AccessLogController {
|
||||
return Res.error("参数错误");
|
||||
}
|
||||
|
||||
// 推送到门禁端
|
||||
JSONObject websocketData = new JSONObject();
|
||||
websocketData.put("gateId", gateId);
|
||||
websocketData.put("action", "onopen");
|
||||
String websocketJSON = websocketData.toString();
|
||||
WebSocketServer.sendAllMessage(websocketJSON);
|
||||
|
||||
AccessLog accessLog = new AccessLog();
|
||||
accessLog.setId(null);
|
||||
accessLog.setType(type);
|
||||
|
@@ -58,6 +58,14 @@ public class GateController {
|
||||
Long gateId = Long.valueOf(id);
|
||||
Gate gate = gateService.getGateById(gateId);
|
||||
GateVO gateVO = GateVO.convertFrom(gate);
|
||||
|
||||
// 推送到门禁端
|
||||
JSONObject websocketData = new JSONObject();
|
||||
websocketData.put("gateId", id);
|
||||
websocketData.put("action", "onscan");
|
||||
String websocketJSON = websocketData.toString();
|
||||
WebSocketServer.sendAllMessage(websocketJSON);
|
||||
|
||||
return Res.success(gateVO);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user