This commit is contained in:
N1KO 2024-12-31 09:45:01 +08:00
parent da59e62ef4
commit 918a93f93e
3 changed files with 8 additions and 4 deletions

View File

@ -94,7 +94,7 @@ public class VipAspect {
});
UserLevelThreadLocal.set(userLevel);
if (Objects.equals(UserLevel.NORMAL, userLevel)) {
throw new VipException("等级不够,请升级");
throw new VipException("请升级当前登录用户等级再操作~详情联系微信18010816106");
}
}
return point.proceed();

View File

@ -35,6 +35,12 @@ public class GlobalExceptionHandler {
return Results.failed(e.getCode(), e.getMessage());
}
@ExceptionHandler({VipException.class})
public Results<Object> vipException(VipException e) {
log.error("请求发生错误code:{},message:{}", e.getCode(), e.getMessage());
return Results.failed(e.getCode(), e.getMessage());
}
@ExceptionHandler({LoginException.class})
public Results<Object> loginException(LoginException e) {
log.error("请求发生错误code:{},message:{}", e.getCode(), e.getMessage());
@ -42,7 +48,6 @@ public class GlobalExceptionHandler {
}
@ExceptionHandler({Throwable.class})
public Results<Object> handleException(Throwable e) {
log.error("请求发生错误,错误信息:{}", e.getMessage(), e);

View File

@ -980,8 +980,7 @@
showMessage(data.msg);
} else if (batchData.code === -300) {
// TODO VIP 等级
alert(`${batchData.msg}`);
} else if (batchData.code === 200) {
const batchNo = batchData.data;