添加根据标签名字模糊查询标签

添加根据摄像头名字模糊查询摄像头
This commit is contained in:
wuweida 2022-05-10 09:03:18 +08:00
parent 73bbd006d0
commit 1e3b25b350
2 changed files with 35 additions and 0 deletions

View File

@ -106,6 +106,21 @@ public class Controller {
}
/**
* 根据摄像头名字模糊查询摄像头
* @param channelName
* @return
*/
@RequestMapping("selectByChannelName")
public Result selectByChannelName(String channelName){
List<CameraChannel> labels = cameraChannelMapper.selectByChannelName(channelName);
Result success = Result.success(labels);
return success;
}
/**
* 根据parentId查询摄像头
* @param parentId
@ -150,6 +165,20 @@ public class Controller {
return success;
}
/**
* 根据标签名字模糊查询标签
* @param labelName
* @return
*/
@RequestMapping("selectByLabelName")
public Result selectByLabelName(String labelName){
List<Label> labels = cameraChannelMapper.selectByLabelName(labelName);
Result success = Result.success(labels);
return success;
}
/**
* 根据parentId查询组织

View File

@ -28,5 +28,11 @@ public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
@Select("select * from t_label")
List<Label> selectAllLabel(Label label);
@Select("select * from t_label where label_name like concat('%',${labelName},'%')")
List<Label> selectByLabelName(String labelName);
@Select("select * from t_camera_channel where channel_name like concat('%',${channelName},'%')")
List<CameraChannel> selectByChannelName(String channelName);
}