-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
微信小程序新增设备组相关接口 #3818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
微信小程序新增设备组相关接口 #3818
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
84e5810
微信小程序新增设备组相关接口
yanglegetuo 0876ee8
Update weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bea…
binarywang a0d8420
Update weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api…
binarywang c4252da
修改设备组移除设备注释,以及测试方法规范
yanglegetuo 55eb3a9
Merge remote-tracking branch 'origin/develop' into develop
yanglegetuo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...niapp/src/main/java/cn/binarywang/wx/miniapp/bean/device/WxMaCreateIotGroupIdRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package cn.binarywang.wx.miniapp.bean.device; | ||
|
|
||
| import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; | ||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.io.Serializable; | ||
|
|
||
| /** | ||
| * @Author: yanglegetuo | ||
| * @Date: 2025/12/22 8:51 | ||
| * @Description: 创建设备组 请求参数 | ||
| */ | ||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class WxMaCreateIotGroupIdRequest implements Serializable { | ||
| private static final long serialVersionUID = 1827809470414413390L; | ||
| /** | ||
| * 设备型号id。通过注册设备获得(必填) | ||
| */ | ||
| @SerializedName("model_id") | ||
| private String modelId; | ||
| /** | ||
| * 设备组的名称(创建时时决定,无法修改) | ||
binarywang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| */ | ||
| @SerializedName("group_name") | ||
| private String groupName; | ||
|
|
||
|
|
||
| public String toJson() { | ||
| return WxMaGsonBuilder.create().toJson(this); | ||
| } | ||
| } | ||
33 changes: 33 additions & 0 deletions
33
...iniapp/src/main/java/cn/binarywang/wx/miniapp/bean/device/WxMaGetIotGroupInfoRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| package cn.binarywang.wx.miniapp.bean.device; | ||
|
|
||
| import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; | ||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.io.Serializable; | ||
|
|
||
| /** | ||
| * @Author: yanglegetuo | ||
| * @Date: 2025/12/22 8:51 | ||
| * @Description: 查询设备组信息 请求参数 | ||
| */ | ||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class WxMaGetIotGroupInfoRequest implements Serializable { | ||
|
|
||
| private static final long serialVersionUID = 4913375114243384968L; | ||
| /** | ||
| * 设备组的唯一标识(必填) | ||
| */ | ||
| @SerializedName("group_id") | ||
| private String groupId; | ||
|
|
||
| public String toJson() { | ||
| return WxMaGsonBuilder.create().toJson(this); | ||
| } | ||
| } |
55 changes: 55 additions & 0 deletions
55
...pp/src/main/java/cn/binarywang/wx/miniapp/bean/device/WxMaIotGroupDeviceInfoResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| package cn.binarywang.wx.miniapp.bean.device; | ||
|
|
||
| import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; | ||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.io.Serializable; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * @Author: yanglegetuo | ||
| * @Date: 2025/12/22 8:51 | ||
| * @Description: 设备组信息 响应参数 | ||
| */ | ||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class WxMaIotGroupDeviceInfoResponse implements Serializable { | ||
|
|
||
| private static final long serialVersionUID = 6615660801230308048L; | ||
| /** | ||
| * 设备组名称 | ||
| */ | ||
| @SerializedName("group_name") | ||
| private String groupName; | ||
| /** | ||
| * 设备列表 | ||
| */ | ||
| @SerializedName("device_list") | ||
| private List<WxMaDeviceTicketRequest> deviceList; | ||
|
|
||
| /** | ||
| * 设备型号id。通过注册设备获得(必填) | ||
| */ | ||
| @SerializedName("model_id") | ||
| private String modelId; | ||
| /** | ||
| * 门禁机 | ||
| */ | ||
| @SerializedName("model_type") | ||
| private String modelType; | ||
| /** | ||
| * 组最大设备数量 | ||
| */ | ||
| @SerializedName("max_device_count") | ||
| private String maxDeviceCount; | ||
binarywang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| public String toJson() { | ||
| return WxMaGsonBuilder.create().toJson(this); | ||
| } | ||
| } | ||
44 changes: 44 additions & 0 deletions
44
...miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/device/WxMaIotGroupDeviceRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| package cn.binarywang.wx.miniapp.bean.device; | ||
|
|
||
| import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; | ||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.io.Serializable; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * @Author: yanglegetuo | ||
| * @Date: 2025/12/22 8:51 | ||
| * @Description: 设备组 添加/移除 设备 请求参数 | ||
| */ | ||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class WxMaIotGroupDeviceRequest implements Serializable { | ||
| private static final long serialVersionUID = -5648997758678588138L; | ||
|
|
||
| /** | ||
| * 设备组的唯一标识(必填) | ||
| */ | ||
| @SerializedName("group_id") | ||
| private String groupId; | ||
| /** | ||
| * 设备列表 | ||
| */ | ||
| @SerializedName("device_list") | ||
| private List<WxMaDeviceTicketRequest> deviceList; | ||
| /** | ||
| * 是否强制更新设备列表,等于 true 时将已存在其它设备组中的设备移除并添加到当前设备组,慎用。 | ||
| */ | ||
| @SerializedName("force_add") | ||
| private Boolean forceAdd; | ||
|
|
||
| public String toJson() { | ||
| return WxMaGsonBuilder.create().toJson(this); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.