|
|
@@ -1,5 +1,6 @@
|
|
|
package com.github.microservice.models.devicePermiss;
|
|
|
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.github.microservice.models.hxz.base.IotBaseResult;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
@@ -30,4 +31,11 @@ public class GateWayPermissModel extends IotBaseResult {
|
|
|
public void addDevice(DeviceAboutPermiss device) {
|
|
|
this.devices.add(device);
|
|
|
}
|
|
|
+
|
|
|
+ public JSONObject toJson() {
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.set("gateWayId", gateWayId);
|
|
|
+ json.set("devices", devices);
|
|
|
+ return json;
|
|
|
+ }
|
|
|
}
|