1313
1414import java .io .Serializable ;
1515import java .util .List ;
16- import java .util .Set ;
1716
1817/**
1918 * The type Wx cp agent work bench.
@@ -38,7 +37,7 @@ public class WxCpAgentWorkBench implements Serializable {
3837 /**
3938 * 用户的userIds
4039 */
41- private Set <String > userIds ;
40+ private List <String > useridList ;
4241 /**
4342 * 应用id
4443 */
@@ -64,6 +63,15 @@ public class WxCpAgentWorkBench implements Serializable {
6463 * 参考示例:<a href="wxwork://openurl?url=https%3A%2F%2Fwork.weixin.qq.com%2F">今日要闻</a>
6564 */
6665 private Boolean enableWebviewClick ;
66+ /**
67+ * 高度。可以有两种选择:single_row与double_row。当为single_row时,高度为106px(如果隐藏标题则为147px)。
68+ * 当为double_row时,高度固定为171px(如果隐藏标题则为212px)。默认值为double_row
69+ */
70+ private String height ;
71+ /**
72+ * 是否要隐藏展示了应用名称的标题部分,默认值为false。
73+ */
74+ private Boolean hideTitle ;
6775
6876 private List <WorkBenchKeyData > keyDataList ;
6977
@@ -107,7 +115,7 @@ public String toUserDataString() {
107115 public String toBatchUserDataString () {
108116 JsonObject userDataObject = new JsonObject ();
109117 userDataObject .addProperty ("agentid" , this .agentId );
110- JsonArray useridList = WxGsonBuilder .create ().toJsonTree (this .userIds ).getAsJsonArray ();
118+ JsonArray useridList = WxGsonBuilder .create ().toJsonTree (this .useridList ).getAsJsonArray ();
111119 userDataObject .add ("userid_list" , useridList );
112120 this .handleBatch (userDataObject );
113121 return userDataObject .toString ();
@@ -160,9 +168,9 @@ private void handle(JsonObject templateObject) {
160168 webview .addProperty ("url" , this .url );
161169 webview .addProperty ("jump_url" , this .jumpUrl );
162170 webview .addProperty ("pagepath" , this .pagePath );
163- if ( null != this .enableWebviewClick ) {
164- webview .addProperty ("enable_webview_click " , this .enableWebviewClick );
165- }
171+ webview . addProperty ( "enable_webview_click" , this .enableWebviewClick );
172+ webview .addProperty ("height " , this .height );
173+ webview . addProperty ( "hide_title" , this . hideTitle );
166174 templateObject .add ("webview" , webview );
167175 break ;
168176 }
@@ -228,9 +236,9 @@ private void handleBatch(JsonObject templateObject) {
228236 webview .addProperty ("url" , this .url );
229237 webview .addProperty ("jump_url" , this .jumpUrl );
230238 webview .addProperty ("pagepath" , this .pagePath );
231- if ( null != this .enableWebviewClick ) {
232- webview .addProperty ("enable_webview_click " , this .enableWebviewClick );
233- }
239+ webview . addProperty ( "enable_webview_click" , this .enableWebviewClick );
240+ webview .addProperty ("height " , this .height );
241+ webview . addProperty ( "hide_title" , this . hideTitle );
234242 JsonObject dataObject = new JsonObject ();
235243 dataObject .addProperty ("type" , WxCpConsts .WorkBenchType .WEBVIEW );
236244 dataObject .add ("webview" , webview );
0 commit comments