package cn.iocoder.yudao.module.mes.dal.mysql.safety; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.mes.dal.dataobject.safety.SafetyOrgDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * 安全生产 - 组织架构 Mapper * * @author 超级管理员 */ @Mapper public interface SafetyOrgMapper extends BaseMapperX { default List selectListOrdered() { return selectList(new LambdaQueryWrapperX() .orderByAsc(SafetyOrgDO::getSort) .orderByAsc(SafetyOrgDO::getId)); } default List selectListByParentId(Long parentId) { return selectList(new LambdaQueryWrapperX() .eq(SafetyOrgDO::getParentId, parentId) .orderByAsc(SafetyOrgDO::getSort)); } default Long selectCountByParentId(Long parentId) { return selectCount(SafetyOrgDO::getParentId, parentId); } }