Commit 2a55aff2 by 徐高华

test

parent 16a26998
...@@ -165,4 +165,6 @@ public interface GroupChatService { ...@@ -165,4 +165,6 @@ public interface GroupChatService {
*/ */
public ServiceResponse<Void> initStaffGroupChat(String staffId) ; public ServiceResponse<Void> initStaffGroupChat(String staffId) ;
public void repairOwner() ;
} }
\ No newline at end of file
...@@ -12,6 +12,7 @@ import java.util.stream.Collectors; ...@@ -12,6 +12,7 @@ import java.util.stream.Collectors;
import com.gic.enterprise.api.dto.StoreDTO; import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService; import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -126,6 +127,8 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -126,6 +127,8 @@ public class GroupChatServiceImpl implements GroupChatService {
private GroupChatInitMapper groupChatInitMapper; private GroupChatInitMapper groupChatInitMapper;
@Autowired @Autowired
private StoreService storeService ; private StoreService storeService ;
@Autowired
private WxEnterpriseMapper wxEnterpriseMapper ;
private static GicMQClient mqClient = GICMQClientUtil.getClientInstance(); private static GicMQClient mqClient = GICMQClientUtil.getClientInstance();
...@@ -1215,4 +1218,27 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -1215,4 +1218,27 @@ public class GroupChatServiceImpl implements GroupChatService {
this.syncGroupChatList(qwDTO, Arrays.asList(userId), null, true); this.syncGroupChatList(qwDTO, Arrays.asList(userId), null, true);
return null ; return null ;
} }
@Override
public void repairOwner() {
List<TabHaobanWxEnterprise> wxEnterpriseList = this.wxEnterpriseMapper.listByIds(null);
for (TabHaobanWxEnterprise item : wxEnterpriseList) {
int pageNum = 0;
if(item.getWxSecurityType() <= 0) {
continue;
}
while (true) {
List<GroupChatOwnerDTO> list = this.groupChatOwnerMapper.listOwnerForStatistic(item.getWxEnterpriseId(), pageNum * pageSize, pageSize);
if (CollectionUtils.isEmpty(list)) {
logger.info("无群主记录,不处理,wxeid={}",item.getWxEnterpriseId());
break;
}
pageNum++;
for(GroupChatOwnerDTO dto : list) {
this.updateOwnerCount(dto.getStaffId());
}
}
}
}
} }
\ No newline at end of file
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