增加添加和绑定sn,增加阿里云推送
This commit is contained in:
@@ -17,4 +17,8 @@ public class DeviceSnService {
|
||||
public DeviceInfo findBySn(String sn) {
|
||||
return deviceSnRepository.findBySn(sn);
|
||||
}
|
||||
|
||||
public void save(DeviceInfo deviceInfo) {
|
||||
deviceSnRepository.save(deviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user