|
@@ -36,15 +36,16 @@ public class VipEntitlementCheckAspect {
|
|
|
|
|
|
|
|
|
@Around("@annotation(vipEntitlementCheck)")
|
|
|
- public void around(ProceedingJoinPoint joinPoint, VipEntitlementCheck vipEntitlementCheck) {
|
|
|
+ public Object around(ProceedingJoinPoint joinPoint, VipEntitlementCheck vipEntitlementCheck) {
|
|
|
|
|
|
boolean isEnterprise = VipEntitlementCheck.ENTERPRISE.equals(vipEntitlementCheck.userType());
|
|
|
Long userId = LoginUserContext.getUserId();
|
|
|
Long enterpriseId = LoginUserContext.getEnterpriseId3();
|
|
|
validate(isEnterprise, enterpriseId, userId, vipEntitlementCheck.type(), vipEntitlementCheck.operate());
|
|
|
try {
|
|
|
- joinPoint.proceed();
|
|
|
+ Object result = joinPoint.proceed();
|
|
|
process(isEnterprise, enterpriseId, userId, vipEntitlementCheck.type(), vipEntitlementCheck.operate());
|
|
|
+ return result;
|
|
|
} catch (Throwable e) {
|
|
|
e.getStackTrace();
|
|
|
throw exception(FORBIDDEN);
|