728x90
반응형
<?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="egovframework.invako.sample.mybatis.mapper.SamplePostgresMapper">
<select id="selectAuthManageList" parameterType="java.util.Map" resultType="egovframework.invako.domain.dto.ComtnauthorinfoDTO">
/* selectAuthManageList */
/* 권한관리 조회 */
SELECT AUTHOR_CODE, /* 권한코드 */
AUTHOR_NM, /* 권한명 */
AUTHOR_DC, /* 권한설명 */
AUTHOR_CREAT_DE, /* 권한생성일 */
DECODE(USE_AT,'Y',1,0) AS USE_AT, /* 사용여부 */
'N' AS DEL_STATUS, /* 삭제여부 */
'롤등록' AS BTN_ROLE /* 버튼 */
FROM COMTNAUTHORINFO
WHERE 1 = 1
<if test="searchKeyword != null">
AND AUTHOR_NM LIKE '%'||#{searchKeyword}||'%'
</if>
</select>
<insert id="insertAuthManage" parameterType="egovframework.invako.domain.entity.Comtnauthorinfo">
/* insertAuthManage */
/* 권한등록 */
<![CDATA[
INSERT INTO COMTNAUTHORINFO (
AUTHOR_CODE,
AUTHOR_NM,
AUTHOR_DC,
AUTHOR_CREAT_DE,
USE_AT
) VALUES (
#{authorCode},
#{authorNm},
#{authorDc},
NOW(),
#{useAt}
)
]]>
</insert>
<update id="updateAuthManage" parameterType="egovframework.invako.domain.entity.Comtnauthorinfo">
/* updateAuthManage */
/* 권한수정 */
<![CDATA[
UPDATE COMTNAUTHORINFO
SET AUTHOR_NM=#{authorNm}
, AUTHOR_DC=#{authorDc}
, USE_AT=#{useAt}
WHERE AUTHOR_CODE=#{authorCode}
]]>
</update>
</mapper>
728x90
반응형
'프로그램 > JPA' 카테고리의 다른 글
pom.xml (0) | 2021.07.02 |
---|---|
postgre ddl (0) | 2021.07.02 |
mapper-config.xml (0) | 2021.07.02 |
context-transaction.xml (0) | 2021.07.02 |
context-nexacro.xml (0) | 2021.07.02 |
댓글