
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
2024-07-31
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.evaluation.dao.EvaluationDAO">
<!--
작 성 자 : 권지수
작 성 일 : 2024.07.29
내 용 : 단원 평가 정보 insert
-->
<insert id="insertEvaluation" parameterType="EvaluationVO">
INSERT INTO evaluation (
eval_id,
eval_type,
unit_id
) VALUES (
#{evalId},
#{evalType},
#{unitId}
)
</insert>
<!--
작 성 자 : 권지수
작 성 일 : 2024.07.29
내 용 : 단원 평가 정보 read
-->
<select id="evaluationInfo" parameterType="EvaluationVO" resultType="EvaluationVO">
SELECT
eval_id,
eval_type,
unit_id
FROM evaluation
WHERE eval_id = #{evalId}
</select>
<!--
작 성 자 : 권지수
작 성 일 : 2024.07.29
내 용 : 특정 단원 평가 정보 read
-->
<select id="evaluationUnitList" parameterType="SearchVO" resultType="EvaluationVO">
SELECT
eval_id,
eval_type,
unit_id
FROM evaluation
WHERE unit_id = #{unitId}
<if test="option != null and keyword != null">
<choose>
<when test="option == 'eval_type'">
AND eval_type LIKE CONCAT('%', #{keyword}, '%')
</when>
<when test="option == 'eval_id'">
AND eval_id = #{keyword}
</when>
<otherwise>
AND (eval_type LIKE CONCAT('%', #{keyword}, '%')
OR eval_id = #{keyword})
</otherwise>
</choose>
</if>
LIMIT #{pageSize} OFFSET #{startIndex}
</select>
<!--
작 성 자 : 권지수
작 성 일 : 2024.07.29
내 용 : 단원 평가 정보 update
-->
<update id="updateEvaluation" parameterType="EvaluationVO">
UPDATE evaluation
SET
eval_id = #{evalId},
eval_type = #{evalType},
unit_id = #{unitId}
WHERE eval_id = #{evalId}
</update>
<!--
작 성 자 : 권지수
작 성 일 : 2024.07.29
내 용 : 단원 평가 정보 delete
-->
<delete id="deleteEvaluation" parameterType="EvaluationVO">
DELETE FROM evaluation
WHERE eval_id = #{evalId}
</delete>
</mapper>