class ElasticSearchNotifyHistoryRepository implements NotifyHistoryRepository {

    public static final String INDEX_NAME = "notify_history";

    private final ElasticSearchService elasticSearchService;
    private final ElasticSearchIndexManager indexManager;

    @PostConstruct
    public void init() {
        indexManager
            .putIndex(
                new DefaultElasticSearchIndexMetadata(INDEX_NAME)
                    .addProperty("id", StringType.GLOBAL)
                    .addProperty("notifyTime", DateTimeType.GLOBAL)
                //其他字段默认都是string
            )
            .block(Duration.ofSeconds(10));
    }

    @Subscribe("/notify/**")
    @Transactional(propagation = Propagation.NEVER)
    public Mono<Void> handleNotify(SerializableNotifierEvent event) {
        return elasticSearchService
            .commit(INDEX_NAME, NotifyHistory.of(event).toJson());
    }


    @Override
    public Mono<PagerResult<NotifyHistory>> queryPager(QueryParamEntity param) {<FILL_FUNCTION_BODY>}
}

        return elasticSearchService
            .queryPager(INDEX_NAME, param, map -> {
                NotifyHistory history = FastBeanCopier.copy(map, new NotifyHistory(),"context");
                history.setContext(JSON.parseObject((String) map.getOrDefault("context", "{}")));
                return history;
            });
    
<no_super_class>