refactor : 로그인정책 관련 컬럼명 변경

main
이범준 2 years ago
parent 10f6573393
commit d3af060732

@ -21,9 +21,9 @@ public class XitLoginPolicyVO extends BaseVO {
protected String user_id; //사용자 id
protected String ip_info; //ip 정보
protected String ip_addr; //ip 정보
protected String dplct_yn; //중복 허용 여부
protected String lmtt_yn; //제한 여부
protected String limit_yn; //제한 여부
protected String reg_dt; //최초 등록 시점
protected String rgtr; //최초 등록자 id
protected String mdfcn_dt; //최종 수정 시점
@ -35,11 +35,11 @@ public class XitLoginPolicyVO extends BaseVO {
public void setUser_id(String user_id) {
this.user_id = user_id;
}
public String getIp_info() {
return ip_info;
public String getIp_addr() {
return ip_addr;
}
public void setIp_info(String ip_info) {
this.ip_info = ip_info;
public void setIp_addr(String ip_addr) {
this.ip_addr = ip_addr;
}
public String getDplct_yn() {
return dplct_yn;
@ -47,11 +47,11 @@ public class XitLoginPolicyVO extends BaseVO {
public void setDplct_yn(String dplct_yn) {
this.dplct_yn = dplct_yn;
}
public String getLmtt_yn() {
return lmtt_yn;
public String getLimit_yn() {
return limit_yn;
}
public void setLmtt_yn(String lmtt_yn) {
this.lmtt_yn = lmtt_yn;
public void setLimit_yn(String limit_yn) {
this.limit_yn = limit_yn;
}
public String getReg_dt() {
return reg_dt;

@ -72,9 +72,9 @@ public class XitLoginServiceBean extends AbstractServiceBean implements XitLogin
loginPolicyVO.setUser_id(loginVO.getId());
loginPolicyVO = xitFrameCrudService.findXitLoginPolicy(loginPolicyVO);
if (XitCmmnUtil.notEmpty(loginPolicyVO)) {
if ("Y".equals(loginPolicyVO.getLmtt_yn())) {
if ("Y".equals(loginPolicyVO.getLimit_yn())) {
String userIp = XitCmmnUtil.getClientIpAddr(XitHttpRequestHelper.getCurrentRequest()); // 사용자의 접속IP
if (!userIp.equals(loginPolicyVO.getIp_info())) {
if (!userIp.equals(loginPolicyVO.getIp_addr())) {
throw new RuntimeException(String.format("접속하신 아이피(%s)가 등록된 아이피와 일치하지 않습니다.", userIp));
}
}

@ -33,7 +33,7 @@ public class XitLoginPolicyMngVO extends BaseVO {
/**
* IP
*/
private String ipInfo;
private String ipAddr;
/**
*
*/
@ -41,7 +41,7 @@ public class XitLoginPolicyMngVO extends BaseVO {
/**
*
*/
private String lmttYn;
private String limitYn;
/**
* ID
*/
@ -92,16 +92,16 @@ public class XitLoginPolicyMngVO extends BaseVO {
this.emplyrSe = emplyrSe;
}
/**
* @return the ipInfo
* @return the ipAddr
*/
public String getIpInfo() {
return ipInfo;
public String getIpAddr() {
return ipAddr;
}
/**
* @param ipInfo the ipInfo to set
* @param ipAddr the ipAddr to set
*/
public void setIpInfo(String ipInfo) {
this.ipInfo = ipInfo;
public void setIpAddr(String ipAddr) {
this.ipAddr = ipAddr;
}
/**
* @return the dplctYn
@ -116,16 +116,16 @@ public class XitLoginPolicyMngVO extends BaseVO {
this.dplctYn = dplctYn;
}
/**
* @return the lmttYn
* @return the limitYn
*/
public String getLmttYn() {
return lmttYn;
public String getLimitYn() {
return limitYn;
}
/**
* @param lmttYn the lmttYn to set
* @param limitYn the limitYn to set
*/
public void setLmttYn(String lmttYn) {
this.lmttYn = lmttYn;
public void setLimitYn(String limitYn) {
this.limitYn = limitYn;
}
/**
* @return the userId

@ -127,9 +127,9 @@ public class XitLoginPolicyMngServiceBean extends AbstractServiceBean implements
private XitLoginPolicyVO convertToCrudVO(XitLoginPolicyMngVO vo) {
XitLoginPolicyVO crudVO = new XitLoginPolicyVO();
crudVO.setUser_id(vo.getEmplyrId()); //사용자 id
crudVO.setIp_info(vo.getIpInfo()); //ip 정보
crudVO.setIp_addr(vo.getIpAddr()); //ip 정보
crudVO.setDplct_yn(vo.getDplctYn()); //중복 허용 여부
crudVO.setLmtt_yn(vo.getLmttYn()); //제한 여부
crudVO.setLimit_yn(vo.getLimitYn()); //제한 여부
return crudVO;
}

@ -1568,9 +1568,9 @@
/** findXitLoginPolicys */
/** 로그인정책 다건 조회 */
SELECT USER_ID
,IP_INFO
,IP_ADDR
,DPLCT_YN
,LMTT_YN
,LIMIT_YN
,REG_DT
,RGTR
,MDFCN_DT
@ -1578,9 +1578,9 @@
FROM XIT_LOGIN_POLICY
WHERE 1=1
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(user_id )">AND USER_ID = #{user_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ip_info )">AND IP_INFO = #{ip_info }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ip_addr )">AND IP_ADDR = #{ip_addr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(dplct_yn )">AND DPLCT_YN = #{dplct_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(lmtt_yn )">AND LMTT_YN = #{lmtt_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(limit_yn )">AND LIMIT_YN = #{limit_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(reg_dt)">AND REG_DT = #{reg_dt}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(rgtr )">AND RGTR = #{rgtr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mdfcn_dt )">AND MDFCN_DT = #{mdfcn_dt }</if>
@ -1590,9 +1590,9 @@
/** findXitLoginPolicy */
/** 로그인정책 조회 */
SELECT USER_ID
,IP_INFO
,IP_ADDR
,DPLCT_YN
,LMTT_YN
,LIMIT_YN
,REG_DT
,RGTR
,MDFCN_DT
@ -1606,9 +1606,9 @@
/** 로그인정책 등록 */
INSERT INTO XIT_LOGIN_POLICY(
USER_ID
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ip_info )">,IP_INFO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ip_addr )">,IP_ADDR </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(dplct_yn )">,DPLCT_YN </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(lmtt_yn )">,LMTT_YN </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(limit_yn )">,LIMIT_YN </if>
,REG_DT
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(rgtr )">,RGTR </if>
,MDFCN_DT
@ -1616,9 +1616,9 @@
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(rgtr )">,MDFR </if>
)VALUES(
#{user_id }
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ip_info )">,#{ip_info }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ip_addr )">,#{ip_addr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(dplct_yn )">,#{dplct_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(lmtt_yn )">,#{lmtt_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(limit_yn )">,#{limit_yn }</if>
,NOW()
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(rgtr )">,#{rgtr }</if>
,NOW()
@ -1632,9 +1632,9 @@
UPDATE XIT_LOGIN_POLICY
SET
MDFCN_DT = NOW()
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(ip_info )">,IP_INFO = #{ip_info }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(ip_addr )">,IP_ADDR = #{ip_addr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(dplct_yn )">,DPLCT_YN = #{dplct_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(lmtt_yn )">,LMTT_YN = #{lmtt_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(limit_yn )">,LIMIT_YN = #{limit_yn }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(reg_dt)">,REG_DT = #{reg_dt}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(rgtr )">,RGTR = #{rgtr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(mdfr )">,MDFR = #{mdfr }</if>

@ -15,9 +15,9 @@
SELECT A.USER_ID AS "emplyrId"
,A.USER_NM AS "emplyrNm"
,A.USER_SE AS "emplyrSe"
,B.IP_INFO AS "ipInfo"
,B.IP_ADDR AS "ipAddr"
,B.DPLCT_YN AS "dplctYn"
,B.LMTT_YN AS "lmttYn"
,B.LIMIT_YN AS "limitYn"
,B.MDFR AS "userId"
,B.MDFCN_DT AS "regDate"
,CASE B.USER_ID WHEN NULL THEN 'N' ELSE 'Y' END AS "regYn"

@ -7,7 +7,7 @@
<formset>
<form name="loginPolicy">
<field property="ipInfo" depends="required, maxlength">
<field property="ipAddr" depends="required, maxlength">
<arg0 key="IP정보" resource="false"/>
<arg1 key="23" resource="false"/>
<var>
@ -15,7 +15,7 @@
<var-value>23</var-value>
</var>
</field>
<field property="lmttYn" depends="required">
<field property="limitYn" depends="required">
<arg0 key="IP제한여부" resource="false"/>
</field>
</form>

@ -44,16 +44,16 @@
<th width="20%" scope="row" nowrap="nowrap">
<label class="required">IP정보</label>
</th>
<td nowrap="nowrap"><input name="ipInfo" id="ipInfo" title="IP정보" type="text" value="<c:out value='${loginPolicy.ipInfo}'/>" maxLength="23" size="30" >&nbsp;<form:errors path="ipInfo" /></td>
<td nowrap="nowrap"><input name="ipAddr" id="ipAddr" title="IP정보" type="text" value="<c:out value='${loginPolicy.ipAddr}'/>" maxLength="23" size="30" >&nbsp;<form:errors path="ipAddr" /></td>
</tr>
<tr>
<th width="20%" scope="row" nowrap="nowrap">
<label class="required">IP제한여부</label>
</th>
<td nowrap="nowrap">
<select name="lmttYn" id="lmttYn" title="IP제한여부">
<option value="Y" <c:if test="${loginPolicy.lmttYn == 'Y'}">selected</c:if> >Y</option>
<option value="N" <c:if test="${loginPolicy.lmttYn == 'N'}">selected</c:if> >N</option>
<select name="limitYn" id="limitYn" title="IP제한여부">
<option value="Y" <c:if test="${loginPolicy.limitYn == 'Y'}">selected</c:if> >Y</option>
<option value="N" <c:if test="${loginPolicy.limitYn == 'N'}">selected</c:if> >N</option>
</select>
(Y로 설정되면 등록된 IP에서의 접속만을 허용하도록 제한됨)
</td>
@ -231,7 +231,7 @@
switch(flag){
case 'ip' : //아이피
var varFrom = document.loginPolicy;
var IPvalue = varFrom.ipInfo.value;
var IPvalue = varFrom.ipAddr.value;
var ipPattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var ipArray = IPvalue.match(ipPattern);

@ -43,17 +43,17 @@
<th width="20%" scope="row" nowrap="nowrap">
<label class="required">IP정보</label>
</th>
<td nowrap="nowrap"><input name="ipInfo" id="ipInfo" title="IP정보" type="text" maxLength="23" size="30" >&nbsp;<form:errors path="ipInfo" /></td>
<td nowrap="nowrap"><input name="ipAddr" id="ipAddr" title="IP정보" type="text" maxLength="23" size="30" >&nbsp;<form:errors path="ipAddr" /></td>
</tr>
<tr>
<th width="20%" scope="row" nowrap="nowrap">
<label class="required">IP제한여부</label>
</th>
<td nowrap="nowrap">
<select name="lmttYn" id="lmttYn" title="IP제한여부">
<select name="limitYn" id="limitYn" title="IP제한여부">
<option value="Y">Y</option>
<option value="N">N</option>
</select>&nbsp;<form:errors path="lmttYn" />
</select>&nbsp;<form:errors path="limitYn" />
(Y로 설정되면 등록된 IP에서의 접속만을 허용하도록 제한됨)
</td>
</tr>
@ -186,7 +186,7 @@
switch(flag){
case 'ip' : //아이피
var varFrom = document.loginPolicy;
var IPvalue = varFrom.ipInfo.value;
var IPvalue = varFrom.ipAddr.value;
var ipPattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var ipArray = IPvalue.match(ipPattern);

@ -268,14 +268,14 @@ GridConfig.setOptColumns([ //Grid 컬럼 정보(명칭,매핑 field, 기타옵
},
{
header: 'IP정보',
name: 'ipInfo',
name: 'ipAddr',
minWidth: 200,
sortable: false,
align: 'center'
},
{
header: '제한여부',
name: 'lmttYn',
name: 'limitYn',
minWidth: 60,
sortable: false,
align: 'center'

@ -232,8 +232,8 @@ function press() {
</form>
</td>
<td nowrap="nowrap"><c:out value="${loginPolicy.emplyrNm}"/></td>
<td nowrap="nowrap"><c:out value="${loginPolicy.ipInfo}"/></td>
<td nowrap="nowrap"><c:if test="${loginPolicy.lmttYn == 'Y'}">Y</c:if><c:if test="${loginPolicy.lmttYn == 'N'}">N</c:if></td>
<td nowrap="nowrap"><c:out value="${loginPolicy.ipAddr}"/></td>
<td nowrap="nowrap"><c:if test="${loginPolicy.limitYn == 'Y'}">Y</c:if><c:if test="${loginPolicy.limitYn == 'N'}">N</c:if></td>
</tr>
</c:forEach>
</tbody>

Loading…
Cancel
Save