提交 739d3012 authored 作者: Whispa's avatar Whispa

commit

上级 968244ec
......@@ -8,8 +8,10 @@ import org.springframework.data.repository.query.Param;
import java.util.List;
public interface TbCfExpressTemplateRepository extends PagingAndSortingRepository<TbCfExpressTemplate,String> {
@Query(value = "select distinct a from #{#entityName} a WHERE a.templateId in (SELECT x.templateId FROM TbCfExpTemKeyword x WHERE x.keyword LIKE concat('%',:keyword,'%') or x.enkeyword LIKE concat('%',:keyword,'%'))")
@Query(value = "select distinct t2 from #{#entityName} t2 left join TbCfExpTemKeyword t1 on t1.templateId=t2.templateId" +
" where t1.keyword LIKE concat('%',:keyword,'%') or t1.enkeyword LIKE concat('%',:keyword,'%')")
List<TbCfExpressTemplate> getTemplateByKeyword(@Param("keyword") String keyword);
TbCfExpressTemplate findFirstByOrderByTemplateIdAsc();
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论