<?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.baseInfo.dao.CostInformationDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.baseInfo.model.CostInformation">
        <id column="id" property="id" />
    <result column="title" property="title" />
    <result column="document_number" property="documentNumber" />
    <result column="project_name" property="projectName" />
    <result column="content" property="content" />
    <result column="catalog_id" property="catalogId" />
    <result column="upload_url" property="uploadUrl" />
    <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" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, title, document_number, project_name, content, catalog_id, upload_url, is_deleted, create_time, create_by, update_time, update_by
    </sql>

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