<?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.yd.dal.mapper.customer.CustomerMapper">
    <resultMap id="base_result_map" type="com.yd.dal.entity.customer.Customer">
        <result column="login" property="login"/>
        <result column="password" property="password"/>
        <result column="mobile_no" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>

        <result column="created_at" property="createdAt"/>
        <result column="updated_at" property="updatedAt"/>
    </resultMap>

    <sql id="base_sql">
        login,password,mobile_no,created_at,updated_at
    </sql>

    <select id="listAllCustomer" resultMap="base_result_map">
        SELECT
        <include refid="base_sql"/>
        FROM ag_acl_customer
    </select>
    <select id="queryByPage" resultMap="base_result_map">
        SELECT
        <include refid="base_sql"/>
        FROM ag_acl_customer
    </select>
</mapper>