<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeeplus.extension.mapper.FlowCopyMapper">


    <select id="findList" resultType="com.jeeplus.extension.service.dto.FlowCopyDTO">
        SELECT a.id            AS "id",
               a.user_id       AS "userId",
               a.proc_def_id   AS "procDefId",
               a.proc_ins_id   AS "procInsId",
               a.create_time   AS "createTime",
               a.create_by_id  AS "createBy.id",
               a.proc_def_name AS "procDefName",
               a.proc_ins_name AS "procInsName",
               a.task_name     AS "taskName",
               createBy.name   AS "createBy.name"
        FROM act_extension_cc a
                 LEFT JOIN sys_user createBy ON createBy.id = a.create_by_id
            ${ew.customSqlSegment}
            order by a.update_time DESC
    </select>

    <insert id="add">
        insert into act_extension_cc(create_by_id,create_time,proc_ins_name,update_by_id,update_time,id,user_id,del_flag) values (#{flow.createById},#{flow.createTime},#{flow.procInsName},#{flow.updateById},#{flow.updateTime},#{flow.id},#{flow.userId},#{flow.delFlag})
    </insert>


</mapper>
