|
@@ -47,10 +47,7 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
import org.springframework.util.Assert;
|
|
import org.springframework.util.Assert;
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -824,9 +821,6 @@ public class AuthServiceImpl implements AuthService {
|
|
// }
|
|
// }
|
|
//验证token是否过期
|
|
//验证token是否过期
|
|
// long dYaccessToken = redisService.getExpireTime("DYaccessToken");
|
|
// long dYaccessToken = redisService.getExpireTime("DYaccessToken");
|
|
- redisService.remove("DYaccessToken");
|
|
|
|
- redisService.remove("DyrefreshToken");
|
|
|
|
- redisService.remove("DyopenId");
|
|
|
|
return redisService.getExpireTime("DYaccessToken")<0 ? ResponseJson.success(false): ResponseJson.success(true);
|
|
return redisService.getExpireTime("DYaccessToken")<0 ? ResponseJson.success(false): ResponseJson.success(true);
|
|
// String clintKey = "awwwvh9tsnvo54w1";//应用唯一标识
|
|
// String clintKey = "awwwvh9tsnvo54w1";//应用唯一标识
|
|
// String responestype = "code";//写死为'code'即可
|
|
// String responestype = "code";//写死为'code'即可
|
|
@@ -838,6 +832,17 @@ public class AuthServiceImpl implements AuthService {
|
|
// response.sendRedirect(code);
|
|
// response.sendRedirect(code);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 清除抖音授权token缓存
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/clean/douyin/redis")
|
|
|
|
+ public ResponseJson cleanDYRedis(){
|
|
|
|
+ redisService.remove("DYaccessToken");
|
|
|
|
+ redisService.remove("DyrefreshToken");
|
|
|
|
+ redisService.remove("DyopenId");
|
|
|
|
+ return ResponseJson.success();
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 根据用户的code值获取AcessToken
|
|
* 根据用户的code值获取AcessToken
|
|
* ccode 用户授权登录code
|
|
* ccode 用户授权登录code
|