GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — :art: #2178 【企业微信】更新获取客户群列表的接口 · binarywang/WxJava@65921f5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • weixin-java-cp/src
    • main/java/me/chanjar/weixin/cp
      • api
        • WxCpExternalContactService.java
        • impl
          • WxCpExternalContactServiceImpl.java
      • bean/external
        • WxCpUserExternalGroupChatList.java
    • test/java/me/chanjar/weixin/cp/api/impl
      • WxCpExternalContactServiceImplTest.java
  • weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment
    • WxPayApplyment4SubCreateRequest.java
    • enums
      • MicroBizTypeEnum.java
      • SubjectTypeEnum.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpExternalContactService.java‎

Copy file name to clipboardExpand all lines: weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpExternalContactService.java
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ WxCpExternalContactBatchInfo getContactDetailBatch(String userId, String cursor,
321321
* 微信文档:https://work.weixin.qq.com/api/doc/90000/90135/92119
322322
* </pre>
323323
*
324+
* @deprecated 请使用 {@link WxCpExternalContactService#listGroupChat(Integer, String, int, String[])}
324325
* @param pageIndex the page index
325326
* @param pageSize the page size
326327
* @param status the status
@@ -329,8 +330,26 @@ WxCpExternalContactBatchInfo getContactDetailBatch(String userId, String cursor,
329330
* @return the wx cp user external group chat list
330331
* @throws WxErrorException the wx error exception
331332
*/
333+
@Deprecated
332334
WxCpUserExternalGroupChatList listGroupChat(Integer pageIndex, Integer pageSize, int status, String[] userIds, String[] partyIds) throws WxErrorException;
333335

336+
/**
337+
* <pre>
338+
* 该接口用于获取配置过客户群管理的客户群列表。
339+
* 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。
340+
* 暂不支持第三方调用。
341+
* 微信文档:https://work.weixin.qq.com/api/doc/90000/90135/92119
342+
* </pre>
343+
*
344+
* @param limit 分页,预期请求的数据量,取值范围 1 ~ 1000
345+
* @param cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用不填
346+
* @param status 客户群跟进状态过滤。0 - 所有列表(即不过滤) 1 - 离职待继承 2 - 离职继承中 3 - 离职继承完成 默认为0
347+
* @param userIds 群主过滤。如果不填,表示获取应用可见范围内全部群主的数据(但是不建议这么用,如果可见范围人数超过1000人,为了防止数据包过大,会报错 81017);用户ID列表。最多100个
348+
* @return the wx cp user external group chat list
349+
* @throws WxErrorException the wx error exception
350+
*/
351+
WxCpUserExternalGroupChatList listGroupChat(Integer limit, String cursor, int status, String[] userIds) throws WxErrorException;
352+
334353
/**
335354
* <pre>
336355
* 通过客户群ID,获取详情。包括群名、群成员列表、群成员入群时间、入群方式。(客户群是由具有客户群使用权限的成员创建的外部群)
Collapse file

‎weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImpl.java‎

Copy file name to clipboardExpand all lines: weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImpl.java
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,24 @@ public WxCpUserExternalGroupChatList listGroupChat(Integer pageIndex, Integer pa
248248
return WxCpUserExternalGroupChatList.fromJson(result);
249249
}
250250

251+
@Override
252+
public WxCpUserExternalGroupChatList listGroupChat(Integer limit, String cursor, int status, String[] userIds) throws WxErrorException {
253+
JsonObject json = new JsonObject();
254+
json.addProperty("cursor", cursor == null ? "" : cursor);
255+
json.addProperty("limit", limit == null ? 100 : limit);
256+
json.addProperty("status_filter", status);
257+
if (ArrayUtils.isNotEmpty(userIds)) {
258+
JsonObject ownerFilter = new JsonObject();
259+
if (ArrayUtils.isNotEmpty(userIds)) {
260+
ownerFilter.add("userid_list", new Gson().toJsonTree(userIds).getAsJsonArray());
261+
}
262+
json.add("owner_filter", ownerFilter);
263+
}
264+
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GROUP_CHAT_LIST);
265+
final String result = this.mainService.post(url, json.toString());
266+
return WxCpUserExternalGroupChatList.fromJson(result);
267+
}
268+
251269
@Override
252270
public WxCpUserExternalGroupChatInfo getGroupChat(String chatId) throws WxErrorException {
253271
JsonObject json = new JsonObject();
Collapse file

‎weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatList.java‎

Copy file name to clipboardExpand all lines: weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/external/WxCpUserExternalGroupChatList.java
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
@Getter
1717
@Setter
1818
public class WxCpUserExternalGroupChatList extends WxCpBaseResp {
19+
private static final long serialVersionUID = 1907272035492110236L;
1920

2021
@SerializedName("group_chat_list")
2122
private List<ChatStatus> groupChatList;
2223

24+
@SerializedName("next_cursor")
25+
private String nextCursor;
26+
2327
@Getter
2428
@Setter
2529
public static class ChatStatus implements Serializable {
Collapse file

‎weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImplTest.java‎

Copy file name to clipboardExpand all lines: weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpExternalContactServiceImplTest.java
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@ public void testListGroupChat() throws WxErrorException {
241241
assertNotNull(result);
242242
}
243243

244+
@Test
245+
public void testListGroupChatV3() throws WxErrorException {
246+
WxCpUserExternalGroupChatList result = this.wxCpService.getExternalContactService().listGroupChat(100, "" ,0,new String[1]);
247+
System.out.println(result);
248+
assertNotNull(result);
249+
}
250+
244251
@Test
245252
public void testGetGroupChat() {
246253
}
Collapse file

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/WxPayApplyment4SubCreateRequest.java‎

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/WxPayApplyment4SubCreateRequest.java
+174Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ public static class SubjectInfo implements Serializable {
177177
@SpecEncrypt
178178
private UboInfo uboInfo;
179179

180+
/**
181+
* 小微辅助证明材料(subjectType为小微商户时必填)
182+
*/
183+
@SerializedName("micro_biz_info")
184+
private MicroBizInfo microBizInfo;
180185

181186
@Data
182187
@Builder
@@ -468,6 +473,175 @@ public static class UboInfo implements Serializable {
468473
private String idPeriodEnd;
469474
}
470475

476+
@Data
477+
@Builder
478+
@NoArgsConstructor
479+
@AllArgsConstructor
480+
@Accessors(chain = true)
481+
public static class MicroBizInfo implements Serializable{
482+
private static final long serialVersionUID = -5679477993681265764L;
483+
/**
484+
* 小微经营类型
485+
*/
486+
@SerializedName("micro_biz_type")
487+
private MicroBizTypeEnum microBizType;
488+
489+
/**
490+
* 门店场所---经营类型为“门店场所”时填写
491+
*/
492+
@SerializedName("micro_store_info")
493+
private MicroStoreInfo microStoreInfo;
494+
495+
/**
496+
* 经营类型为“流动经营/便民服务”时填写
497+
*/
498+
@SerializedName("micro_mobile_info")
499+
private MicroMobileInfo microMobileInfo;
500+
501+
/**
502+
* 经营类型为“线上商品/服务交易”时填写
503+
*/
504+
@SerializedName("micro_online_info")
505+
private MicroOnlineInfo microOnlineInfo;
506+
507+
/**
508+
* 门店场所
509+
*/
510+
@Data
511+
@Builder
512+
@NoArgsConstructor
513+
@AllArgsConstructor
514+
@Accessors(chain = true)
515+
public static class MicroStoreInfo implements Serializable{
516+
private static final long serialVersionUID = 5277440587305558389L;
517+
/**
518+
* 门店名称
519+
*/
520+
@SerializedName("micro_name")
521+
private String microName;
522+
/**
523+
* 门店省市编码 填写门店省市编码,只能由数字组成,详细参见《微信支付提供的省市对照表》
524+
* @see <a href='https://pay.weixin.qq.com/wiki/doc/apiv3/download/%E7%9C%81%E5%B8%82%E5%8C%BA%E7%BC%96%E5%8F%B7%E5%AF%B9%E7%85%A7%E8%A1%A8.xlsx'>下载微信支付提供的省市对照表</a>
525+
*/
526+
@SerializedName("micro_address_code")
527+
private String microAddressCode;
528+
/**
529+
* 门店地址(填写店铺详细地址,具体区/县及街道门牌号或大厦楼层)
530+
*/
531+
@SerializedName("micro_address")
532+
private String microAddress;
533+
/**
534+
* 门店门头照片
535+
* <per>
536+
* 1、提交门店门口照片,要求招牌清晰可见
537+
* 2、可上传1张图片,请填写通过《图片上传API》预先上传图片生成好的MediaID
538+
* </per>
539+
*
540+
* @see <a href='https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/chapter3_1.shtml'>图片上传API</a>
541+
*/
542+
@SerializedName("store_entrance_pic")
543+
private String storeEntrancePic;
544+
/**
545+
* 店内环境照片
546+
* <per>
547+
* 1、提交店内环境照片
548+
* 2、可上传1张图片,请填写通过《图片上传API》预先上传图片生成好的MediaID
549+
* </per>
550+
*
551+
* @see <a href='https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/chapter3_1.shtml'>图片上传API</a>
552+
*/
553+
@SerializedName("micro_indoor_copy")
554+
private String microIndoorCopy;
555+
/**
556+
* 门店经度
557+
*/
558+
@SerializedName("store_longitude")
559+
private String storeLongitude;
560+
/**
561+
* 门店纬度
562+
*/
563+
@SerializedName("store_latitude")
564+
private String storeLatitude;
565+
}
566+
567+
/**
568+
* 流动经营/便民服务
569+
*/
570+
@Data
571+
@Builder
572+
@NoArgsConstructor
573+
@AllArgsConstructor
574+
@Accessors(chain = true)
575+
public static class MicroMobileInfo implements Serializable{
576+
private static final long serialVersionUID = -1308090894511066935L;
577+
/**
578+
* 经营/服务名称
579+
*/
580+
@SerializedName("micro_mobile_name")
581+
private String microMobileName;
582+
/**
583+
* 经营/服务所在地省市
584+
*/
585+
@SerializedName("micro_mobile_city")
586+
private String microMobileCity;
587+
/**
588+
* 经营/服务所在地(不含省市) 填写“无"
589+
*/
590+
@SerializedName("micro_mobile_address")
591+
private String microMobileAddress;
592+
/**
593+
* 经营/服务现场照片
594+
* <per>
595+
* 1、提交经营/服务现场照片
596+
* 2、可上传多张图片,请填写通过《图片上传API》预先上传图片生成好的MediaID
597+
* </per>
598+
* @see <a href='https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/chapter3_1.shtml'>图片上传API</a>
599+
*/
600+
@SerializedName("micro_mobile_pics")
601+
private String micro_mobile_pics;
602+
}
603+
604+
/**
605+
* 线上商品/服务交易
606+
*/
607+
@Data
608+
@Builder
609+
@NoArgsConstructor
610+
@AllArgsConstructor
611+
@Accessors(chain = true)
612+
public static class MicroOnlineInfo implements Serializable{
613+
private static final long serialVersionUID = 9029168841403055743L;
614+
/**
615+
* 线上店铺名称
616+
*/
617+
@SerializedName("micro_online_store")
618+
private String microOnlineStore;
619+
/**
620+
* 电商平台名称
621+
*/
622+
@SerializedName("micro_ec_name")
623+
private String microEcName;
624+
/**
625+
* 店铺二维码
626+
* <per>
627+
* 1、店铺二维码或店铺链接二选一必填
628+
* 2、可上传多张图片,请填写通过《图片上传API》预先上传图片生成好的MediaID
629+
* </per>
630+
* @see <a href='https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/tool/chapter3_1.shtml'>图片上传API</a>
631+
*/
632+
@SerializedName("micro_qrcode")
633+
private String microQrcode;
634+
/**
635+
* 店铺二维码
636+
* <per>
637+
* 1、店铺二维码或店铺链接二选一必填
638+
* 2、请填写店铺主页链接,需符合网站规范
639+
* </per>
640+
*/
641+
@SerializedName("micro_link")
642+
private String microLink;
643+
}
644+
}
471645
}
472646

473647
/**
Collapse file

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/MicroBizTypeEnum.java‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.github.binarywang.wxpay.bean.applyment.enums;
2+
3+
/**
4+
* 小微经营类型
5+
*/
6+
public enum MicroBizTypeEnum {
7+
/**
8+
* 门店场所
9+
*/
10+
MICRO_TYPE_STORE,
11+
/**
12+
* 流动经营/便民服务
13+
*/
14+
MICRO_TYPE_MOBILE,
15+
/**
16+
* 线上商品/服务交易
17+
*/
18+
MICRO_TYPE_ONLINE,
19+
;
20+
}
Collapse file

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SubjectTypeEnum.java‎

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SubjectTypeEnum.java
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public enum SubjectTypeEnum {
2525
* (其他组织):不属于企业、政府/事业单位的组织机构(如社会团体、民办非企业、基金会),要求机构已办理组织机构代码证。
2626
*/
2727
SUBJECT_TYPE_OTHERS,
28+
/**
29+
* (小微):无营业执照、免办理工商注册登记的实体商户
30+
*/
31+
SUBJECT_TYPE_MICRO,
2832
;
2933

3034
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.