Newer
Older
huludao / src / main / resources / mapper / project / ProjectDicBizMapper.xml
<?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.xf.huludao.project.dao.ProjectDictBizMapper">

    <resultMap id="projectDictMap" type="com.xf.huludao.project.entity.ProjectDictBiz">
        <id column="id" property="id"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="parent_id"  property="parentId"/>
        <result column="code" property="code"/>
        <result column="dict_key" property="dictKey"/>
        <result column="dict_value" property="dictValue"/>
        <result column="sort" property="sort"/>
        <result column="remark" property="remark"/>
        <result column="is_sealed" property="isSealed"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>

    <select id="queryList" resultMap="projectDictMap">
        select
        b.*
        from blade_dict_biz b
        where 1 = 1
        <if test="id != null and id != ''">
            and b.id = #{id}
        </if>
        <if test="code != null and code != ''">
            and b.code = #{code}
        </if>
        <if test="dictKey != null and dictKey != ''">
            and b.dict_key = #{dictKey}
        </if>
            order by b.sort asc
    </select>


</mapper>