<?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.artfess.bpm.persistence.dao.BpmSaveOpinionDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.artfess.bpm.persistence.model.BpmSaveOpinion">
        <id column="ID_" property="id" />
        <result column="PROC_INST_ID_" property="procInstId" />
        <result column="TASK_ID_" property="taskId" />
        <result column="OPINION_" property="opinion" />
        <result column="CREATE_BY_" property="createBy" />
        <result column="CREATE_TIME_" property="createTime" />
        <result column="UPDATE_BY_" property="updateBy" />
        <result column="UPDATE_TIME_" property="updateTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        ID_, PROC_INST_ID_, TASK_ID_, OPINION_, CREATE_BY_, CREATE_TIME_, UPDATE_BY_, UPDATE_TIME_, TENANT_ID_
    </sql>

    <select id="getBpmSaveOpinionByTeam" parameterType="java.util.Map" resultMap="BaseResultMap">
		select * from bpm_save_opinion t where t.PROC_INST_ID_=#{map.instId} and t.TASK_ID_=#{map.taskId}
	</select>

    <update id="updateBpmSaveOpinionByTeam" parameterType="java.util.Map" >
        UPDATE bpm_save_opinion t SET t.OPINION_= #{map.opinion}
        WHERE t.PROC_INST_ID_=#{map.instId} and t.TASK_ID_=#{map.taskId}
    </update>

</mapper>
