按标签查询摄像头接口优化

This commit is contained in:
wuweida 2022-05-12 10:39:34 +08:00
parent 8122e35574
commit bac2105efb
1 changed files with 11 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.sql.Array;
import java.time.Clock;
import java.time.LocalDateTime;
import java.util.HashMap;
@ -180,10 +181,18 @@ public class Controller {
List<ChannelLabelDto> channelLabelDtos = cameraChannelMapper.selectLabel(labelCode);
Result success = Result.success(channelLabelDtos);
for (ChannelLabelDto channelLabelDto :channelLabelDtos) {
String nodeName = channelLabelDto.getNodeName();
String[] splits = nodeName.split("->");
String split = splits[1];
channelLabelDto.setNodeName(split);
Result success = Result.success(channelLabelDto);
return success;
}
return Result.error("");
}
/**
* 查询所有标签