<?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.qg.qaplatform.zdata.mapper.VccDataMapper">

    <select id="queryVccDataByStatus" resultType="cn.qg.qaplatform.zdata.entity.VccUserEntity">
        select
        `phone_no` as phoneNo,
        `user_id` as userId,
        `uuid`,
        `status`,
        `registered_from` as registeredFrom,
        `next_apply_time` as nextApplyTime,
        `created_at` as createdAt
        from account
         <where>
             status = #{status} and `type` = 'xyqb_mall'
         </where>
         order by id desc
    </select>

    <select id="queryUserVccStatus" resultType="cn.qg.qaplatform.zdata.entity.VccUserEntity">
        select
        `phone_no` as phoneNo,
        `user_id` as userId,
        `uuid`,
        `status`,
        `registered_from` as registeredFrom,
        `next_apply_time` as nextApplyTime,
        `created_at` as createdAt
        from account
        <where>
            `phone_no` = #{phoneNo}
        </where>
    </select>
</mapper>