💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 一、简单统计 根据方法名来自动生成 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); ```