fix
This commit is contained in:
+2
-2
@@ -669,7 +669,7 @@ public class WatchServiceImpl implements IWatchService {
|
|||||||
wrapper.eq(WatchStatUserInfoDaySleep::getUserId, userId);
|
wrapper.eq(WatchStatUserInfoDaySleep::getUserId, userId);
|
||||||
wrapper.isNotNull(WatchStatUserInfoDaySleep::getLongDurationTotal);
|
wrapper.isNotNull(WatchStatUserInfoDaySleep::getLongDurationTotal);
|
||||||
WatchIndexVo vo = daySleepMapper.selectJoinOne(WatchIndexVo.class,wrapper);
|
WatchIndexVo vo = daySleepMapper.selectJoinOne(WatchIndexVo.class,wrapper);
|
||||||
return vo.getAveSleep();
|
return null != vo ? vo.getAveSleep() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Integer queryTotalDistance(String userId) {
|
private Integer queryTotalDistance(String userId) {
|
||||||
@@ -677,7 +677,7 @@ public class WatchServiceImpl implements IWatchService {
|
|||||||
wrapper.selectSum(WatchStatUserInfoDaySdc::getDistanceValue,WatchIndexVo::getDistance);
|
wrapper.selectSum(WatchStatUserInfoDaySdc::getDistanceValue,WatchIndexVo::getDistance);
|
||||||
wrapper.eq(WatchStatUserInfoDaySdc::getUserId, userId);
|
wrapper.eq(WatchStatUserInfoDaySdc::getUserId, userId);
|
||||||
WatchIndexVo vo = statSdcMapper.selectJoinOne(WatchIndexVo.class,wrapper);
|
WatchIndexVo vo = statSdcMapper.selectJoinOne(WatchIndexVo.class,wrapper);
|
||||||
return vo.getDistance();
|
return null != vo ? vo.getDistance() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user