|
|
@ -46,6 +46,9 @@ public class DeviceState { |
|
|
|
@Schema(description = "当前登录用户") |
|
|
|
private volatile User currentUser; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获得当前设备的json快照,增加synchronized保证强一致 |
|
|
|
*/ |
|
|
|
public synchronized JSONObject toJSON() { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.putOnce("channelState", new ArrayList<>(channelStateMap.values())); |
|
|
|