流量统计增加对上一周期的数据填充

This commit is contained in:
Chopper
2022-05-11 17:49:44 +08:00
parent 49a2d3cab3
commit 850b124da3
3 changed files with 17 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ package cn.lili.modules.statistics.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@@ -14,6 +15,7 @@ import java.util.Date;
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OnlineMemberVO {
/**
@@ -27,4 +29,9 @@ public class OnlineMemberVO {
*/
private Integer num;
/**
* 上一周期在线会员人数
*/
private Integer lastNum;
}

View File

@@ -142,7 +142,7 @@ public class PlatformViewServiceImpl extends ServiceImpl<PlatformViewMapper, Pla
}
}
if (exitOnlineNum == null) {
onlineMemberVOS.add(new OnlineMemberVO(calendar.getTime(), 0));
onlineMemberVOS.add(new OnlineMemberVO(calendar.getTime(), 0, 0));
} else {
onlineMemberVOS.add(exitOnlineNum);
}