package com.junmp.junmpProcess.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import com.junmp.junmpProcess.entity.TemplateGroup;
import com.junmp.junmpProcess.entity.ProcessTemplates;

import java.util.List;

/**
 * @author : willian fu
 * @date : 2020/9/21
 */
@Mapper
public interface TemplateGroupMapper extends BaseMapper<TemplateGroup> {

    /**
     * 查询所有表单及组
     *
     * @return
     */
    @Select("SELECT  pt.template_id, pt.remark, pt.is_stop, pt.updated, pt.form_name, \n" +
            "            pt.icon, pt.background FROM process_templates pt  ORDER BY updated desc")
    List<ProcessTemplates> getAllFormAndGroups();
}
