Commit 7a9779a7 authored by 赵建伟's avatar 赵建伟

update codes

parent eeba3299
......@@ -314,20 +314,11 @@ public class CtrPfrRctMysqlSink extends RichSinkFunction<CtrPfrRctBean> {
private LinkedList<PfrRecentInfo> getNewQueue(LinkedList<PfrRecentInfo> oldQueue, String pfrStr, String timeStr, Integer queueSize ){
LinkedList<PfrRecentInfo> newQueue = new LinkedList<>();
// Map<String,Integer> pfrMap = StringUtil.transString2Map(pfrStr);
for (PfrRecentInfo pfrRecentInfo : oldQueue) {
String sevenDaysAgoTimeStr = DateUtil.getSevenDaysAgoTimeStr(new Date());
String lastUpdateTime = pfrRecentInfo.getLastUpdateTime();
if(DateUtil.getTimestampByDateStr(lastUpdateTime) > DateUtil.getTimestampByDateStr(sevenDaysAgoTimeStr)){
// String pfrName = pfrRecentInfo.getPfrName();
// Integer pfrCount = pfrRecentInfo.getPfrCount();
newQueue.add(pfrRecentInfo);
// if(pfrMap.keySet().contains(pfrName)){
// newQueue.add(new PfrRecentInfo(pfrName,pfrCount + 1 ,timeStr));
// }else{
// newQueue.add(pfrRecentInfo);
// }
}
}
newQueue.add(new PfrRecentInfo(pfrStr,1 ,timeStr));
......
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