feat(0): [java]-[mvn]-消息开启开关支持ALL

This commit is contained in:
chandler 2024-12-25 20:33:38 +08:00
parent 4fb396bd37
commit 72bf29eb9f
2 changed files with 5 additions and 3 deletions

View File

@ -343,6 +343,8 @@ public class WeChatDllServiceImpl implements WeChatDllService {
if ("21".equals(request.getXmlType())) { if ("21".equals(request.getXmlType())) {
// 小程序 // 小程序
xmlType = 0x21; xmlType = 0x21;
} else {
xmlType = Integer.parseInt(request.getXmlType());
} }
Wcf.XmlMsg xmlMsg = Wcf.XmlMsg.newBuilder().setContent(request.getXmlContent()).setReceiver(request.getRecipient()) Wcf.XmlMsg xmlMsg = Wcf.XmlMsg.newBuilder().setContent(request.getXmlContent()).setReceiver(request.getRecipient())
.setPath(request.getResourcePath()).setType(xmlType).build(); .setPath(request.getResourcePath()).setType(xmlType).build();
@ -376,7 +378,6 @@ public class WeChatDllServiceImpl implements WeChatDllService {
return null; return null;
} }
@Deprecated
@Override @Override
public WxPpWcfSendEmojiMsgResp sendEmojiMsg(WxPpWcfSendEmojiMsgReq request) { public WxPpWcfSendEmojiMsgResp sendEmojiMsg(WxPpWcfSendEmojiMsgReq request) {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
@ -584,7 +585,8 @@ public class WeChatDllServiceImpl implements WeChatDllService {
public String queryFriendCircle() { public String queryFriendCircle() {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
log.info("[查询]-[刷新朋友圈]-开始"); log.info("[查询]-[刷新朋友圈]-开始");
Wcf.Request req = Wcf.Request.newBuilder().setFuncValue(Wcf.Functions.FUNC_REFRESH_PYQ_VALUE).build(); // id 开始 id0 为最新页 (string based uint64)
Wcf.Request req = Wcf.Request.newBuilder().setFuncValue(Wcf.Functions.FUNC_REFRESH_PYQ_VALUE).setUi64(0).build();
Wcf.Response rsp = wechatSocketClient.sendCmd(req); Wcf.Response rsp = wechatSocketClient.sendCmd(req);
int state = judgeWcfCmdState(rsp); int state = judgeWcfCmdState(rsp);
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();

View File

@ -41,7 +41,7 @@ public class WeChatMsgServiceImpl implements WeChatMsgService {
// 有开启的群聊配置 // 有开启的群聊配置
if (!CollectionUtils.isEmpty(weChatFerryProperties.getOpenMsgGroups())) { if (!CollectionUtils.isEmpty(weChatFerryProperties.getOpenMsgGroups())) {
// 指定处理的群聊 // 指定处理的群聊
if (weChatFerryProperties.getOpenMsgGroups().contains(dto.getRoomId())) { if (weChatFerryProperties.getOpenMsgGroups().contains(dto.getRoomId()) || weChatFerryProperties.getOpenMsgGroups().contains("ALL")) {
// TODO 模式有多种 1-根据消息类型单独调用某一个 2-全部调用各业务类中自己决定是否继续 // TODO 模式有多种 1-根据消息类型单独调用某一个 2-全部调用各业务类中自己决定是否继续
if (true) { if (true) {
// 因为一种消息允许进行多种处理这里采用执行所有策略请自行在各策略中判断是否需要执行 // 因为一种消息允许进行多种处理这里采用执行所有策略请自行在各策略中判断是否需要执行