
package org.jeecg.modules.workFlow.flowlong.mybatisplus.mapper;

import org.jeecg.modules.workFlow.flowlong.engine.entity.FlwInstance;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;

import java.util.List;
import java.util.Optional;

/**
 * 流程实例 Mapper
 *

 */
public interface FlwInstanceMapper extends BaseMapper<FlwInstance> {

    default Optional<List<FlwInstance>> listByParentInstanceId(Long parentInstanceId) {
        return Optional.ofNullable(selectList(Wrappers.<FlwInstance>lambdaQuery().eq(FlwInstance::getParentInstanceId, parentInstanceId)));
    }
}
