<?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.hotent.project.dao.CostProjectTaskLogDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.project.model.CostProjectTaskLog">
        <id column="id" property="id" />
    <result column="year" property="year" />
    <result column="project_id" property="projectId" />
    <result column="task_id" property="taskId" />
    <result column="project_name" property="projectName" />
    <result column="audited_unit_id" property="auditedUnitId" />
		<result column="node_type" property="nodeType"/>
    <result column="task_type" property="taskType" />
    <result column="user_id" property="userId" />
    <result column="remark" property="remark" />
    <result column="create_time" property="createTime" />
    <result column="create_by" property="createBy" />
    <result column="update_time" property="updateTime" />
    <result column="update_by" property="updateBy" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, year, project_id, task_id, project_name, audited_unit_id,node_type, task_type, user_id, remark, create_time, create_by, update_time, update_by
    </sql>

	<select id="selectPage" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			cost_project_task_log
		${ew.customSqlSegment}
	</select>
	
	<select id="selectList" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			cost_project_task_log
		${ew.customSqlSegment}
	</select>
	
	<select id="selectById" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			cost_project_task_log
		where 
		    id = ${id}
	</select>
</mapper>
