@@ -102,8 +102,12 @@ public WxCpExternalContactInfo getExternalContact(String userId) throws WxErrorE
102
102
}
103
103
104
104
@ Override
105
- public WxCpExternalContactInfo getContactDetail (String userId ) throws WxErrorException {
106
- final String url = this .mainService .getWxCpConfigStorage ().getApiUrl (GET_CONTACT_DETAIL + userId );
105
+ public WxCpExternalContactInfo getContactDetail (String userId , String cursor ) throws WxErrorException {
106
+ String params = userId ;
107
+ if (StringUtils .isNotEmpty (cursor )){
108
+ params = params + "&cursor=" + cursor ;
109
+ }
110
+ final String url = this .mainService .getWxCpConfigStorage ().getApiUrl (GET_CONTACT_DETAIL + params );
107
111
String responseContent = this .mainService .get (url , null );
108
112
return WxCpExternalContactInfo .fromJson (responseContent );
109
113
}
@@ -702,4 +706,45 @@ public WxCpBaseResp delGroupWelcomeTemplate(@NotNull String templateId, String a
702
706
final String result = this .mainService .post (url , json .toString ());
703
707
return WxCpBaseResp .fromJson (result );
704
708
}
709
+
710
+ /**
711
+ * <pre>
712
+ * 获取商品图册
713
+ * https://work.weixin.qq.com/api/doc/90000/90135/95096#获取商品图册列表
714
+ * </pre>
715
+ *
716
+ * @param limit 返回的最大记录数,整型,最大值100,默认值50,超过最大值时取默认值
717
+ * @param cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
718
+ * @return wx cp base resp
719
+ * @throws WxErrorException the wx error exception
720
+ */
721
+ @ Override
722
+ public WxCpProductAlbumListResult getProductAlbumList (Integer limit , String cursor ) throws WxErrorException {
723
+ JsonObject json = new JsonObject ();
724
+ json .addProperty ("limit" , limit );
725
+ json .addProperty ("cursor" , cursor );
726
+ final String url = this .mainService .getWxCpConfigStorage ().getApiUrl (GET_PRODUCT_ALBUM_LIST );
727
+ final String result = this .mainService .post (url , json .toString ());
728
+ return WxCpProductAlbumListResult .fromJson (result );
729
+ }
730
+
731
+ /**
732
+ * <pre>
733
+ * 获取商品图册
734
+ * https://work.weixin.qq.com/api/doc/90000/90135/95096#获取商品图册
735
+ * </pre>
736
+ *
737
+ * @param productId 商品id
738
+ * @return wx cp base resp
739
+ * @throws WxErrorException the wx error exception
740
+ */
741
+ @ Override
742
+ public WxCpProductAlbumResult getProductAlbum (String productId ) throws WxErrorException {
743
+ JsonObject json = new JsonObject ();
744
+ json .addProperty ("product_id" , productId );
745
+ final String url = this .mainService .getWxCpConfigStorage ().getApiUrl (GET_PRODUCT_ALBUM );
746
+ final String result = this .mainService .post (url , json .toString ());
747
+ return WxCpProductAlbumResult .fromJson (result );
748
+ }
749
+
705
750
}
0 commit comments