|
|
@@ -278,6 +278,25 @@ public class LiveWatchUserServiceImpl implements ILiveWatchUserService {
|
|
|
@Override
|
|
|
public R liveUserTotals(LiveWatchUser liveWatchUser) {
|
|
|
LiveWatchUserStatistics liveWatchUserStatistics = baseMapper.liveUserTotals(liveWatchUser);
|
|
|
+ if(liveWatchUserStatistics == null)
|
|
|
+ {
|
|
|
+ liveWatchUserStatistics = new LiveWatchUserStatistics();
|
|
|
+ liveWatchUserStatistics.setOnline(0);
|
|
|
+ liveWatchUserStatistics.setOffline(0);
|
|
|
+ liveWatchUserStatistics.setSilenced(0);
|
|
|
+ return R.ok().put("data", liveWatchUserStatistics);
|
|
|
+ }
|
|
|
+ if(liveWatchUserStatistics.getOnline() == null)
|
|
|
+ {
|
|
|
+ liveWatchUserStatistics.setOnline(0);
|
|
|
+ }
|
|
|
+ if (liveWatchUserStatistics.getOffline() == null) {
|
|
|
+ liveWatchUserStatistics.setOffline(0);
|
|
|
+ }
|
|
|
+ if (liveWatchUserStatistics.getSilenced() == null) {
|
|
|
+ liveWatchUserStatistics.setSilenced(0);
|
|
|
+ }
|
|
|
+
|
|
|
return R.ok().put("data", liveWatchUserStatistics);
|
|
|
}
|
|
|
|