|
@@ -25,6 +25,7 @@ import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
@Component
|
|
@Component
|
|
|
public class CheckPromoteView {
|
|
public class CheckPromoteView {
|
|
@@ -60,7 +61,15 @@ public class CheckPromoteView {
|
|
|
resetCustserviceViewTask.addRedis(promoteQrcodePool.getPromoteId(),promoteQrcodePool.getCustserviceId(),promoteQrcodePool.getWeight());
|
|
resetCustserviceViewTask.addRedis(promoteQrcodePool.getPromoteId(),promoteQrcodePool.getCustserviceId(),promoteQrcodePool.getWeight());
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
|
|
+ Integer hour = LocalDateTime.now().getHour();
|
|
|
|
|
+ String key = promoteCode.getId().toString()+"#"+hour.toString();
|
|
|
|
|
+ Long isNotice = stringRedisTemplate.opsForHyperLogLog().size(RedisKey.PanPromoteNoticeRecode+key,key);
|
|
|
|
|
+ if (isNotice != null && isNotice > 0){
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
Cmd.sendFeishuMsg(feishu,"[警告]:活码ID:"+promoteCode.getId()+"|"+promoteCode.getName()+",当前小时所有二维码阈值上限,需要人工添加二维码");
|
|
Cmd.sendFeishuMsg(feishu,"[警告]:活码ID:"+promoteCode.getId()+"|"+promoteCode.getName()+",当前小时所有二维码阈值上限,需要人工添加二维码");
|
|
|
|
|
+ stringRedisTemplate.opsForHyperLogLog().add(RedisKey.PanPromoteNoticeRecode+key,key);
|
|
|
|
|
+ stringRedisTemplate.expire(RedisKey.PanPromoteNoticeRecode+key,4800, TimeUnit.SECONDS);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|