<?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.zbkj.service.dao.PlaceRegisterDao">

	<!-- 根据包名 模块名 以及类名 生成Mapper XML 配置文件 -->
    <resultMap type="com.zbkj.common.model.place.PlaceRegister" id="ebPlaceRegisterMap">
        <result property="id" column="id"/>
        <result property="uid" column="uid"/>
        <result property="userName" column="user_name"/>
        <result property="cellPhone" column="cell_phone"/>
        <result property="subscribeDate" column="subscribe_date"/>
        <result property="attendNum" column="attend_num"/>
        <result property="status" column="status"/>
        <result property="cancelData" column="cancel_data"/>
        <result property="cancelReason" column="cancel_reason"/>
        <result property="createDate" column="create_date"/>
        <result property="changedDate" column="changed_date"/>
        <result property="remark" column="remark"/>
    </resultMap>

    <select id="myRegisterList" resultType="com.zbkj.common.response.PlaceRegisterResponse">
        select
            id placeActivityId,
            user_name userName,
            cell_phone cellPhone,
            subscribe_date subscribeDate,
            attend_num attendNum,
            status,
            cancel_data cancelData,
            cancel_reason cancelReason,
            remark
        from eb_place_register where uid = #{userId} and is_show = 0 order by id desc
    </select>

</mapper>
