<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 組件源碼 ``` /** * <b>方法描述:</b> 查詢(分頁) <br/> * <b>創建者:</b> admin <br/> * <b>創建時間:</b> 2020-09-14 17:34:28 <br/> * * @param poolName * 入參|數據源名稱|{@link java.lang.String} * @param className * 入參|執行操作類名|{@link java.lang.String} * @param size * 入參|每頁條數(默認10)|long * @param current * 入參|頁碼(默認1)|long * @param entity * 入參|條件|{@link com.baomidou.mybatisplus.extension.activerecord.Model} * @param isSearchCount * 入參|進行count查詢(默認true)|{@link boolean} * @param ascs * 入參|排序數組(正序)|{@link java.util.List} * @param descs * 入參|排序數組(倒序)|{@link java.util.List} * @param page * 出參|分頁對象|{@link com.baomidou.mybatisplus.core.metadata.IPage} * @return -1 異常<br/> * 0 失敗<br/> * 1 成功<br/> */ @Component(label = "查詢(分頁)", style = "判斷型", type = "同步組件", comment = "根據條件查詢進行分頁查詢", version = "1.0.0", deprecated = false, author = "admin", date = "2020-09-14 05:34:28") @InParams(param = {@Param(name = "poolName", comment = "數據源名稱", type = java.lang.String.class), @Param(name = "className", comment = "執行操作類名", type = java.lang.String.class), @Param(name = "size", comment = "每頁條數(默認10)", type = Long.class), @Param(name = "current", comment = "頁碼(默認1)", type = Long.class), @Param(name = "entity", comment = "條件", type = com.baomidou.mybatisplus.extension.activerecord.Model.class), @Param(name = "isSearchCount", comment = "進行count查詢(默認true)", type = Boolean.class), @Param(name = "ascs", comment = "排序數組(正序)", type = java.util.List.class), @Param(name = "descs", comment = "排序數組(倒序)", type = java.util.List.class)}) @OutParams( param = {@Param(name = "page", comment = "分頁對象", type = com.baomidou.mybatisplus.core.metadata.IPage.class)}) @Returns( returns = {@Return(id = "-1", desp = "異常"), @Return(id = "0", desp = "失敗"), @Return(id = "1", desp = "成功")}) @Order(value = 2) public static ResultBase P_selectPage(String poolName, String className, Long size, Long current, Model entity, Boolean isSearchCount, List ascs, List descs) { try { AppLog.debug("根據 分頁 查詢數據 組件參數:poolName={},className={},map={}", poolName, className, entity); if (StringUtil.isEmpty(className)) { return ResultBase.newFailureResult("TPTD0001", "參數錯誤:執行類參數【className】不能為空"); } setDatasource(poolName); Object maper = BundleUtil.getService(className); if (maper == null) { return ResultBase.newFailureResult("TPTD0010", "錯誤:當前環境未找到[" + className + "]的可用數據庫操作Mapper 實例"); } Method method = getMethod(maper.getClass(), className, MybatisPlusMapperMehtod.selectPage); if (method != null) { AppLog.debug("開始執行相應的Mapper 方法"); Page page = new Page(); if (size != null) page.setSize(size); if (current != null) page.setCurrent(current); if (isSearchCount != null) page.setSearchCount(isSearchCount); if (CollectionUtil.isNotEmpty(ascs)) page.setAscs(ascs); if (CollectionUtil.isNotEmpty(descs)) page.setDescs(descs); method.invoke(maper, page, Wrappers.update(entity)); AppLog.debug("page={}",JSONUtil.toJsonStr(page)); return ResultBase.newSuccessResult(page); } } catch (Exception e) { AppLog.error(e); return ResultBase.newExceptionResult("TPTD0003", "方法調用錯誤,類:" + className + "調用:" + MybatisPlusMapperMehtod.selectPage + " 方法錯誤" + AppLog.errorMsg(e)); } return ResultBase.newFailureResult("TPTD0004", "方法調用錯誤,類:" + className + "沒有可執行方法:" + MybatisPlusMapperMehtod.selectPage); } ``` # 交易中組件使用方式 ![](https://img.kancloud.cn/49/4f/494f5f30ac4978004486718c08a500ed_1867x894.png) # 參數說明及示例 ## 入口參數 數據源名稱:使用的數據源名稱,可以為空 執行操作類名:執行 SQL 語句的類,示例: `"data.test.test.mapper.TUserMapper"` 每頁條數(默認10):每頁顯示的數量,為空時為默認值 頁碼(默認1):顯示第幾頁的記錄,為空時為默認值 條件:傳入一個實體對象當做查詢條件,為空時查詢全部 進行count查詢(默認true):是否進行統計有多少條數據 排序數組(正序):以傳入的數據庫字段值進行排序,示例: `["name"]` 排序數組(倒序):以傳入的數據庫字段值進行排序,示例: `["id"]` ## 出口參數 分頁對象:根據輸入參數進行分頁查詢,得到分頁對象,示例: `__INNER__["list"]` > 當交易部署到微服務上時,數據源在微服務界面上配置。
                  <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>

                              哎呀哎呀视频在线观看