package com.qmth.distributed.print.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.distributed.print.business.entity.TFFlowApprove;
import com.qmth.distributed.print.business.mapper.TFFlowApproveMapper;
import com.qmth.distributed.print.business.service.TFFlowApproveService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 流程审核表 服务实现类
 * </p>
 *
 * @author wangliang
 * @since 2021-08-02
 */
@Service
public class TFFlowApproveServiceImpl extends ServiceImpl<TFFlowApproveMapper, TFFlowApprove> implements TFFlowApproveService {

    /**
     * 根据流程id查询流程状态
     *
     * @param flowId
     * @return
     */
    @Override
    public TFFlowApprove findByFlowId(Long flowId) {
        QueryWrapper<TFFlowApprove> tfFlowApproveQueryWrapper = new QueryWrapper<>();
        tfFlowApproveQueryWrapper.lambda().eq(TFFlowApprove::getFlowId, flowId);
        return this.getOne(tfFlowApproveQueryWrapper);
    }
}
