Commit 177cc09d by 裴大威

fix 欢迎语收发一体获取群人数

parent a7d86553
...@@ -62,10 +62,13 @@ import java.util.concurrent.ExecutorService; ...@@ -62,10 +62,13 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
/** /**
* @author lily * @author lily
* @date 2019/4/18 15:31 * @date 2019/4/18 15:31
*/ */
@Slf4j
@Component("groupQrcodeBiz") @Component("groupQrcodeBiz")
public class GroupQrcodeBizImpl implements GroupQrcodeBiz { public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
private static final Logger LOGGER = LoggerFactory.getLogger(GroupQrcodeBizImpl.class); private static final Logger LOGGER = LoggerFactory.getLogger(GroupQrcodeBizImpl.class);
...@@ -217,7 +220,12 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -217,7 +220,12 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
@Override @Override
@ParamLog("新增一个用户") @ParamLog("新增一个用户")
public void addOneUser(String weixinGroupId, Integer memberCount, String nickName, String robotId) { public void addOneUser(String weixinGroupId, Integer memberCount, String nickName, String robotId) {
String robotIdByGroupId = wechatGroupConsr.getRobotIdByGroupId(weixinGroupId); // 收发一体
String robotIdByGroupId = robotId;
if(StringUtil.isBlank(robotId)) {
log.info("[新增一个用户] : robotId is null weixinGroupId:{},memberCount:{},nickName:{},robotId:{}", weixinGroupId, memberCount, nickName, robotId);
robotIdByGroupId = wechatGroupConsr.getRobotIdByGroupId(weixinGroupId);
}
if(robotIdByGroupId != null){ if(robotIdByGroupId != null){
Integer peopleCounts = WxGroupSDK.getPeopleCounts(weixinGroupId, robotIdByGroupId); Integer peopleCounts = WxGroupSDK.getPeopleCounts(weixinGroupId, robotIdByGroupId);
if (peopleCounts != null) { if (peopleCounts != null) {
...@@ -263,7 +271,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz { ...@@ -263,7 +271,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
pushAddUserMessageDTO.setTime(System.currentTimeMillis()); pushAddUserMessageDTO.setTime(System.currentTimeMillis());
pushAddUserMessageDTO.setNickName(nickName); pushAddUserMessageDTO.setNickName(nickName);
pushAddUserMessageDTO.setMemberCount(memberCount); pushAddUserMessageDTO.setMemberCount(memberCount);
pushAddUserMessageDTO.setRobotId(robotId); pushAddUserMessageDTO.setRobotId(robotIdByGroupId);
bookMQProducer.pushAddUserMessageTopic(pushAddUserMessageDTO); bookMQProducer.pushAddUserMessageTopic(pushAddUserMessageDTO);
} }
......
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