|
@@ -14,7 +14,6 @@ import cn.reghao.tnb.file.app.zdisk.model.dto.CamDeviceDto;
|
|
|
import cn.reghao.tnb.file.app.zdisk.model.po.CamDevice;
|
|
import cn.reghao.tnb.file.app.zdisk.model.po.CamDevice;
|
|
|
import cn.reghao.tnb.file.app.zdisk.model.po.UserActivity;
|
|
import cn.reghao.tnb.file.app.zdisk.model.po.UserActivity;
|
|
|
import cn.reghao.tnb.file.app.zdisk.model.query.CamDeviceQuery;
|
|
import cn.reghao.tnb.file.app.zdisk.model.query.CamDeviceQuery;
|
|
|
-import cn.reghao.tnb.common.db.SelectOption;
|
|
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -22,7 +21,6 @@ import java.util.ArrayList;
|
|
|
import java.util.HashSet;
|
|
import java.util.HashSet;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author reghao
|
|
* @author reghao
|
|
@@ -54,7 +52,7 @@ public class CamService {
|
|
|
camDeviceMapper.save(camDevice);
|
|
camDeviceMapper.save(camDevice);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public List<SelectOption> getCamKeyValues() {
|
|
|
|
|
|
|
+ public List<CamDevice> getCamList() {
|
|
|
long loginUser = UserContext.getUserId();
|
|
long loginUser = UserContext.getUserId();
|
|
|
CamDeviceQuery camDeviceQuery = new CamDeviceQuery.Builder()
|
|
CamDeviceQuery camDeviceQuery = new CamDeviceQuery.Builder()
|
|
|
.addBy(loginUser)
|
|
.addBy(loginUser)
|
|
@@ -68,12 +66,7 @@ public class CamService {
|
|
|
sharedCamDevices.forEach(this::setSharedCamName);
|
|
sharedCamDevices.forEach(this::setSharedCamName);
|
|
|
camDeviceList.addAll(sharedCamDevices);
|
|
camDeviceList.addAll(sharedCamDevices);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- return camDeviceList.stream().map(camDevice -> {
|
|
|
|
|
- long camId = camDevice.getCamId();
|
|
|
|
|
- String camName = camDevice.getCamName();
|
|
|
|
|
- return new SelectOption(camName, camId+"");
|
|
|
|
|
- }).collect(Collectors.toList());
|
|
|
|
|
|
|
+ return camDeviceList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public CamDevice getCamDevice(long camId) {
|
|
public CamDevice getCamDevice(long camId) {
|