Newer
Older
huludao / src / main / java / com / newfiber / api / pc / dao / CameraGroupInfoMapper.java
package com.newfiber.api.pc.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.newfiber.api.pc.model.entity.CameraGroupInfo;
import com.newfiber.api.pc.model.entity.CameraInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * cameraGroupInfo model层
 *
 * @author luzhan
 */
@Repository
public interface CameraGroupInfoMapper extends BaseMapper<CameraGroupInfo> {

    /**
     * 删除摄像头关联
     * @param groupId
     */
    int deleteByParentId(@Param("groupId") Long groupId);

    /**
     * 查询摄像头分组列表
     * @param searchStr
     * @return
     */
    List<CameraGroupInfo> selectCameraPage(@Param("searchStr") String searchStr);

    /**
     * 通过id查询摄像头信息
     * @param parentId
     * @return
     */
    List<String> selectCameraIndex(@Param("parentId") Long parentId);

    /**
     * 通过id查询摄像头信息
     * @param parentId
     * @return
     */
    List<CameraInfo> selectCameraInfo(@Param("parentId") Long parentId);

    /**
     * 删除用户组和下级用户组信息
     * @param id
     * @return
     */
    int deleteByGroupId(@Param("id") Long id);

    /**
     * 查询root分组
     * @return
     */
    List<CameraGroupInfo> rootList();

    List<CameraGroupInfo> selectRootList();
}