|
@@ -216,7 +216,8 @@ public class SharePathServiceImpl implements SharePathService {
|
|
|
* @return 剩余额度值
|
|
|
*/
|
|
|
private Long getBrotherSocial(Long userId) {
|
|
|
- return getYesterdayCrash(userId, 1).getBrotherPrice();
|
|
|
+ PartitionCrashDO yesterdayCrash = getYesterdayCrash(userId, 1);
|
|
|
+ return yesterdayCrash == null ? 0 : yesterdayCrash.getBrotherPrice();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -230,7 +231,10 @@ public class SharePathServiceImpl implements SharePathService {
|
|
|
LocalDateTime localDateTime = todayStart.minusDays(today);
|
|
|
String yesterdayNo = "CRASH:" + userId + ":" + localDateTime;
|
|
|
PartitionCrashDO partitionCrashDO = partitionCrashMapper.selectOne(new LambdaQueryWrapperX<PartitionCrashDO>().eqIfPresent(PartitionCrashDO::getPartNo, yesterdayNo));
|
|
|
- List<PartitionCrashDO> partitionCrashDOS = partitionCrashMapper.selectList((new LambdaQueryWrapperX<PartitionCrashDO>().eq(PartitionCrashDO::getUserId, userId)));
|
|
|
+ List<PartitionCrashDO> partitionCrashDOS = partitionCrashMapper.selectList((new LambdaQueryWrapperX<PartitionCrashDO>()
|
|
|
+ .eq(PartitionCrashDO::getUserId, userId))
|
|
|
+ .apply("date(create_time) < date(now())")
|
|
|
+ );
|
|
|
|
|
|
//判断这个用户不是第一次碰撞并且没有查询到昨天的碰撞记录,有可能是昨天或者更早定时任务没有启动导致的,所以再往前查几天
|
|
|
if(!partitionCrashDOS.isEmpty() && partitionCrashDO == null){
|
|
@@ -246,7 +250,8 @@ public class SharePathServiceImpl implements SharePathService {
|
|
|
* @return 剩余额度值
|
|
|
*/
|
|
|
private Long getSonSocial(Long userId) {
|
|
|
- return getYesterdayCrash(userId, 1).getSonPrice();
|
|
|
+ PartitionCrashDO yesterdayCrash = getYesterdayCrash(userId, 1);
|
|
|
+ return yesterdayCrash == null ? 0 : yesterdayCrash.getSonPrice();
|
|
|
}
|
|
|
|
|
|
/**
|