<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 1. sql參數位置與方法位置對應 Dao層的方法 ~~~ Public User selectUser(String name,String password); ~~~ 對應的Mapper.xml ~~~ <select id="selectUser" resultMap="BaseResultMap"> select * from user_user_t where user_name = #{0} and user_password=#{1} </select> ~~~ Dao接口名與select標簽的id屬性值向對應,#{0}獲取第一個參數,#{1}獲取第二個參數 ## 2. 通過map傳遞 該方法采用Map傳多參數,map的key對應SQL參數(SQL使用map中的key接受接口傳來的參數) Dao層的方法 ~~~ Public User selectUser(Map paramMap); ~~~ 對應的Mapper.xml ~~~ <select id=" selectUser" resultMap="BaseResultMap"> select * from user_user_t where user_name = #{userName,jdbcType=VARCHAR} and user_password=#{userPassword,jdbcType=VARCHAR} </select> ~~~ Service層調用 ~~~ public User xxxSelectUser(){ Map paramMap=new hashMap(); paramMap.put(“userName”,”對應具體的參數值”); paramMap.put(“userPassword”,”對應具體的參數值”); User user=xxx. selectUser(paramMap);} ~~~ ## 3. @param @param在接口參數列表中使用,用于指定SQL對應的參數,通過給參數命名,讓SQL通過這個名詞,正確獲取數值,例如: @param(“userName”)String name 將參數name命名為userName,此時SQL語句在 ` select * from user_user_t where user_name = #{userName,jdbcType=VARCHAR} `中通過 `#{userName`引用參數。 Dao層的方法 ~~~ Public User selectUser(@param(“userName”)String name,@param(“userpassword”)String password); ~~~ 對應的Mapper.xml ~~~ <select id=" selectUser" resultMap="BaseResultMap"> select * from user_user_t where user_name = #{userName,jdbcType=VARCHAR} and user_password=#{userPassword,jdbcType=VARCHAR} </select> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看