|
@@ -156,13 +156,18 @@ public class GameEventServiceImpl implements IGameEventService {
|
|
|
|
|
|
/**
|
|
|
* 统计赛事个数
|
|
|
+ * 0:所有 1:未开始 2:进行中 3:已结束
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public Long countGameEvent() {
|
|
|
+ public Long countGameEvent(Long type) {
|
|
|
return this.baseMapper.selectCount(
|
|
|
Wrappers.lambdaQuery(GameEvent.class)
|
|
|
+ .apply(type == 0, "1=1")
|
|
|
+ .apply(type == 1, "start_time > now()")
|
|
|
+ .apply(type == 2, "start_time <= now() and end_time >= now()")
|
|
|
+ .apply(type == 3, "end_time < now()")
|
|
|
);
|
|
|
}
|
|
|
}
|