fix: 修复首页获取秒杀活动时,有时会报错问题
This commit is contained in:
parent
d75bb7b7cf
commit
a76cc4693f
@ -74,12 +74,18 @@ public class SeckillApplyServiceImpl extends ServiceImpl<SeckillApplyMapper, Sec
|
||||
|
||||
@Override
|
||||
public List<SeckillTimelineVO> getSeckillTimeline() {
|
||||
try {
|
||||
//秒杀活动缓存key
|
||||
return getSeckillTimelineInfo();
|
||||
} catch (Exception e) {
|
||||
log.error("获取秒杀时间轴失败", e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SeckillGoodsVO> getSeckillGoods(Integer timeline) {
|
||||
try {
|
||||
List<SeckillGoodsVO> seckillGoodsVoS = new ArrayList<>();
|
||||
//获取
|
||||
List<SeckillTimelineVO> seckillTimelineToCache = getSeckillTimelineInfo();
|
||||
@ -88,6 +94,10 @@ public class SeckillApplyServiceImpl extends ServiceImpl<SeckillApplyMapper, Sec
|
||||
seckillGoodsVoS = first.get().getSeckillGoodsList();
|
||||
}
|
||||
return seckillGoodsVoS;
|
||||
} catch (Exception e) {
|
||||
log.error("获取秒杀商品失败", e);
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user