Commit 906de032 by 徐高华

单向好友

parent 9c5ec748
......@@ -440,7 +440,7 @@ public interface TabHaobanExternalClerkRelatedMapper {
List<ExternalClerkRelatedDTO> halfFriendPage(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeId")String storeId, @Param("clerkId")String clerkId, @Param("staffId")String staffId, @Param("type")int type);
List<TabHaobanExternalClerkRelated> halfDelFriendPage(@Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanExternalClerkRelated> halfDelFriendPage(@Param("wxEnterpriseId") String wxEnterpriseId , @Param("startItem")int startItem);
void updateHalfTime(@Param("id") String id , @Param("delTime") Date delTime) ;
......
......@@ -131,11 +131,14 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
@Override
public void halfTimer(String wxEnterpriseId) {
log.info("开始单向数据={}",wxEnterpriseId);
int pageSize = 1000 ;
int pageNum = 0;
RMap<String, String> mapCache = RedisUtil.getRedisClient().getMap("halfTimer_wxenterpriseId");
while (true) {
List<TabHaobanExternalClerkRelated> list = this.externalClerkRelatedMapper.halfDelFriendPage(wxEnterpriseId);
List<TabHaobanExternalClerkRelated> list = this.externalClerkRelatedMapper.halfDelFriendPage(wxEnterpriseId,pageNum*pageSize);
List<String> idList = new ArrayList<>() ;
if(CollectionUtils.isNotEmpty(list)) {
pageNum++;
for(TabHaobanExternalClerkRelated dto : list) {
if(StringUtils.isNotBlank(dto.getExternalUserId())) {
idList.add(dto.getExternalUserId()) ;
......@@ -171,7 +174,7 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
break;
}
}
mapCache.put("wxEnterpriseId","1") ;
mapCache.put(wxEnterpriseId,"1") ;
DingUtils.send("halfTimer告警,wxEnterpriseId="+wxEnterpriseId, null, false);
log.info("结束单向数据={}",wxEnterpriseId);
}
......
......@@ -918,7 +918,7 @@
<select id="halfDelFriendPage" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> from tab_haoban_external_clerk_related
where wx_enterprise_id = #{wxEnterpriseId} and status_flag in (1,3,4) and external_status = 3
and half_del_time is null limit 1000
and half_del_time is null limit ${startItem}, 1000
</select>
<update id="updateHalfTime">
......
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