Newer
Older
huludao / src / main / resources / mapper / NfUserInfoDao.xml
<?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.newfiber.api.pc.dao.newmonitoring.NfUserInfoDao">
    <resultMap id="baseMap" type="com.newfiber.api.pc.model.monitor.NfUserInfo">
        <id property="id" column="id" jdbcType="VARCHAR"/>
        <result property="userName" column="User_Name" jdbcType="NVARCHAR"/>
        <result property="userNo" column="User_No" jdbcType="VARCHAR"/>
        <result property="password" column="Password" jdbcType="VARCHAR"/>
        <result property="level" column="Level" jdbcType="INTEGER"/>
        <result property="tel" column="Tel" jdbcType="VARCHAR"/>
        <result property="mobile" column="mobile" jdbcType="VARCHAR"/>
        <result property="userEmail" column="user_email" jdbcType="VARCHAR"/>
    </resultMap>
    <select id="getUserInfo" resultType="com.newfiber.api.pc.model.monitor.NfUserInfo" parameterType="java.lang.String">
        select id,real_name realName,role_id as roleId, user_account as userNo, user_email as userEmail, mobile from nf_monitor.om_user where 1=1
        <if test="userNo!=null">
            and user_account=#{userNo}
        </if>
    </select>
    <select id="getUserInfoByMobile" resultType="com.newfiber.api.pc.model.monitor.NfUserInfo" parameterType="java.lang.String">
        select id,real_name realName,role_id as roleId, user_account as userNo, user_email as userEmail, mobile from nf_monitor.om_user where 1=1
        <if test="mobile!=null">
            and mobile=#{mobile}
        </if>
    </select>
    <select id="getUserInfoById" resultType="com.newfiber.api.pc.model.monitor.NfUserInfo">
        select id,real_name realName,user_account userName,role_id as roleId  from nf_monitor.om_user where 1=1
        <if test="id!=null">
            and id=#{id}
        </if>
    </select>

    <!--<insert id="addUserInfo" parameterType="com.xf.monitor.model.UserInfo">
        insert into xf_sys_user(id,User_Name,User_No,Password,Level,Tel)
         VALUES (#{id},#{userName},#{userNo},#{password},#{level},#{tel})
    </insert>-->

    <!--<delete id="deleteUser" parameterType="java.lang.String">
        DELETE from xf_sys_user WHERE User_No IN
        <foreach collection="userNos" item="userNo" open="(" close=")" separator=",">
            #{userNo}
        </foreach>
    </delete>-->

    <!--<update id="updateUserInfo" parameterType="com.xf.monitor.model.UserInfo">
        UPDATE xf_sys_user
        <trim prefix="set" suffixOverrides=",">
            <if test="userName != null">
                User_Name = #{userName},
            </if>
            <if test="password != null">
                Password = #{password},
            </if>
            <if test="level != null">
                Level = #{level},
            </if>
            <if test="tel != null">
                Tel = #{tel},
            </if>
        </trim>
        WHERE User_No = #{userNo}
    </update>-->

    <!--<select id="getUserInfoList" parameterType="com.xf.monitor.model.UserInfo" resultMap="baseMap">
        select Id,User_Name,User_No,Password,Level,Tel FROM xf_sys_user
         <where>
             <if test="level != null and level != 1">
                 Level = #{level}
             </if>
             <if test="userNo != null">
                 and User_No = #{userNo}
             </if>
             <if test="password != null">
                 and Password = #{password}
             </if>
         </where>
         ORDER by Id
         <if test="startPage != null">
             offset #{startPage} row fetch next #{pageSize} row only
         </if>
    </select>-->

<!--    <select id="getUserInfo" parameterType="java.lang.String" resultMap="baseMap">-->
<!--        select Id,User_Name,User_No,Password,Level,Tel FROM xf_sys_user WHERE id = #{id}-->
<!--    </select>-->

<!--    <select id="getUserInfoByNo" parameterType="java.lang.String" resultMap="baseMap">-->
<!--        select Id,User_Name,User_No,Password,Level,Tel FROM xf_sys_user WHERE User_No = #{userNo}-->
<!--    </select>-->
<!--    <insert id="addLoginLog" >-->
<!--        INSERT INTO user_login_log(userNo,loginTime,remark) VALUES (#{userNo},NOW(),#{remark})-->
<!--    </insert>-->
</mapper>