package com.cloud.device.dao;
|
|
import com.cloud.device.model.Node;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.List;
|
|
@Repository
|
@Mapper
|
public interface NodeDao {
|
/**
|
* 删除
|
* @param id
|
* @return
|
*/
|
int deleteById(String id);
|
|
/**
|
* 插入所有字段
|
* @param record
|
* @return
|
*/
|
int insert(Node record);
|
|
/**
|
* 插入某些字段
|
* @param record
|
* @return
|
*/
|
int insertSelective(Node record);
|
|
/**
|
* 获取一条数据
|
* @param id
|
* @return
|
*/
|
Node selectById(String id);
|
|
|
/**
|
* 更新
|
* @param record
|
* @return
|
*/
|
int updateById(Node record);
|
|
int updateByIdSelective(Node record);
|
|
/**
|
* 根据集群id获取节点id
|
* @param clusterId
|
* @return
|
*/
|
List<Node> findByClusterId(String clusterId);
|
|
Node getNodeByDevId(String devId);
|
}
|