<?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="org.springblade.modules.groupon.mapper.EmbersMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="embersResultMap" type="org.springblade.modules.groupon.entity.Embers">
        <result column="id" property="id"/>
        <result column="create_user_id" property="createUserId"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user_id" property="updateUserId"/>
        <result column="update_time" property="updateTime"/>
        <result column="is_delete" property="isDelete"/>
        <result column="share_user_id" property="shareUserId"/>
        <result column="bind_user_id" property="bindUserId"/>
        <result column="user_name" property="userName"/>
        <result column="user_tel" property="userTel"/>
        <result column="state" property="state"/>
    </resultMap>
    <update id="unbundleUser">
        update t_embers SET state = 1,update_time = NOW() WHERE create_time <![CDATA[<]]> #{time}
    </update>


    <select id="selectEmbersPage" resultMap="embersResultMap">
        select * from t_embers where is_delete = 0
    </select>

</mapper>
