feat(0): [java]-[wechat-ferry-mvn]-查询联系人接口修改

This commit is contained in:
chandler 2024-10-08 00:40:56 +08:00
parent 220e002f28
commit 37bc755646
2 changed files with 16 additions and 6 deletions

View File

@ -34,10 +34,10 @@ public class WxPpWcfContactsResp {
private String weChatNickname;
/**
* 好友备注
* 联系人备注
*/
@ApiModelProperty(value = "好友备注")
private String friendRemark;
@ApiModelProperty(value = "联系人备注")
private String weChatRemark;
/**
* 国家

View File

@ -118,7 +118,7 @@ public class WeChatDllServiceImpl implements WeChatDllService {
WxPpWcfContactsResp vo = new WxPpWcfContactsResp();
vo.setWeChatUid(rpcContact.getWxid());
vo.setWeChatNo(rpcContact.getCode());
vo.setFriendRemark(rpcContact.getRemark());
vo.setWeChatRemark(rpcContact.getRemark());
vo.setWeChatNickname(rpcContact.getName());
if (!ObjectUtils.isEmpty(rpcContact.getCountry())) {
vo.setCountryPinyin(rpcContact.getCountry());
@ -152,6 +152,8 @@ public class WeChatDllServiceImpl implements WeChatDllService {
mixedNoList.add("filehelper");
// 新闻
mixedNoList.add("newsapp");
// 公众平台安全助手
mixedNoList.add("mphelper");
// 微信公众平台 weixingongzhong
mixedNoList.add("weixinguanhaozhushou");
// 微信团队
@ -174,12 +176,13 @@ public class WeChatDllServiceImpl implements WeChatDllService {
mixedNoList.add("gh_f08f54ae25a4");
// 微信搜一搜 wechat_search
mixedNoList.add("gh_f08f54ae25a4");
if (rpcContact.getWxid().endsWith(WxContactsTypeEnum.WORK.getAffix())) {
// 企微
vo.setType(WxContactsTypeEnum.WORK.getCode());
vo.setTypeLabel(WxContactsTypeEnum.WORK.getName());
} else if (rpcContact.getWxid().endsWith(WxContactsTypeEnum.GROUP.getAffix())) {
// 群聊
} else if (rpcContact.getWxid().endsWith(WxContactsTypeEnum.GROUP.getAffix()) || rpcContact.getWxid().endsWith("@im.chatroom")) {
// 群聊 @im.chatroom 这种是很早之前的格式单独例举
vo.setType(WxContactsTypeEnum.GROUP.getCode());
vo.setTypeLabel(WxContactsTypeEnum.GROUP.getName());
} else if (mixedNoList.contains(rpcContact.getWxid())) {
@ -190,6 +193,13 @@ public class WeChatDllServiceImpl implements WeChatDllService {
// 微信公众号
vo.setType(WxContactsTypeEnum.OFFICIAL_ACCOUNT.getCode());
vo.setTypeLabel(WxContactsTypeEnum.OFFICIAL_ACCOUNT.getName());
} else if ("wxid_2876568766325".equals(rpcContact.getWxid()) || "wxid_2965349653612".equals(rpcContact.getWxid())
|| "wxid_4302923029011".equals(rpcContact.getWxid())) {
// 应用宝 yingyongbao wxid_2876568766325
// i黑马 iheima wxid_2965349653612
// 丁香医生 DingXiangYiSheng wxid_4302923029011
vo.setType(WxContactsTypeEnum.OFFICIAL_ACCOUNT.getCode());
vo.setTypeLabel(WxContactsTypeEnum.OFFICIAL_ACCOUNT.getName());
} else {
// 个微
vo.setType(WxContactsTypeEnum.PERSON.getCode());