<?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.zjrs.zwnw.portal.entity.LdUserMapper">
    <select id="getCurrenttime" resultType="String">
        select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual
    </select>
    <select id="queryPasswordByloginid" parameterType="String" resultType="HashMap">
        select PASSWORD,nvl(PASENCFLAG,'0') PASENCFLAG from s_u_user where LOGINID =#{loginid} and rownum=1
    </select>
    <select id="queryLdUser" parameterType="String" resultType="HashMap">
        select LOGINID,PASSWORD,USERNAME,nvl(PASENCFLAG,'0') PASENCFLAG from s_u_user where loginid in(select LD_LOGINID from v_s_sg_user_ex where id=#{id}) and rownum=1
    </select>

    <select id="checkBind" parameterType="com.zjrs.zwnw.portal.dto.LdUserDTO" resultType="String">
        select a.USER_NAME USERNAME from s_sg_user a,s_sg_user_ex b
        where a.id=b.id and a.id &lt;&gt; #{ dto.userid } and b.ld_loginid= #{ dto.loginid } and rownum=1
    </select>

</mapper>
