package com.ydtech.modules.esm.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ydtech.modules.esm.model.EsmInsCompany; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; public interface EsmInsCompanyMapper extends BaseMapper { List getByLowerId80(String companyId); List getByLowerId57(String companyId); @Select("select version()") String getVersion(); default List getByLowerId(String companyId) { String version = getVersion(); if (version.contains("5.7")) { return getByLowerId57(companyId); } else { return getByLowerId80(companyId); } } List queryListByParentId( @Param("parentId") String parentId); }