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

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.project.model.CostProjectTaskMaterial">
        <id column="id" property="id" />
    <result column="task_id" property="taskId" />
    <result column="audited_status" property="auditedStatus" />
    <result column="audited_user_id" property="auditedUserId" />
    <result column="create_by" property="createBy" />
    <result column="project_id" property="projectId" />
    <result column="catalog_id" property="catalogId" />
    <result column="information_type" property="informationType" />
    <result column="information_name" property="informationName" />
    <result column="information_require" property="informationRequire" />
    <result column="order_num" property="orderNum" />
    <result column="is_required" property="isRequired" />
    <result column="template_id" property="templateId" />
    <result column="create_time" property="createTime" />
    <result column="update_by" property="updateBy" />
    <result column="format_required" property="formatRequired" />
    <result column="update_time" property="updateTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, task_id, audited_status, audited_user_id, create_by, project_id, catalog_id, information_type, information_name, information_require, order_num, is_required, template_id, create_time, update_by, format_required, update_time
    </sql>

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