FrontDeptMapper.java 2.6 KB
package com.lhcredit.project.business.frontDept.mapper;

import com.lhcredit.project.business.frontDept.domain.FrontDept;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 公司部门 数据层
 *
 * @author lhcredit
 * @date 2024-05-08
 */
public interface FrontDeptMapper {
    /**
     * 查询公司部门信息
     *
     * @param id 公司部门ID
     * @return 公司部门信息
     */
    public FrontDept selectFrontDeptById(Long id);

    public FrontDept selectFrontDeptByName(String deptName);

    /**
     * 查询公司部门列表
     *
     * @param frontDept 公司部门信息
     * @return 公司部门集合
     */
    public List<FrontDept> selectFrontDeptList(FrontDept frontDept);

    /**
     * 根据 id 批量查询部门信息
     * @param ids
     * @return
     */
     List<FrontDept> getDeptListByIds(List<Long> ids);

    /**
     * 新增公司部门
     *
     * @param frontDept 公司部门信息
     * @return 结果
     */
    public int insertFrontDept(FrontDept frontDept);

    /**
     * 修改公司部门
     *
     * @param frontDept 公司部门信息
     * @return 结果
     */
    public int updateFrontDept(FrontDept frontDept);

    /**
     * 删除公司部门
     *
     * @param id 公司部门ID
     * @return 结果
     */


    /**
     * 根据 父id 更新对应对公司全部部门的 biz_types(有效报告类型)
     * @param frontDept
     * @return
     */
    int updateFrontDeptByAncestors(FrontDept frontDept);

    public int deleteFrontDeptById(Long id);

    /**
     * 批量删除公司部门
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteFrontDeptByIds(String[] ids);

    FrontDept selectFrontDeptByOrgId(Long orgId);

    /**
     * 根据id 查询FrontDept
     * @param id
     * @return
     */
    FrontDept getFrontDeptById(Long id);

    List<FrontDept> findDeptTypeAll(String orgId);

    /**
     *  根据用户的orgid 查询对应的 org公司的父公司
     * @param orgId
     * @return
     */
    FrontDept getParentOrgInfoByOrgId(Long orgId);

    /**
     * 校验部门名称是否唯一
     *
     * @param deptName 部门名称
     * @param parentId 父部门ID
     * @return 结果
     */
    public FrontDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);

    List<FrontDept> selectDeptTreeByOrgId(@Param("orgId") Long orgId);

    List<FrontDept> likeByName(String name);

    FrontDept getFrontDeptByName(String orgName);


    List<FrontDept> getparentId(Long id);
}