企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 一、简单统计 根据方法名来自动生成 SQL,例如: ``` long countByOpenIdAndStatus ``` ## 二、自定义语句(JPQL) ``` @Query("select count(staff) from SysStaff staff where exists (select 1 from SysStaffInvitation siv where siv.staffId=staff.staffId and siv.fromStaffId=?1 and staff.createTime like ?2% )") Integer getInvitedSysStaffListCountOfTotal(long staffId, String invitationTime); @Query("select count(staff) from SysStaff staff where exists (select 1 from SysStaffInvitation siv where siv.staffId=staff.staffId and siv.fromStaffId=?1 and staff.createTime like ?2% ) and exists (select 1 from SysStaffSetting sss where sss.staffId=staff.staffId and sss.=?3 )") Integer getInvitedSysStaffListCountOf(long staffId, String invitationTime, long identityId); ```