1
0

WEB端解绑设备

This commit is contained in:
2025-07-17 16:20:22 +08:00
parent cc776300ec
commit 7b1615ce4d
4 changed files with 56 additions and 31 deletions

View File

@ -98,4 +98,12 @@ public interface DeviceService extends IService<Device> {
* @return
*/
Boolean queryDevice(String mac);
/**
* WEB端解绑设备
*
* @param id
* @return
*/
int webUnBindDevice(Long id);
}

View File

@ -44,7 +44,6 @@ import com.fuyuanshen.system.domain.vo.SysOssVo;
import com.fuyuanshen.system.service.ISysOssService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -577,6 +576,22 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
}
/**
* WEB端解绑设备
*
* @param id
* @return
*/
@Override
public int webUnBindDevice(Long id) {
DeviceAssignments deviceAssignment = deviceAssignmentsMapper.selectById(id);
if (deviceAssignment == null) {
throw new RuntimeException("请先将设备入库!!!");
}
return unBindDevice(deviceAssignment.getDeviceId());
}
/**
* 查询设备MAC号
*