版本控制 token校验
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
//package com.chaozhanggui.system.cashierservice.config;
|
||||
//
|
||||
//import com.chaozhanggui.system.cashierservice.redis.RedisCst;
|
||||
//import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
|
||||
//import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.apache.commons.lang3.StringUtils;
|
||||
//import org.aspectj.lang.ProceedingJoinPoint;
|
||||
//import org.aspectj.lang.annotation.Around;
|
||||
//import org.aspectj.lang.annotation.Aspect;
|
||||
//import org.aspectj.lang.annotation.Pointcut;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
//import org.springframework.web.context.request.RequestContextHolder;
|
||||
//import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import java.util.Objects;
|
||||
//
|
||||
///**
|
||||
// * 方法调用统一切面处理
|
||||
// */
|
||||
//@Aspect
|
||||
//@Component
|
||||
//@Slf4j
|
||||
//public class AppApiMethodAspect {
|
||||
//
|
||||
// @Autowired
|
||||
// RedisUtil redisUtil;
|
||||
//
|
||||
// @Pointcut("execution(public * (" +
|
||||
// "com.chaozhanggui.system.cashierservice.controller.* " +
|
||||
// ").*(..))")
|
||||
// public void pkg() {
|
||||
// }
|
||||
//
|
||||
// @Around("pkg()")
|
||||
// public Object around(ProceedingJoinPoint pjp) throws Throwable {
|
||||
// HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
|
||||
// HttpServletRequest req = request;
|
||||
// //version:版本号
|
||||
// //type: ios; android;
|
||||
// //environment:app;wx
|
||||
//// String environment = req.getHeader("environment");
|
||||
//// if (StringUtils.isNotBlank(environment) && environment.equals("app")) {
|
||||
//// String type = req.getHeader("type");
|
||||
//// String version = req.getHeader("version");
|
||||
//// //LDBL_APP_VERSION:ios:version 存在即需要强制更新
|
||||
//// String message = redisUtil.getMessage(RedisCst.LDBL_APP_VERSION + type + ":" + version);
|
||||
//// if (StringUtils.isNotBlank(message)) {
|
||||
//// return Result.success(CodeEnum.UPGRADE_REQUIRED, message);
|
||||
//// }
|
||||
//// }
|
||||
//
|
||||
// // 执行被拦截的方法
|
||||
// Object result = pjp.proceed();
|
||||
// return result;
|
||||
//
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user