|
@@ -0,0 +1,30 @@
|
|
|
+package com.fdkankan.tk.controller;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.fdkankan.redis.constant.RedisKey;
|
|
|
+import com.fdkankan.redis.util.RedisUtil;
|
|
|
+import com.fdkankan.tk.common.ResultData;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+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.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping
|
|
|
+public class LoginController extends BaseController {
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ RedisUtil redisUtil;
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/fdLogout")
|
|
|
+ public ResultData fdLogout(){
|
|
|
+ String fdToken = String.format(RedisKey.TOKEN_V3,getToken());
|
|
|
+ redisUtil.del(fdToken);
|
|
|
+ return ResultData.ok();
|
|
|
+ }
|
|
|
+}
|