<?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.enterpriseDeclare.dao.CostProjectTaskMaterialDataDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.enterpriseDeclare.model.CostProjectTaskMaterialData">
        <id column="id" property="id" />
    <result column="audited_unit_id" property="auditedUnitId" />
    <result column="user_id" property="userId" />
    <result column="task_material_id" property="taskMaterialId" />
    <result column="task_id" property="taskId" />
    <result column="template_id" property="templateId" />
    <result column="material_type" property="materialType" />
    <result column="attachment_url" property="attachmentUrl" />
    <result column="attachment_suffix" property="attachmentSuffix" />
    <result column="audit_status" property="auditStatus" />
    <result column="upload_time" property="uploadTime" />
    <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="remark" property="remark" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, audited_unit_id, user_id, task_material_id, task_id, template_id, material_type, attachment_url, attachment_suffix, audit_status, upload_time, create_time, create_by_, update_time, update_by_, remark
    </sql>

	<select id="selectPage" resultMap="BaseResultMap">
		select
			<include refid="Base_Column_List"/>
		from
			cost_project_task_material_data
		${ew.customSqlSegment}
	</select>

	<select id="selectList" resultMap="BaseResultMap">
		select
			<include refid="Base_Column_List"/>
		from
			cost_project_task_material_data
		${ew.customSqlSegment}
	</select>

	<select id="selectById" resultMap="BaseResultMap">
		select
			<include refid="Base_Column_List"/>
		from
			cost_project_task_material_data
		where
		    id = ${id}
	</select>
</mapper>
