根据parentId查询所有组织
This commit is contained in:
parent
aac56928dd
commit
244599f817
|
@ -90,7 +90,7 @@ public class Controller {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询摄像头
|
* 查询所有摄像头
|
||||||
* @param cameraChannel
|
* @param cameraChannel
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -147,13 +147,17 @@ public class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有组织
|
* 根据parentId查询组织
|
||||||
* @param cameraOrgan
|
* @param parentId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping("selectAllOrgan")
|
@RequestMapping("selectSubOrgan")
|
||||||
public Result selectAllOrgan(CameraOrgan cameraOrgan){
|
public Result selectSubOrgan(String parentId){
|
||||||
List<CameraOrgan> organs = cameraOrgenMapper.selectAllOrgan(cameraOrgan);
|
if (parentId == null){
|
||||||
|
parentId = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CameraOrgan> organs = cameraOrgenMapper.selectSubOrgan(parentId);
|
||||||
|
|
||||||
Result success = Result.success(organs);
|
Result success = Result.success(organs);
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,13 @@ package com.hisense.monitormanage.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.hisense.monitormanage.entity.CameraOrgan;
|
import com.hisense.monitormanage.entity.CameraOrgan;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface CameraOrgenMapper extends BaseMapper<CameraOrgan> {
|
public interface CameraOrgenMapper extends BaseMapper<CameraOrgan> {
|
||||||
|
|
||||||
@Select("select * from t_camera_organ")
|
@Select("select * from t_camera_organ where parent_id = #{parentId}")
|
||||||
List<CameraOrgan> selectAllOrgan(CameraOrgan cameraOrgan);
|
List<CameraOrgan> selectSubOrgan(@Param("parentId") String parentId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class MonitorService {
|
||||||
|
|
||||||
static int keepaliveCount = 16;
|
static int keepaliveCount = 16;
|
||||||
|
|
||||||
// @PostConstruct
|
@PostConstruct
|
||||||
public void init(){
|
public void init(){
|
||||||
|
|
||||||
String loginUrl = monitorDomain + "/videoService/accounts/authorize";
|
String loginUrl = monitorDomain + "/videoService/accounts/authorize";
|
||||||
|
|
Loading…
Reference in New Issue