<?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.liquidnet.service.adam.mapper.AdamMemberPriceMapper">
    <resultMap id="MemberPriceResult" type="com.liquidnet.service.adam.entity.AdamMemberPrice">
        <result column="member_price_id" property="memberPriceId" />
        <result column="member_id" property="memberId" />
        <result column="status" property="status" />
        <result column="name" property="name" />
        <result column="price" property="price" />
        <result column="price_fixed" property="priceFixed" />
        <result column="days" property="days" />
        <result column="detail" property="detail" />
        <result column="created_at" property="createdAt" />
        <result column="updated_at" property="updatedAt" />
    </resultMap>

    <!-- sql -->
    <sql id="Base_Column">
        m.member_id,
        m.status,
        m.name,
        m.price,
        m.price_fixed,
        m.days,
        m.detail,
        m.created_at,
        m.updated_at,
        m.member_price_id
    </sql>
    <!-- 根据会员id查询价格列表 -->
    <select id="memberPriceList" parameterType="java.lang.String" resultMap="MemberPriceResult">
        SELECT
        <include refid="Base_Column"/>
        FROM adam_member_price as m
        <where>
            m.member_id=#{memberId}
        </where>
    </select>
    <!-- mis会员价格详情 -->
    <select id="misMemberPriceInfo" parameterType="java.lang.String" resultMap="MemberPriceResult">
        SELECT
        <include refid="Base_Column"/>
        FROM adam_member_price as m
        <where>
            m.member_price_id=#{memberPriceId}
        </where>
    </select>
</mapper>
