fix
parent
066c42fd02
commit
5053659d8c
|
@ -193,7 +193,7 @@ public interface DeviceChannelMapper {
|
|||
@Update(value = {"UPDATE wvp_device_channel SET status=false WHERE device_id=#{deviceId} AND channel_id=#{channelId}"})
|
||||
void offline(String deviceId, String channelId);
|
||||
|
||||
@Update(value = {"UPDATE wvp_device_channel SET status=fasle WHERE device_id=#{deviceId}"})
|
||||
@Update(value = {"UPDATE wvp_device_channel SET status=false WHERE device_id=#{deviceId}"})
|
||||
void offlineByDeviceId(String deviceId);
|
||||
|
||||
@Insert("<script> " +
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package com.genersoft.iot.vmp.test;
|
||||
|
||||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper;
|
||||
import com.genersoft.iot.vmp.storager.dao.DeviceMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
/**
|
||||
* @author weidian
|
||||
* @date 2023/8/10
|
||||
*/
|
||||
@SpringBootTest
|
||||
public class BaseTest {
|
||||
|
||||
@Autowired
|
||||
private DeviceMapper deviceMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceChannelMapper deviceChannelMapper;
|
||||
|
||||
@Test
|
||||
public void atest() {
|
||||
Device device = deviceMapper.getDeviceByDeviceId("34020000001320000001");
|
||||
if (device == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
device.setOnLine(false);
|
||||
deviceChannelMapper.offlineByDeviceId("34020000001320000001");
|
||||
deviceMapper.update(device);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue