根据用户名或者身份证或手机号码来登录

<select id="checkLogin" resultMap="BaseResultMap">

    SELECT <include refid="sql"/> FROM user
     where password = #{password}
     
     <if test="name!=null and name!=‘‘">
        and name = #{name}
     </if> 
     <if test="name!=null and name!=‘‘">
        or tel = #{name}
     </if> 
     <if test="name!=null and name!=‘‘">
        or identify = #{name}
     </if> 
     
    
    </select>

 

根据用户名或者身份证或手机号码来登录

上一篇:C++类的六大函数--构造、析构、拷贝构造、移动构造、拷贝赋值、移动赋值


下一篇:COMP3331/9331 Computer Networks and Applications