刘光辉
昨天 bb638871a7fb692d80f1b7a758f991dc0879002c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package jnpf.bizcommon.audit.mapper;
 
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import jnpf.bizcommon.audit.entity.AuditEventEntity;
import jnpf.bizcommon.audit.entity.model.AuditOperationGroupRow;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * 审计事件查询侧自定义 Mapper:按 operationId 分页 + 关联物理事件 + 时间线。与 Task 4 的
 * {@link AuditEventMapper}(写入侧 insertIgnore)职责分离,避免相互影响。
 *
 * fieldDiffs 合并已在写入侧完成;查询层仅建立 BUSINESS 主行与签名事件的关联。
 */
public interface AuditQueryMapper {
 
    List<AuditOperationGroupRow> selectOperationPage(@Param(Constants.WRAPPER) Wrapper<AuditEventEntity> ew,
                                                     @Param("offset") long offset,
                                                     @Param("size") long size);
 
    long countOperations(@Param(Constants.WRAPPER) Wrapper<AuditEventEntity> ew);
 
    List<AuditEventEntity> selectByOperationGids(@Param("gids") List<String> gids);
 
    /** 时间线分组种子:按 targetId、数据库自增 id 正序,调用方传入 LIMIT 常量(spec:500)。 */
    List<AuditEventEntity> selectTimeline(@Param("targetId") String targetId, @Param("limit") int limit);
}