-
-
Notifications
You must be signed in to change notification settings - Fork 9k
【企业微信】新增管理表格内容相关接口。包括:编辑表格内容、获取表格行列信息、获取表格数据 #3837
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
199 changes: 199 additions & 0 deletions
199
...ava-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/doc/WxCpDocSheetBatchUpdateRequest.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,199 @@ | ||
| package me.chanjar.weixin.cp.bean.oa.doc; | ||
|
|
||
| import java.io.Serializable; | ||
| import java.util.List; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.Setter; | ||
| import lombok.experimental.Accessors; | ||
| import me.chanjar.weixin.cp.bean.oa.doc.WxCpDocSheetData.GridData; | ||
| import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
|
||
| /** | ||
| * 编辑表格内容请求 | ||
| * | ||
| * @author zhongying | ||
| * @since 2026-01-07 | ||
| */ | ||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @Accessors(chain = true) | ||
| public class WxCpDocSheetBatchUpdateRequest implements Serializable { | ||
| private static final long serialVersionUID = 584565591133421347L; | ||
|
|
||
| /** | ||
| * 文档的docid.必填 | ||
| */ | ||
| @SerializedName("docid") | ||
| private String docId; | ||
|
|
||
| /** | ||
| * 更新操作列表.必填 | ||
| */ | ||
| @SerializedName("requests") | ||
| private List<Request> requests; | ||
|
|
||
| /** | ||
| * From json wx cp doc sheet batch update request. | ||
| * | ||
| * @param json the json | ||
| * @return the wx cp doc sheet batch update request | ||
| */ | ||
| public static WxCpDocSheetBatchUpdateRequest fromJson(String json) { | ||
| return WxCpGsonBuilder.create().fromJson(json, WxCpDocSheetBatchUpdateRequest.class); | ||
| } | ||
|
|
||
| /** | ||
| * To json string. | ||
| * | ||
| * @return the string | ||
| */ | ||
| public String toJson() { | ||
| return WxCpGsonBuilder.create().toJson(this); | ||
| } | ||
|
|
||
| /** | ||
| * 更新操作 | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| public static class Request implements Serializable { | ||
| private static final long serialVersionUID = 253933038745894628L; | ||
|
|
||
| /** | ||
| * 新增工作表 | ||
| */ | ||
| @SerializedName("add_sheet_request") | ||
| private AddSheetRequest addSheetRequest; | ||
|
|
||
| /** | ||
| * 删除工作表请求 | ||
| */ | ||
| @SerializedName("delete_sheet_request") | ||
| private DeleteSheetRequest deleteSheetRequest; | ||
|
|
||
| /** | ||
| * 更新范围内单元格内容 | ||
| */ | ||
| @SerializedName("update_range_request") | ||
| private UpdateRangeRequest updateRangeRequest; | ||
|
|
||
| /** | ||
| * 删除表格连续的行或列 | ||
| */ | ||
| @SerializedName("delete_dimension_request") | ||
| private DeleteDimensionRequest deleteDimensionRequest; | ||
|
|
||
| /** | ||
| * 新增工作表,新增需满足以下限制 | ||
| * 范围列数 <=200 | ||
| * 范围内的总单元格数量 <=10000 | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| public static class AddSheetRequest implements Serializable { | ||
| private static final long serialVersionUID = 523704967699486288L; | ||
|
|
||
| /** | ||
| * 工作表名称 | ||
| */ | ||
| @SerializedName("title") | ||
| private String title; | ||
|
|
||
| /** | ||
| * 新增工作表的初始行数 | ||
| */ | ||
| @SerializedName("row_count") | ||
| private int rowCount; | ||
|
|
||
| /** | ||
| * 新增工作表的初始列数 | ||
| */ | ||
| @SerializedName("column_count") | ||
| private int columnCount; | ||
| } | ||
|
|
||
| /** | ||
| * 删除工作表请求 | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| public static class DeleteSheetRequest implements Serializable { | ||
| private static final long serialVersionUID = 767974765396168274L; | ||
|
|
||
| /** | ||
| * 工作表唯一标识 | ||
| */ | ||
| @SerializedName("sheet_id") | ||
| private String sheetId; | ||
| } | ||
|
|
||
| /** | ||
| * 更新范围内单元格内容 | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| public static class UpdateRangeRequest implements Serializable { | ||
| private static final long serialVersionUID = 433859595039061888L; | ||
|
|
||
| /** | ||
| * 工作表唯一标识 | ||
| */ | ||
| @SerializedName("sheet_id") | ||
| private String sheetId; | ||
|
|
||
| /** | ||
| * 表格数据 | ||
| */ | ||
| @SerializedName("grid_data") | ||
| private GridData gridData; | ||
| } | ||
|
|
||
| /** | ||
| * 删除表格连续的行或列 | ||
| * 注意: | ||
| * 1.该操作会导致表格缩表 | ||
| * 2.删除的范围遵循 左闭右开 ———— [start_index,end_index) ,如果 end_index <= start_index | ||
| * 则该请求报错。 | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| public static class DeleteDimensionRequest implements Serializable { | ||
| private static final long serialVersionUID = 107245521502978033L; | ||
|
|
||
| /** | ||
| * 工作表唯一标识 | ||
| */ | ||
| @SerializedName("sheet_id") | ||
| private String sheetId; | ||
|
|
||
| /** | ||
| * 删除的维度类型. | ||
| * ROW:行 | ||
| * COLUMN:列 | ||
| */ | ||
| @SerializedName("dimension") | ||
| private String dimension; | ||
|
|
||
| /** | ||
| * 删除行列的起始序号(从1开始) | ||
| */ | ||
| @SerializedName("start_index") | ||
| private int startIndex; | ||
|
|
||
| /** | ||
| * 删除行列的终止序号(从1开始) | ||
| */ | ||
| @SerializedName("end_index") | ||
| private int endIndex; | ||
| } | ||
| } | ||
| } |
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.