feat: company on emails and audit search

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-11-30 19:21:21 +08:00
1 parent a6996841ac
commit 118c57c0ea
6 files changed
+147 -4

No files matched your search

@@ -22,6 +22,8 @@ public class Email implements Cloneable{
private String sender = EmailConstant.EMAIL_SENDER;
private String subject;
private String body;
/** Null for system emails with no company (visible to super admins only). */
private Long companyId;
@Column(updatable = false)
private LocalDateTime datetime = LocalDateTime.now();
@@ -59,6 +59,10 @@ public class EmailRepositoryImpl implements JpaRepositoryCustom<Email>{
predicates.add(cb.equal(root.get(k), Long.parseLong(value)));
predicatesCount.add(cb.equal(rootCount.get(k), Long.parseLong(value)));
}
case "companyId" -> {
predicates.add(cb.equal(root.get(k), Long.parseLong(value)));
predicatesCount.add(cb.equal(rootCount.get(k), Long.parseLong(value)));
}
case "sender" -> {
predicates.add(cb.like(root.get(k), "%" + value + "%"));
predicatesCount.add(cb.like(rootCount.get(k), "%" + value + "%"));