1. 程式人生 > >data jpa擴充套件支援動態sql

data jpa擴充套件支援動態sql

-- findByContent
  SELECT * FROM t_sample WHERE 1 = 1
  <#if content??>
        AND content LIKE :content
  </#if>

--countContent
SELECT count(*) FROM t_sample WHERE 1 = 1
<#if content??>
  AND content LIKE :content
</#if>

--findDtos
SELECT id, content as contentShow FROM t_sample

--findByTemplateQueryObject
SELECT * FROM t_sample WHERE 1 = 1
<#if content??>
 AND content LIKE :content
</#if>

--findMap
SELECT * FROM t_sample