DiskCatalogueMapper.xml 1.63 KB
Newer Older
284718418@qq.com committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?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="cn.timer.api.dao.disk.DiskCatalogueMapper">

	<!-- 可根据自己的需求,是否要使用 -->
    <resultMap type="cn.timer.api.bean.disk.DiskCatalogue" id="BaseResultMap">
        <id property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="parentId" column="parent_id"/>
        <result property="parentIds" column="parent_ids"/>
        <result property="type" column="type"/>
        <result property="orgId" column="org_id"/>
        <result property="size" column="size"/>
        <result property="usedSize" column="used_size"/>
        <result property="sort" column="sort"/>
        <result property="createUserId" column="create_user_id"/>
18
        <result property="userName" column="user_name"/>
284718418@qq.com committed
19 20 21 22 23 24 25
        <result property="updateUserId" column="update_user_id"/>
        <result property="remark" column="remark"/>
        <result property="deleteFlag" column="delete_flag"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
    </resultMap>

284718418@qq.com committed
26
    <select id="selectIdListById" resultType="java.lang.Integer">
284718418@qq.com committed
27
        SELECT id FROM disk_catalogue WHERE delete_flag = 0 AND find_in_set(#{id},parent_ids) OR id = #{id}
284718418@qq.com committed
28 29
    </select>

翁国栋 committed
30 31 32 33 34 35
    <select id="getSubCatalogueList" resultMap="BaseResultMap">
        select d.*  from disk_catalogue d
        where d.delete_flag = 0 and d.parent_ids like CONCAT(#{ids},'%') and d.create_user_id = #{userId}
    </select>

</mapper>