programming/spring_security

ibatis 쿼리 순서

labj 2017. 6. 25. 15:21


<!-- auth grp cd 목록 -->

<select id="authGrpCd"  parameterClass="java.util.Map" resultClass="hashmap">

<![CDATA[

select auth_grp_cd, auth_grp_nm, auth_type from auth_grp

where use_yn = 'Y'

order by app_gubun asc

]]>

</select>



@SuppressWarnings("unchecked")

@Override

public List<HashMap<String,Object>> getAuthGrpCdList(Map<String, Object> condition) throws Exception {

return (List<HashMap<String,Object>>)sqlMap.queryForList("admin.authGrpCd",condition);

}


public List<HashMap<String,Object>> getAuthGrpCdList(Map<String, Object> condition) throws Exception {

return adminDao.getAuthGrpCdList(condition);

}



// auth grp cd 목록 가져오기

List<HashMap<String, Object>> authGrpCdList = adminService.getAuthGrpCdList(condition);




<c:set var="authGrpCd_sel" value="${authGrpCd_sel}" />

<c:forEach items="${authGrpCdList}" var="authGrpCd">

<option value="${authGrpCd.auth_grp_cd}"  <c:if test="${auth_grp_cd eq authGrpCd.auth_grp_cd}" >selected="selected"</c:if> >${authGrpCd.auth_grp_nm}</option>

</c:forEach>