<?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.style24.scm.biz.dao.TssSystemDao">

	<!-- 사용자 조회 -->
	<select id="getUser" parameterType="Integer" resultType="User">
		/* TssSystem.getUser */
		SELECT USER_NO                                                         /*사용자번호*/
		     , USER_ID                                                         /*사용자ID*/
		     , USER_NM                                                         /*사용자명*/
		     , ROLE_CD                                                         /*권한코드*/
		     , (SELECT CD_NM
		        FROM   TB_COMMON_CODE
		        WHERE  CD_GB = 'G001'
		        AND    CD = A.ROLE_CD
		       )                                              AS ROLE_NM       /*권한명*/
		     , ROLE_REF_VAL                                                    /*권한관련값*/
		     , EMAIL                                                           /*이메일*/
		     , CELL_PHNNO                                                      /*휴대전화번호*/
		     , PNT_ASSIGN_AMT                                                  /*포인트부여가능금액*/
		     , IP_ADDR                                                         /*IP주소*/
		     , IP_CHK_YN                                                       /*IP체크여부*/
		     , DATE_FORMAT(LOGIN_LDT,'%Y-%m-%d %H:%i:%S')     AS LOGIN_LDT     /*최종로그인일시*/
		     , DATE_FORMAT(PASSWD_CHG_DT,'%Y-%m-%d %H:%i:%S') AS PASSWD_CHG_DT /*비밀번호변경일시*/
		     , USE_YN                                                          /*사용여부*/
		FROM   TB_USER A
		WHERE  USER_NO = #{userNo}
	</select>


</mapper>