40 lines
1.7 KiB
XML
40 lines
1.7 KiB
XML
<?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.itn.admin.itn.code.mapper.CodeDetailMapper">
|
|
|
|
<!-- 특정 코드 그룹의 모든 상세 코드를 조회하는 쿼리 -->
|
|
<select id="findByGroupId" parameterType="String" resultType="codeDetailVO">
|
|
SELECT * FROM common_code_detail WHERE code_group_id = #{codeGroupId}
|
|
</select>
|
|
|
|
<!-- 특정 코드 상세를 ID로 조회하는 쿼리 -->
|
|
<select id="findById" parameterType="String" resultType="codeDetailVO">
|
|
SELECT * FROM common_code_detail WHERE code_id = #{codeId}
|
|
</select>
|
|
|
|
<!-- 코드 상세를 추가하는 쿼리 -->
|
|
<insert id="insert" parameterType="codeDetailVO">
|
|
INSERT INTO common_code_detail (code_id, code_group_id, code_name, code_value, sort_order, use_yn, frst_register_id, frst_regist_pnttm, last_updusr_id, last_updt_pnttm)
|
|
VALUES (#{codeId}, #{codeGroupId}, #{codeName}, #{codeValue}, #{sortOrder}, #{useYn}, #{frstRegisterId}, #{frstRegistPnttm}, #{lastUpdusrId}, #{lastUpdtPnttm})
|
|
</insert>
|
|
|
|
<!-- 코드 상세를 수정하는 쿼리 -->
|
|
<update id="update" parameterType="codeDetailVO">
|
|
UPDATE common_code_detail
|
|
SET code_name = #{codeName},
|
|
code_value = #{codeValue},
|
|
sort_order = #{sortOrder},
|
|
use_yn = #{useYn},
|
|
last_updusr_id = #{lastUpdusrId},
|
|
last_updt_pnttm = #{lastUpdtPnttm}
|
|
WHERE code_id = #{codeId}
|
|
</update>
|
|
|
|
<!-- 코드 상세를 삭제하는 쿼리 -->
|
|
<delete id="delete" parameterType="String">
|
|
DELETE FROM common_code_detail WHERE code_id = #{codeId}
|
|
</delete>
|
|
</mapper> |