增加上传和获取定位接口

This commit is contained in:
2025-08-26 09:23:05 +08:00
parent a3d5df25c0
commit 49572f46d7
8 changed files with 229 additions and 6 deletions

View File

@@ -0,0 +1,29 @@
package com.onekeycall.videotablet.service;
import com.onekeycall.videotablet.entity.DeviceLocation;
import com.onekeycall.videotablet.repository.DeviceLocationRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DeviceLocationService {
private final DeviceLocationRepository deviceSnRepository;
@Autowired
public DeviceLocationService(DeviceLocationRepository deviceSnRepository) {
this.deviceSnRepository = deviceSnRepository;
}
public DeviceLocation getDeviceLocation(String sn) {
return deviceSnRepository.findBySn(sn);
}
public boolean isExist(String sn) {
return deviceSnRepository.existsBySn(sn);
}
public void save(DeviceLocation deviceLocation) {
deviceSnRepository.save(deviceLocation);
}
}