1. 程式人生 > >mybatis-plus sql語句拼接

mybatis-plus sql語句拼接

mybatis-plus可呼叫的方法:

查詢方式 說明 setSqlSelect 設定 SELECT 查詢欄位 where WHERE 語句,拼接 + WHERE 條件 and AND 語句,拼接 + AND 欄位=值 andNew AND 語句,拼接 + AND (欄位=值) or OR 語句,拼接 + OR 欄位=值 orNew OR 語句,拼接 + OR (欄位=值) eq 等於= allEq 基於 map 內容等於= ne 不等於<> gt 大於> ge 大於等於>= lt 小於< le 小於等於<= like 模糊查詢 LIKE notLike 模糊查詢 NOT LIKE in IN 查詢 notIn NOT IN 查詢 isNull NULL 值查詢 isNotNull IS NOT NULL groupBy 分組 GROUP BY having HAVING 關鍵詞 orderBy 排序 ORDER BY orderAsc ASC 排序 ORDER BY orderDesc DESC 排序 ORDER BY exists EXISTS 條件語句 notExists NOT EXISTS 條件語句 between BETWEEN 條件語句 notBetween NOT BETWEEN 條件語句 addFilter 自由拼接 SQL last 拼接在最後,例如:last(“LIMIT 1”)