Commit d4149129 by 裴大威

Merge branch 'zyj-1002302' into 'master'

群发给所有好友

See merge request rays/pcloud-book!366
parents 40642092 395bc8f6
......@@ -608,4 +608,15 @@ public class WechatGroupConsr {
}
return ids;
}
@ParamLog("获取小号所有好友")
public List<String> getFriendByRobotId(String altId) {
List<String> ids = new ArrayList<>();
try {
ids = ResponseHandleUtil.parseList(selfRobotService.getFriendByRobotId(altId), String.class);
}catch (Exception e){
log.error("[selfRobotService.getFriendByRobotId]调用失败" + e.getMessage(), e);
}
return ids;
}
}
......@@ -159,6 +159,17 @@ public class SelfPushBizImpl implements SelfPushBiz {
SelfPush selfPush = selfPushDao.getById(pushId);
if (!StringUtil.isEmpty(selfPush.getAltId())){//平台端群发
String altId = selfPush.getAltId();
Boolean sendAllFriend = false;
if ("pro".equalsIgnoreCase(envStr) && altId.equals("wxid_x8i897ryabo722")){//小睿给所有好友发 1002302
sendAllFriend = true;
} else if ("uat".equalsIgnoreCase(envStr) && altId.equals("wxid_p7gywuxkk89112")) {
sendAllFriend = true;
} else if ("test".equalsIgnoreCase(envStr) && altId.equals("wxid_zus32xb5ukjn22")){
sendAllFriend = true;
}
if (sendAllFriend){
userIdList = wechatGroupConsr.getFriendByRobotId(altId);
}
List<String> sendUserIds = new ArrayList<>();
sendUserIds.addAll(userIdList);
ThreadPoolUtils.SEND_MESSAGE_THREAD_POOL.execute(() -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment