新火炬后端单体项目初始化代码
zhangherong
2025-06-26 5ef91f20d4e0f9c3a2838719220fbb2c9d63fad0
src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java
@@ -4,8 +4,6 @@
import org.apache.ibatis.annotations.Select;
import org.jeecg.common.system.vo.SelectTreeModel;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.model.SysDepartTreeModel;
import org.jeecg.modules.system.model.TreeModel;
import org.springframework.data.repository.query.Param;
import java.util.List;
@@ -22,6 +20,7 @@
   
   /**
    * 根据用户ID查询部门集合
     *
     * @param userId 用户id
     * @return List<SysDepart>
    */
@@ -37,6 +36,7 @@
    /**
     * 通过部门编码获取部门id
     *
     * @param orgCode 部门编码
     * @return String
     */
@@ -45,6 +45,7 @@
    /**
     * 通过部门id 查询部门id,父id
     *
     * @param departId 部门id
     * @return
     */
@@ -53,6 +54,7 @@
   /**
    *  根据部门Id查询,当前和下级所有部门IDS
     *
    * @param departId
    * @return
    */
@@ -60,6 +62,7 @@
   /**
    * 根据部门编码获取部门下所有IDS
     *
    * @param orgCodes
    * @return
    */
@@ -67,25 +70,32 @@
    /**
     * 根据parent_id查询下级部门
     *
     * @param parentId 父id
     * @return List<SysDepart>
     */
    List<SysDepart> queryTreeListByPid(@Param("parentId") String parentId);
   /**
    * 根据id下级部门数量
     *
    * @param parentId
    * @return
    */
   @Select("SELECT count(*) FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}")
    Integer queryCountByPid(@Param("parentId")String parentId);
   /**
    * 根据OrgCod查询所属公司信息
     *
    * @param orgCode
    * @return
    */
   SysDepart queryCompByOrgCode(@Param("orgCode")String orgCode);
   /**
    * 根据id下级部门
     *
    * @param parentId
    * @return
    */