|
@@ -37,7 +37,13 @@ public class JPushController {
|
|
|
*/
|
|
|
@PostMapping("bindUser")
|
|
|
private Result bindUser(@RequestBody @Validated JPushBindRO ro, HttpServletRequest request) {
|
|
|
- Long userId = authService.getTokenUserId(request);
|
|
|
+ Long userId;
|
|
|
+ try {
|
|
|
+ userId = authService.getTokenUserId(request);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // 未登录会抛异常,场景登录未登录均可
|
|
|
+ userId = null;
|
|
|
+ }
|
|
|
UserJPush device;
|
|
|
// 多端推送场景注掉这儿
|
|
|
if (ObjectUtil.isNotEmpty(userId)) {
|