|
@@ -2,6 +2,7 @@ package com.fs.app.controller;
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
+import com.fs.app.annotation.Login;
|
|
|
import com.fs.app.param.*;
|
|
|
import com.fs.app.utils.WxUtil;
|
|
|
import com.fs.common.annotation.RepeatSubmit;
|
|
@@ -28,10 +29,7 @@ import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-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 org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.Calendar;
|
|
@@ -388,4 +386,20 @@ public class AppLoginController extends AppBaseController{
|
|
|
return R.error("用户不存在!");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 退出清除jpushId
|
|
|
+ */
|
|
|
+ @Login
|
|
|
+ @GetMapping("/logout")
|
|
|
+ public R logout() {
|
|
|
+ String userId = getUserId();
|
|
|
+ FsUser fsUser = new FsUser();
|
|
|
+ fsUser.setUserId(Long.parseLong(userId));
|
|
|
+ fsUser.setJpushId("");
|
|
|
+ if (userMapper.updateFsUser(fsUser)>0) {
|
|
|
+ return R.ok();
|
|
|
+ } else {
|
|
|
+ return R.error("用户不存在!");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|