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