| | |
| | | <if test="req.pageCode != null and req.pageCode != ''"> |
| | | and t1.page_code = #{req.pageCode} |
| | | </if> |
| | | <if test="req.userId != null and req.userId != ''"> |
| | | and t1.user_id = #{req.userId} |
| | | </if> |
| | | ORDER BY |
| | | t1.user_id, |
| | | t1.start_time |
| | | t1.start_time desc |
| | | |
| | | </select> |
| | | <resultMap id="userShareMap" type="cn.lili.modules.lmk.domain.vo.ShareActionRecordVO"> |
| | | <result property="userId" column="user_id"/> |
| | |
| | | ORDER BY |
| | | lsa.create_time desc |
| | | </select> |
| | | <resultMap id="userStayListRecordMap" type="cn.lili.modules.lmk.domain.vo.ActionRecordListVO"> |
| | | <id column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="action_type" property="actionType"/> |
| | | <result column="start_time" property="startTime"/> |
| | | <result column="join_type" property="joinType"/> |
| | | <result column="previous_session_id" property="previousSessionId"/> |
| | | <result column="share_id" property="shareId"/> |
| | | <result column="page_code" property="pageCode"/> |
| | | <result column="page_params" property="pageParams"/> |
| | | <result column="page_type" property="pageType"/> |
| | | <result column="page_status" property="pageStatus"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="delete_flag" property="deleteFlag"/> |
| | | <result column="nick_name" property="nickName"/> |
| | | </resultMap> |
| | | <select id="userStayListRecord" resultMap="userStayListRecordMap"> |
| | | SELECT |
| | | t.id, |
| | | t.user_id, |
| | | t.action_type, |
| | | t.start_time, |
| | | t.join_type, |
| | | t.previous_session_id, |
| | | t.share_id, |
| | | t.page_code, |
| | | t.page_params, |
| | | t.page_type, |
| | | t.page_status, |
| | | t.update_time, |
| | | t.create_by, |
| | | t.create_time, |
| | | t.update_by, |
| | | t.delete_flag, |
| | | lm.nick_name |
| | | FROM |
| | | ( |
| | | SELECT |
| | | *, |
| | | ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY create_time DESC) AS rn |
| | | FROM |
| | | lmk_action_record |
| | | WHERE |
| | | user_id IS NOT NULL |
| | | AND page_status = 'JOIN') t |
| | | JOIN li_member lm ON lm.id = t.user_id |
| | | WHERE |
| | | rn = 1 AND lm.delete_flag = 0 |
| | | and t.create_time between #{req.beginDate} and #{req.endDate} |
| | | <if test="req.userName != null and req.userName != ''"> |
| | | and lm.nick_name like concat('%',#{req.userName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |