
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<?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.takensoft.taken_bi_manager.department.dao.DeptDrctryDAO">
<!-- 부서 디렉토리 resultMap -->
<resultMap id="deptDrctryResult" type="DeptDrctryVO">
<result property="deptCode" column="dept_code"/>
<result property="deptHostId" column="dept_host_id"/>
<result property="deptDrctryId" column="dept_drctry_id"/>
<result property="deptDrctryNm" column="dept_drctry_nm"/>
<result property="deptDrctryPath" column="dept_drctry_path"/>
</resultMap>
<!-- 부서 내 디렉토리 목록 조회 -->
<select id="selectDeptDrctryList" parameterType="SearchVO" resultMap="deptDrctryResult">
SELECT dept_code
, dept_host_id
, dept_drctry_id
, dept_drctry_nm
, dept_drctry_path
FROM dept_drctry
WHERE true
<!-- S.검색 영역 -->
<foreach item="item" index="index" collection="searchObjectList">
<choose>
<when test="item.key == 'currentCode' and item.value != null and item.value != ''">
AND dept_host_id = #{item.value}
</when>
</choose>
</foreach>
<!-- E.검색 영역 -->
ORDER BY dept_drctry_id DESC
LIMIT #{perPage} OFFSET ((#{currentPage} - 1) * #{perPage})
</select>
<!-- 부서 내 디렉토리 목록 조회 -->
<select id="selectDeptDrctryListCount" parameterType="SearchVO">
SELECT COUNT(*)
FROM dept_drctry
WHERE true
<!-- S.검색 영역 -->
<foreach item="item" index="index" collection="searchObjectList">
<choose>
<when test="item.key == 'currentCode' and item.value != null and item.value != ''">
AND dept_host_id = #{item.value}
</when>
</choose>
</foreach>
<!-- E.검색 영역 -->
</select>
<!-- 부서 내 디렉토리 등록 -->
<insert id="insertDeptDrctry" parameterType="DeptDrctryVO">
INSERT INTO dept_drctry (
dept_code,
dept_host_id,
dept_drctry_id,
dept_drctry_nm,
dept_drctry_path
)
VALUES (
#{deptCode},
#{deptHostId},
#{deptDrctryId},
#{deptDrctryNm},
#{deptDrctryPath}
)
</insert>
<!-- 부서 내 디렉토리 삭제 -->
<delete id="deleteDrctryDrctry" parameterType="DeptDrctryVO">
DELETE FROM dept_drctry
WHERE dept_drctry_id = #{deptDrctryId}
</delete>
</mapper>