class AlarmRecordService extends GenericReactiveCrudService<AlarmRecordEntity, String> {

    /**
     * 修改告警记录状态
     * @param state 修改后的告警记录状态
     * @param id 告警记录ID
     * @return
     */
    public Mono<Integer> changeRecordState(AlarmRecordState state, String id) {<FILL_FUNCTION_BODY>}


}

        return createUpdate()
            .set(AlarmRecordEntity::getState, state)
            .set(AlarmRecordEntity::getHandleTime, System.currentTimeMillis())
            .where(AlarmRecordEntity::getId, id)
            .not(AlarmRecordEntity::getState, state)
            .execute();
    
<no_super_class>