package com.cool.bang.modules.approval.service.impl;

import com.cool.bang.common.base.BaseServiceImpl;
import com.cool.bang.modules.approval.domain.po.ApprovalNode;
import com.cool.bang.modules.approval.mapper.ApprovalNodeMapper;
import com.cool.bang.modules.approval.service.IApprovalNodeService;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 审批节点 Service 业务层处理
 *
 * @author PeiZhi Guo
 * 2022-08-15 15:48
 */
@Service
public class ApprovalNodeServiceImpl extends BaseServiceImpl<ApprovalNodeMapper, ApprovalNode> implements IApprovalNodeService {

    @Override
    public ApprovalNode queryStartNodeByFlowId(Long flowId) {
        return baseMapper.selectStartNodeByFlowId(flowId);
    }

    @Override
    public List<ApprovalNode> queryByFlowNumber(String flowNumber) {
        return baseMapper.selectByFlowNumber(flowNumber);
    }

    @Override
    public ApprovalNode queryByNumber(String number) {
        return baseMapper.queryByNumber(number);
    }

    @Override
    public ApprovalNode queryByExamineBy(Integer type, Long examineBy) {
        return baseMapper.selectByExamineBy(type, examineBy);
    }
}
