updates
This commit is contained in:
parent
cd8243e09f
commit
705e17684a
|
|
@ -55,10 +55,17 @@ public class MiniUserService {
|
||||||
//先判断是不是VIP激活的
|
//先判断是不是VIP激活的
|
||||||
List<YxVipCard> vipCardList = yxVipCardService.selectByUserId(userId);
|
List<YxVipCard> vipCardList = yxVipCardService.selectByUserId(userId);
|
||||||
if (CollectionUtils.isNotEmpty(vipCardList)) {
|
if (CollectionUtils.isNotEmpty(vipCardList)) {
|
||||||
YxVipCard yxVipCard = vipCardList.get(0);
|
for (YxVipCard yxVipCard : vipCardList) {
|
||||||
skuCode =yxVipCard.getSkuCode();
|
if (yxVipCard.getValidDate()==null) {
|
||||||
validTime = yxVipCard.getValidDate();
|
continue;
|
||||||
activationTime = yxVipCard.getUsedTime();
|
}
|
||||||
|
if (yxVipCard.getValidDate().getTime()<=new Date().getTime()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
skuCode =yxVipCard.getSkuCode();
|
||||||
|
validTime = yxVipCard.getValidDate();
|
||||||
|
activationTime = yxVipCard.getUsedTime();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断支付订单中的
|
//判断支付订单中的
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,8 @@ public class YxVipCardServiceImpl extends ServiceImpl<YxVipCardMapper, YxVipCard
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<YxVipCard> yxVipCardLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<YxVipCard> yxVipCardLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
yxVipCardLambdaQueryWrapper.eq(YxVipCard::getUserId,userId);
|
yxVipCardLambdaQueryWrapper.eq(YxVipCard::getUserId,userId);
|
||||||
yxVipCardLambdaQueryWrapper.orderByDesc(YxVipCard::getUsedTime);
|
yxVipCardLambdaQueryWrapper.orderByAsc(YxVipCard::getValidDate);
|
||||||
|
//yxVipCardLambdaQueryWrapper.orderByDesc(YxVipCard::getUsedTime);
|
||||||
return this.list(yxVipCardLambdaQueryWrapper);
|
return this.list(yxVipCardLambdaQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue