package com.engine.organization.mapper.comp; import com.engine.organization.entity.company.po.CompPO; import org.apache.ibatis.annotations.Param; import java.util.Collection; import java.util.List; /** * @description: * @author:dxfeng * @createTime: 2022/05/16 * @version: 1.0 */ public interface CompMapper { /** * 列表查询 * * @return */ List listAll(@Param("orderSql") String orderSql); List listByFilter(@Param("CompanyPO") CompPO CompanyPO, @Param("orderSql") String orderSql); /** * 查询所有被引用的ID * * @return */ List listUsedId(); List listUsedIds(); /** * 获取子层级数据 * * @param ids * @return */ List listChild(@Param("ids") Collection ids); /** * 根据ID查询数据 * * @param id * @return */ CompPO listById(@Param("id") Integer id); /** * 根据ID批量查询数据 * * @param ids * @return */ List getCompsByIds(@Param("ids") Collection ids); /** * 获取顶级数据 * * @return */ List listParent(); List hasSubs(); List hasDetachSubs(@Param("companyIds") Collection companyIds); /** * 根据名称和上级查找ID * * @param subCompanyName * @param supSubComId * @return */ Integer getIdByNameAndPid(@Param("subCompanyName") String subCompanyName, @Param("supSubComId") Integer supSubComId); /** * 获取最大排序 * * @return */ Integer getMaxShowOrder(); Integer getIdBySubCompanyCode(@Param("subCompanyCode") String subCompanyCode); }