<?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.jumeirah.common.mapper.MerchantMapper">

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, name, phone, phone_area, head, remark, state, deleted, create_time, update_time, recharge_bank, recharge_name, recharge_bank_number, image_list_url, image_list_height, image_list_width, image_company_introduction_url, image_team_introduction_url, image_advantage_url, text_company_introduction, text_team_introduction, text_advantage, airline_name, location, email, image_business_license_url, audit_register_status
    </sql>

    <select id="getMerchantById" resultType="com.jumeirah.common.vo.MerchantQueryVo">
        select
        <include refid="Base_Column_List"/>
        from merchant where id = #{id}
    </select>

    <select id="getMerchantPageList" parameterType="com.jumeirah.common.param.MerchantPageParam"
            resultType="com.jumeirah.common.vo.MerchantQueryVo">
        select
        <include refid="Base_Column_List"/>
        from merchant
        <where>
            state=1 and audit_register_status=1
        </where>
    </select>

</mapper>
