<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.ibs.dashboard.mapper.UrlRegistryMapper">

    <sql id="selectUrlRegistryVo">
        select id, url_path, url_name, url_type, head_id from url_registry
    </sql>

    <select id="selectUrlByCondition" resultType="UrlRegistry">
        <include refid="selectUrlRegistryVo"/>
        <where>
            <if test="headId != null and headId != ''">
                and head_id = #{headId}
            </if>
            <if test="urlType != null and urlType != ''">
                and url_type = #{urlType}
            </if>
            <if test="urlName != null and urlName != ''">
                and url_name = #{urlName}
            </if>
        </where>
	</select>

    <select id="selectUrlList" resultType="UrlRegistry">
        <include refid="selectUrlRegistryVo"/>
        <where>
            <if test="headId != null and headId != ''">
                and head_id = #{headId}
            </if>
            <if test="urlType != null and urlType != ''">
                and url_type = #{urlType}
            </if>
        </where>
    </select>

</mapper>