package com.gyee.frame.mapper.ticket;

import com.gyee.frame.model.ticket.Wfaction;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chenmh
 * @since 2020-07-21
 */
public interface WfactionMapper extends BaseMapper<Wfaction> {


    /**
     * 流程初始化查询
     *
     * @param wfName
     * @return
     */
    @Select("select a.* from WFPROCESS p left join WFNODE n ON p.wfrevision = n.wfrevision and p.wfname = n.wfname " +
            "left join WFACTION a ON a.startnodeid = n.id WHERE p.wfname = #{wfName} AND p.active = '是' AND a.actiontype = '空操作' AND n.nodetype='开始'")
    Wfaction initAction(String wfName);
}
