|
|
@@ -1,10 +1,10 @@
|
|
|
package com.kym.admin.controller;
|
|
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.kym.common.R;
|
|
|
import com.kym.common.annotation.SysLog;
|
|
|
import com.kym.service.admin.AdminUserService;
|
|
|
-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;
|
|
|
@@ -34,4 +34,11 @@ public class AdminUserController {
|
|
|
return adminUserService.login(json.getString("mobilePhone"), json.getString("password"));
|
|
|
}
|
|
|
|
|
|
+ @SysLog("登出")
|
|
|
+ @PostMapping("/logout")
|
|
|
+ R adminLogout() {
|
|
|
+ StpUtil.logout();
|
|
|
+ return R.success();
|
|
|
+ }
|
|
|
+
|
|
|
}
|