代码非空处理,这块需要优化,将积分相关逻辑脱离购物车通用逻辑
This commit is contained in:
parent
26c67c72fa
commit
3a4d08980f
@ -209,8 +209,11 @@ public class PointsGoodsServiceImpl extends ServiceImpl<PointsGoodsMapper, Point
|
||||
Query query = new Query();
|
||||
query.addCriteria(Criteria.where("skuId").is(skuId))
|
||||
.addCriteria(Criteria.where("promotionStatus").is(PromotionStatusEnum.START.name()));
|
||||
List<PointsGoodsVO> pointsGoodsVO=this.mongoTemplate.find(query, PointsGoodsVO.class);
|
||||
return pointsGoodsVO.get(0);
|
||||
List<PointsGoodsVO> pointsGoodsVO = this.mongoTemplate.find(query, PointsGoodsVO.class);
|
||||
if (pointsGoodsVO != null && pointsGoodsVO.size() > 0) {
|
||||
return pointsGoodsVO.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user