增加添加和绑定sn,增加阿里云推送

This commit is contained in:
hc
2025-08-10 20:13:45 +08:00
parent 301b23e6e6
commit 6eed13b07d
13 changed files with 721 additions and 44 deletions

View File

@@ -17,4 +17,8 @@ public class DeviceSnService {
public DeviceInfo findBySn(String sn) {
return deviceSnRepository.findBySn(sn);
}
public void save(DeviceInfo deviceInfo) {
deviceSnRepository.save(deviceInfo);
}
}

View File

@@ -3,6 +3,7 @@ package com.onekeycall.videotablet.service;
import com.onekeycall.videotablet.entity.User;
import com.onekeycall.videotablet.repository.UserRepository;
import com.onekeycall.videotablet.result.Result;
import com.onekeycall.videotablet.utils.AESUtil;
import com.onekeycall.videotablet.utils.SecureIdGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
@@ -111,6 +112,7 @@ public class UserService implements UserDetailsService {
}
public User getUserByUserId(String userId) {
return userRepository.findUserByUserId(userId).orElseThrow(() -> new RuntimeException("User not found with userId: " + userId));
return userRepository.findUserByUserId(userId).
orElseThrow(() -> new UsernameNotFoundException("User not found with userId: " + userId));
}
}