package com.zsc.edu.gateway.modules.iot.tsl.repo;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zsc.edu.gateway.modules.iot.tsl.entity.Property;
import com.zsc.edu.gateway.modules.iot.tsl.entity.Serve;
import com.zsc.edu.gateway.modules.iot.tsl.query.PropertyQuery;
import com.zsc.edu.gateway.modules.iot.tsl.query.ServeQuery;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Optional;

/**
 * @author Yao
 */
public interface ServeRepository extends BaseMapper<Serve> {
    @Select("select * from iot_serve where name=#{name}")
    Serve findByName(@Param("name") String name);

//    List<Serve> findByProductId(Long productId);

//    IPage<Serve> page(Page<Serve> page, @Param("query") ServeQuery query);

    Serve selectById(@Param("id") Long id);

}
