无关风月
2025-06-04 81e41215c522743d2d21b8011049347a523ef6ad
ruoyi-system/src/main/resources/mapper/system/TProjectDeptMapper.xml
@@ -19,5 +19,21 @@
    <sql id="Base_Column_List">
        id, create_time, update_time, create_by, update_by, disabled, project_name, parent_id, status
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.system.ProjectDeptListVO">
        select t1.*,count(t2.user_id) as userCount from
        t_project_dept t1
        left join sys_user t2 on t2.deptId = t1.id
        where 1=1
        <if test="query.deptName != null and query.deptName != ''">
            and t1.dept_name like concat('%',#{query.deptName},'%')
        </if>
        <if test="query.status != null and query.status != ''">
            and t1.status = #{query.status}
        </if>
        and t1.`disabled` = = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        and t2.deptType =1
        group by t1.id
        order by t1.create_time desc
    </select>
</mapper>