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.ai_lms.lms.user_unit.dao.UserUnitDAO">
<!--
작 성 자 : 권민수
작 성 일 : 2024.08.02
내 용 : 사용자 학습 진행 정보 테이블 sql 매핑 xml 문서
-->
<resultMap id="UserUnitResultMap" type="UserUnitVO">
<id property="unitId" column="unit_id"/>
<id property="stdId" column="std_id"/>
<id property="userId" column="user_id"/>
<id property="sclsId" column="scls_id"/>
<result property="cmptnYn" column="cmptn_yn"/>
<result property="cmptnTm" column="cmptn_tm"/>
</resultMap>
<select id="getUserUnits" resultMap="UserUnitResultMap">
SELECT * FROM ai_lms.user_unit
</select>
<select id="getUserUnitById" parameterType="UserUnitVO" resultMap="UserUnitResultMap">
SELECT * FROM ai_lms.user_unit
WHERE unit_id = #{unitId}
AND std_id = #{stdId}
AND user_id = #{userId}
AND scls_id = #{sclsId}
</select>
<insert id="insertUserUnit" parameterType="UserUnitVO">
INSERT INTO
ai_lms.user_unit (unit_id,
std_id,
user_id,
scls_id,
cmptn_yn,
cmptn_tm)
VALUES (#{unitId},
#{stdId},
#{userId},
#{sclsId},
#{cmptnYn},
TO_TIMESTAMP(#{cmptnTm}, 'YYYY-MM-DD HH24:MI:SS.US'))
</insert>
<update id="updateUserUnit" parameterType="UserUnitVO">
UPDATE ai_lms.user_unit
SET cmptn_yn = #{cmptnYn},
cmptn_tm = TO_TIMESTAMP(#{cmptnTm}, 'YYYY-MM-DD HH24:MI:SS.US')
WHERE unit_id = #{unitId}
AND std_id = #{stdId}
AND user_id = #{userId}
AND scls_id = #{sclsId}
</update>
<delete id="deleteUserUnit" parameterType="UserUnitVO">
DELETE FROM ai_lms.user_unit
WHERE unit_id = #{unitId}
AND std_id = #{stdId}
AND user_id = #{userId}
AND scls_id = #{sclsId}
</delete>
</mapper>