<?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="cn.roadm.admin.mapper.BeautyPhoneMapper">
    <resultMap id="beautyPhoneMap" type="cn.roadm.admin.table.SmsBeautyPhoneTable">
        <id property="id" column="id"/>
        <result property="pattenDesc" column="patten_desc"/>
        <result property="phoneFormat" column="phone_format"/>
        <result property="createTime" column="createTime"/>
        <result property="operator" column="operator"/>
        <result property="state" column="state"/>
    </resultMap>

    <select id="getBeautyPhoneList" resultMap="beautyPhoneMap">
        SELECT `id`,
               patten_desc,
               phone_format,
               DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%S') as createTime,
               `operator`,
               `state`
        FROM `sms_beauty_phone`
    </select>

    <select id="getBeautyPhoneListOptions" resultType="cn.roadm.admin.entity.SpEditInfoSelectorEntity$Options">
        SELECT id as `value`, patten_desc as label from sms_beauty_phone
    </select>
</mapper>
