JPA专用
1. jpa 中的isnull替代方法:coalesce
@Query(value = "select coalesce(max (matter.matterIndex),'0') from AuditMatters matter where matter.parent.id = :parentId ")
String createMatterIndex(@Param("parentId") Long parentId);
@Query(value = "select coalesce(max (matter.matterIndex),'0') from AuditMatters matter where matter.parent.id is null")
String createMatterIndex();
浙公网安备 33010602011771号