File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
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.classes.dao.ClassDAO">
<resultMap id="classMap" type="ClassVO">
<result property="sclsId" column="scls_id"/>
<result property="userId" column="user_id"/>
<result property="sclsNm" column="scls_nm"/>
</resultMap>
<!--
작성자 : 정다정
작성일 : 2024.07.25
내 용 : 반 조회
-->
<select id="selectClass" parameterType="String" resultMap="classMap">
SELECT scls_id
, user_id
, scls_nm
FROM
class
WHERE
user_id = #{userId}
</select>
<!--
작성자 : 정다정
작성일 : 2024.07.26
내 용 : 반 생성
-->
<insert id="insertClass" parameterType="ClassVO">
INSERT INTO class( scls_id
, user_id
, scls_nm
) VALUES ( #{sclsId}
, #{userId}
, #{sclsNm}
);
</insert>
<!--
작성자 : 정다정
작성일 : 2024.07.26
내 용 : 반 수정
-->
<update id="updateClass" parameterType="ClassVO">
UPDATE class
SET
scls_nm = #{sclsNm}
WHERE
scls_id = #{sclsId}
</update>
<!--
작성자 : 정다정
작성일 : 2024.07.26
내 용 : 반 삭제
-->
<delete id="deleteClass" parameterType="String">
DELETE FROM class
WHERE
scls_id = #{sclsId}
</delete>
<!--
작성자 : 정다정
작성일 : 2024.07.26
내 용 : 반 아이디(scls_id) 존재 확인
-->
<select id="existsClassById" parameterType="String" resultType="int">
SELECT
COUNT(*)
FROM
class
WHERE
scls_id = #{sclsId}
</select>
</mapper>