package com.muyu.enterprise.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.muyu.domain.Middle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MiddleMapper extends MPJBaseMapper<Middle> {

    /**
     * 绑定的电子围栏
     */
    @Select("SELECT fence.fence_name,fence.description FROM middle LEFT JOIN fence ON middle.fence_id = fence.fence_id LEFT JOIN fencegroup ON middle.fence_group_id = fencegroup.fence_group_id WHERE middle.fence_group_id=#{fenceGruopId}")
    List<Middle> showFenceList(@Param("fenceGruopId") Long fenceGruopId);


}
