| | |
| | | if (robotId == null)
|
| | | throw new UserCloudException(1, "云发单机器人不存在");
|
| | |
|
| | | List<WeiXinGroupDTO> list = AitaokerApiUtil.getContract(robotId);
|
| | | List<String> list = AitaokerApiUtil.getContract(12793);
|
| | | if (list == null || list.size() == 0)
|
| | | throw new UserCloudException(1, "未检索到对应群");
|
| | |
|
| | | String wxId = userCloud.getWxId();
|
| | | for (WeiXinGroupDTO dto : list) {
|
| | | String groupId = dto.getGroupId();
|
| | | // 检测是否匹配群
|
| | | String key = RedisKeyEnum.cloudMatchGroup.getKey() + StringUtil.Md5(wxId + "_" + groupId);
|
| | | for (String roomId : list) {
|
| | | String key = RedisKeyEnum.cloudMatchGroup.getKey() + StringUtil.Md5(wxId + "_" + roomId);
|
| | | String result = redisManager.getCommonString(key);
|
| | | if (!StringUtil.isNullOrEmpty(result)) {
|
| | | userCloudGroupService.addGroup(uid, dto.getGroupId(), dto.getGroupName(), userCloud.getGroupNum());
|
| | | if (!StringUtil.isNullOrEmpty(result)) {
|
| | | String groupName = null;
|
| | | WeiXinGroupDTO groupDetail = AitaokerApiUtil.getGroupDetail(12793, roomId);
|
| | | if (groupDetail != null) {
|
| | | groupName = groupDetail.getGroupName();
|
| | | }
|
| | | userCloudGroupService.addGroup(uid, roomId, groupName, userCloud.getGroupNum());
|
| | | }
|
| | | }
|
| | | }
|