feat(롤관리(mngAuthRoleMgt) 반영): tui-grid serialize 제거
parent
5bb21e1023
commit
21c2ebad4f
@ -1,148 +1,86 @@
|
||||
<?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="kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper">
|
||||
<!-- SQL 페이징 코드 -->
|
||||
<sql id="pageBefore">
|
||||
SELECT LIST.* FROM(
|
||||
</sql>
|
||||
|
||||
<sql id="pageAfter">
|
||||
) LIST LIMIT #{firstIndex}, #{recordCountPerPage}
|
||||
</sql>
|
||||
|
||||
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper">
|
||||
|
||||
<sql id="findList_SELECT">
|
||||
SELECT A.ROLE_CODE AS "roleCode"
|
||||
,A.ROLE_NM AS "roleNm"
|
||||
,A.ROLE_PTTRN AS "rolePtn"
|
||||
,A.ROLE_DC AS "roleDc"
|
||||
,(
|
||||
SELECT CODE_NM
|
||||
FROM XIT_CMMN_DETAIL_CODE
|
||||
WHERE CODE_ID = 'XIT029' AND CODE = A.ROLE_TY) AS "roleTyp"
|
||||
,A.ROLE_SORT AS "roleSort"
|
||||
,A.ROLE_CREAT_DE AS "roleCreatDe"
|
||||
</sql>
|
||||
<sql id="findList_FROM">
|
||||
FROM XIT_ROLE_INFO A
|
||||
</sql>
|
||||
<sql id="findList_WHERE">
|
||||
<if test="'1'.toString() == searchCondition">
|
||||
AND A.ROLE_NM LIKE CONCAT('%',#{searchKeyword},'%')
|
||||
<!-- *************************************************************************************************************
|
||||
* xit_role_info : 롤(역할) 정보
|
||||
************************************************************************************************************** -->
|
||||
<select id="selectAuthRoles" parameterType="map" resultType="kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO">
|
||||
/* auth-role-mysql-mapper|selectAuthRoles-롤목록 조회|julim */
|
||||
SELECT role_code
|
||||
, role_nm
|
||||
, role_pttrn
|
||||
, role_dc
|
||||
, role_ty
|
||||
, role_sort
|
||||
, role_creat_de
|
||||
FROM xit_role_info
|
||||
<where>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(RoleCode)">
|
||||
AND role_code = #{roleCode}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="findList" resultType="kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO">
|
||||
/** XitAuthRuleMngMapper.findList */
|
||||
/** 롤관리 목록 조회 */
|
||||
<if test="searchGubun == 'list'">
|
||||
<include refid="pageBefore" />
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(roleNm)">
|
||||
AND INSTR(role_nm, #{roleNm}) > 0
|
||||
</if>
|
||||
|
||||
<include refid="findList_SELECT"/>
|
||||
<include refid="findList_FROM"/>
|
||||
WHERE 1=1
|
||||
<include refid="findList_WHERE"/>
|
||||
ORDER BY A.ROLE_CREAT_DE DESC
|
||||
|
||||
<if test="searchGubun == 'list'">
|
||||
<include refid="pageAfter" />
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(roleTy)">
|
||||
AND role_ty = #{roleTy}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="findView" resultType="kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO">
|
||||
/** XitAuthRuleMngMapper.findView */
|
||||
/** 롤관리 상세정보 조회 */
|
||||
<include refid="findList_SELECT"/>
|
||||
<include refid="findList_FROM"/>
|
||||
WHERE A.ROLE_CODE = #{roleCode}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="findXitRoleInfos" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
|
||||
/** findXitRoleInfos */
|
||||
/** 역할정보 다건 조회 */
|
||||
SELECT ROLE_CODE
|
||||
,ROLE_NM
|
||||
,ROLE_PTTRN
|
||||
,ROLE_DC
|
||||
,ROLE_TY
|
||||
,ROLE_SORT
|
||||
,ROLE_CREAT_DE
|
||||
FROM XIT_ROLE_INFO
|
||||
WHERE 1=1
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_code )">AND ROLE_CODE = #{role_code }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_nm )">AND ROLE_NM = #{role_nm }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_pttrn )">AND ROLE_PTTRN = #{role_pttrn }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">AND ROLE_DC = #{role_dc }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">AND ROLE_TY = #{role_ty }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">AND ROLE_SORT = #{role_sort }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_creat_de)">AND ROLE_CREAT_DE = #{role_creat_de}</if>
|
||||
</select>
|
||||
<select id="findXitRoleInfo" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
|
||||
/** findXitRoleInfo */
|
||||
<select id="selectAuthRole" parameterType="string" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
|
||||
/* auth-role-mysql-mapper|selectAuthRole-롤 정보 조회|julim */
|
||||
/** 역할정보 조회 */
|
||||
SELECT ROLE_CODE
|
||||
,ROLE_NM
|
||||
,ROLE_PTTRN
|
||||
,ROLE_DC
|
||||
,ROLE_TY
|
||||
,ROLE_SORT
|
||||
,ROLE_CREAT_DE
|
||||
FROM XIT_ROLE_INFO
|
||||
WHERE 1=1
|
||||
AND ROLE_CODE = #{role_code}
|
||||
SELECT role_code
|
||||
, role_nm
|
||||
, role_pttrn
|
||||
, role_dc
|
||||
, role_ty
|
||||
, role_sort
|
||||
, role_creat_de
|
||||
FROM xit_role_info
|
||||
WHERE role_code = #{roleCode}
|
||||
</select>
|
||||
<insert id="addXitRoleInfo">
|
||||
/** addXitRoleInfo */
|
||||
/** 역할정보 등록 */
|
||||
INSERT INTO XIT_ROLE_INFO(
|
||||
ROLE_CODE
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_nm )">,ROLE_NM </if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_pttrn )">,ROLE_PTTRN </if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">,ROLE_DC </if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">,ROLE_TY </if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">,ROLE_SORT </if>
|
||||
,ROLE_CREAT_DE
|
||||
)VALUES(
|
||||
#{role_code }
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_nm )">,#{role_nm }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_pttrn )">,#{role_pttrn }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">,#{role_dc }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">,#{role_ty }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">,#{role_sort }</if>
|
||||
,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
||||
|
||||
<insert id="insertAuthRole" parameterType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
|
||||
/* auth-role-mysql-mapper|insertAuthRole-롤 정보 등록|julim */
|
||||
INSERT
|
||||
INTO xit_role_info (
|
||||
role_code
|
||||
, role_nm
|
||||
, role_pttrn
|
||||
, role_dc
|
||||
, role_ty
|
||||
, role_sort
|
||||
, role_creat_de
|
||||
) VALUES (
|
||||
#{roleCode}
|
||||
, #{roleNm}
|
||||
, #{rolePttrn}
|
||||
, #{roleDc}
|
||||
, #{roleTy}
|
||||
, #{roleSort}
|
||||
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
||||
)
|
||||
</insert>
|
||||
<update id="modifyXitRoleInfo">
|
||||
/** modifyXitRoleInfo */
|
||||
/** 역할정보 수정 */
|
||||
UPDATE XIT_ROLE_INFO
|
||||
SET
|
||||
ROLE_NM = IFNULL(#{role_nm }, ROLE_NM)
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_pttrn )">,ROLE_PTTRN = #{role_pttrn }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_dc )">,ROLE_DC = #{role_dc }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_ty )">,ROLE_TY = #{role_ty }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_sort )">,ROLE_SORT = #{role_sort }</if>
|
||||
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_creat_de)">,ROLE_CREAT_DE = #{role_creat_de}</if>
|
||||
WHERE 1=1
|
||||
AND ROLE_CODE = #{role_code}
|
||||
|
||||
<update id="updateAuthRole" parameterType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
|
||||
/* auth-role-mysql-mapper|updateAuthRole-롤 정보 변경|julim */
|
||||
UPDATE xit_role_info
|
||||
SET role_nm = IF(role_nm = #{roleNm}, role_nm, #{roleNm})
|
||||
, role_pttrn = IF(role_pttrn = #{rolePttrn}, role_pttrn, #{rolePttrn})
|
||||
, role_dc = IF(role_dc = #{roleDc}, role_dc, #{roleDc})
|
||||
, role_ty = IF(role_ty = #{roleTy}, role_ty, #{roleTy})
|
||||
, role_sort = IF(role_sort = #{roleSort}, role_sort, #{roleSort})
|
||||
WHERE role_code = #{roleCode}
|
||||
</update>
|
||||
<delete id="removeXitRoleInfo">
|
||||
/** removeXitRoleInfo */
|
||||
/** 역할정보 삭제 */
|
||||
DELETE FROM XIT_ROLE_INFO
|
||||
WHERE 1=1
|
||||
AND ROLE_CODE = #{role_code}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAuthRole" parameterType="string">
|
||||
/* auth-role-mysql-mapper|deleteAuthRole-롤 정보 삭제|julim */
|
||||
DELETE
|
||||
FROM xit_role_info
|
||||
WHERE role_code = #{roleCode}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue