xuhy
2025-06-20 ebf94cb3ed4f487ca1fcd7069db0ca141553a4db
ruoyi-system/src/main/resources/mapper/system/TLeaveMapper.xml
@@ -33,7 +33,7 @@
        from t_leave t1
                 left join sys_user t2 on t1.leave_person = t2.id
        where
            t1.disabled = = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
            t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        <if test="query.nickName != null and query.nickName != ''">
            and t2.nick_name like concat('%', #{query.nickName}, '%')
        </if>
@@ -54,5 +54,24 @@
            </foreach>
        </if>
    </select>
    <select id="leaveList" resultType="com.ruoyi.system.applet.vo.LeaveUserListVO">
        select t1.*,t1.create_time as createTime1
        from t_leave t1
        where
        t1.disabled =  ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        <if test="query.type == 1">
            and t1.audit_id = #{query.userId}
        </if>
        <if test="query.type == 2">
            and t1.leave_person = #{query.userId}
        </if>
        <if test="query.userIds != null and query.userIds.size()>0">
            AND t1.leave_person IN
            <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                #{id}
            </foreach>
        </if>
    </select>
</mapper>