SqlServer分页工具类
无详细内容 无 public String findArticle(TArticle article, Integer pageNo,Integer pageSize, String sortName, String sortOrder, Integer num) {StringBuffer sql = new StringBuffer("select top 5 a.id,a.title,a.cate_one,m.parent_id,a.cate_two,m.n
public String findArticle(TArticle article, Integer pageNo, Integer pageSize, String sortName, String sortOrder, Integer num) { StringBuffer sql = new StringBuffer( "select top 5 a.id,a.title,a.cate_one,m.parent_id,a.cate_two,m.name as cate_two_name," + "a.content,a.rank,a.check_status,a.check_time,a.creator,a.create_time,a.updator,a.update_time " + "from t_article a left join t_menu m on a.cate_two = m.id"); if (!CommonUtils.isNullOrLessThanOne(pageNo) && !CommonUtils.isNullOrLessThanOne(pageSize)) { int start = (pageNo-1)*pageSize; int limit = pageSize; String tableName = "t_article a left join t_menu m on a.cate_two = m.id"; String fields = "a.id,a.title,a.cate_one,m.parent_id,a.cate_two,m.name as cate_two_name," + "a.content,a.rank,a.check_status,a.check_time,a.creator,a.create_time,a.updator,a.update_time"; StringBuffer filter = new StringBuffer("1 = 1"); if(article != null){ if (StringUtils.hasLength(article.getTitle())) filter.append(" and a.title like '%").append(article.getTitle()) .append("%'"); if (article.getCateOne() != null && article.getCateOne() != 0) filter.append(" and a.cate_one=").append(article.getCateOne()); if (article.getCateTwo() != null && article.getCateTwo() != 0) filter.append(" and a.cate_two=").append(article.getCateTwo()); if (article.getCreator() != null) filter.append(" and a.creator=").append(article.getCreator()); if (article.getCheckStatus() != null){ if(article.getCheckStatus() == -1) filter.append(" and a.check_status in (0,1,2)"); else{ filter.append(" and a.check_status=").append( article.getCheckStatus()); } } } StringBuffer orderBy = new StringBuffer(""); if (StringUtils.hasLength(sortName) && StringUtils.hasLength(sortOrder)) { orderBy.append("a.").append(this.getColumnPropertyMap().get(sortName)) .append(" ").append(sortOrder); } sql = SqlString.getPaginationSql(start,limit,tableName,fields,filter.toString(),orderBy.toString()); }else{ if (article != null) { sql.append(" where 1=1 "); if (StringUtils.hasLength(article.getTitle())) sql.append(" and a.title like '%").append(article.getTitle()) .append("%'"); if (article.getCateOne() != null) sql.append(" and a.cate_one=").append(article.getCateOne()); if (article.getCateTwo() != null) sql.append(" and a.cate_two=").append(article.getCateTwo()); if (article.getCreator() != null) sql.append(" and a.creator=").append(article.getCreator()); if (article.getCheckStatus() != null) sql.append(" and a.check_status=").append( article.getCheckStatus()); } if (StringUtils.hasLength(sortName) && StringUtils.hasLength(sortOrder)) { sql.append(" order by rank desc,") .append(this.getColumnPropertyMap().get(sortName)) .append(" ").append(sortOrder); } } return sql; }

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

推薦的炒幣看行情軟件前十名是:1. OKX,2. Binance,3. Coinbase,4. KuCoin,5. Huobi,6. Crypto.com,7. Kraken,8. Bitfinex,9. Bybit,10. Gate.io。這些app均提供實時的市場數據和交易工具,適合不同層次的用戶使用。

歐易交易所app支持蘋果手機下載,訪問官網,點擊“蘋果手機”選項,在App Store中獲取並安裝,註冊或登錄後即可進行加密貨幣交易。

比特幣的價格在20,000到30,000美元之間。 1. 比特幣自2009年以來價格波動劇烈,2017年達到近20,000美元,2021年達到近60,000美元。 2. 價格受市場需求、供應量、宏觀經濟環境等因素影響。 3. 通過交易所、移動應用和網站可獲取實時價格。 4. 比特幣價格波動性大,受市場情緒和外部因素驅動。 5. 與傳統金融市場有一定關係,受全球股市、美元強弱等影響。 6. 長期趨勢看漲,但需謹慎評估風險。

靠谱的数字货币交易平台推荐:1. OKX,2. Binance,3. Coinbase,4. Kraken,5. Huobi,6. KuCoin,7. Bitfinex,8. Gemini,9. Bitstamp,10. Poloniex,这些平台均以其安全性、用户体验和多样化的功能著称,适合不同层次的用户进行数字货币交易

選擇合規安全的比特幣交易平台需評估其監管許可、KYC/AML政策和安全措施,推薦Binance、OKX和gate.io三大平台。

Gate.io通過MeMebox 2.0實現了從現貨交易向鏈上生態的轉型。 1) 構建跨鏈基礎設施,支持12條主鏈互通;2) 打造DeFi應用生態,提供一站式服務;3) 實施激勵機制,重構價值分配。

使用C 中的chrono庫可以讓你更加精確地控制時間和時間間隔,讓我們來探討一下這個庫的魅力所在吧。 C 的chrono庫是標準庫的一部分,它提供了一種現代化的方式來處理時間和時間間隔。對於那些曾經飽受time.h和ctime折磨的程序員來說,chrono無疑是一個福音。它不僅提高了代碼的可讀性和可維護性,還提供了更高的精度和靈活性。讓我們從基礎開始,chrono庫主要包括以下幾個關鍵組件:std::chrono::system_clock:表示系統時鐘,用於獲取當前時間。 std::chron
