package com.ruoyi.novel.vip;

// VipAccessAspect.java
@Aspect
@Component
public class VipAccessAspect {

    @Before("@annotation(vipAccess)")
    public void checkVipAccess(JoinPoint joinPoint, VipAccess vipAccess) {
        // 校验用户VIP状态
        if(!userService.isVip(SecurityUtils.getUserId())) {
            throw new ServiceException("请开通VIP后阅读此章节");
        }
    }
}
