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

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.baseInfo.model.CostDocumentWh">
        <id column="id" property="id" />
    <result column="wh_name" property="whName" />
    <result column="alias" property="alias" />
    <result column="generate_type" property="generateType" />
    <result column="rule_pattern" property="rulePattern" />
    <result column="serial_length" property="serialLength" />
    <result column="initial_value" property="initialValue" />
    <result column="current_value" property="currentValue" />
    <result column="last_generate_date" property="lastGenerateDate" />
    <result column="status" property="status" />
    <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="wh_type" property="whType" />
    <result column="area_level" property="areaLevel" />
    <result column="area_code" property="areaCode" />
    <result column="year" property="year" />
    <result column="prefix_text" property="prefixText" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, wh_name, alias, generate_type, rule_pattern, serial_length, initial_value, current_value, last_generate_date, status, is_deleted, create_time, create_by, update_time, update_by, wh_type, area_level, area_code, year, prefix_text
    </sql>

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