Commit 177cc09d by 裴大威

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

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