<?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.CostProjectTaskDocumentDataDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.project.model.CostProjectTaskDocumentData">
        <id column="id" property="id" />
    <result column="project_id" property="projectId" />
    <result column="project_document_id" property="projectDocumentId" />
    <result column="data_text" property="dataText" />
    <result column="remarks" property="remarks" />
    <result column="is_deleted" property="isDeleted" />
    <result column="create_time" property="createTime" />
    <result column="create_by" property="createBy" />
    <result column="update_time" property="updateTime" />
    <result column="update_by" property="updateBy" />
    <result column="order_num" property="orderNum" />
    <result column="label_key" property="labelKey" />
    <result column="label_value" property="labelValue" />
    <result column="data_key" property="dataKey" />
    <result column="data_value" property="dataValue" />
    <result column="task_id" property="taskId" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, project_id, project_document_id, data_text, remarks, is_deleted, create_time, create_by, update_time, update_by, order_num, label_key, label_value, data_key, data_value, task_id
    </sql>

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