<?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.guosen.userActivityStatistical.mapper.UserActivityStatisticalMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="userActivityStatisticalResultMap" type="org.springblade.modules.guosen.userActivityStatistical.entity.UserActivityStatistical">
        <result column="id" property="id"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="user_id" property="userId"/>
        <result column="activity_id" property="activityId"/>
        <result column="usable_hot_value" property="usableHotValue"/>
        <result column="total_hot_value" property="totalHotValue"/>
        <result column="usable_points_value" property="usablePointsValue"/>
        <result column="total_points_value" property="totalPointsValue"/>
        <result column="total_cash" property="totalCash"/>
    </resultMap>
    <select id="selectUserActivityStatisticalPage" resultMap="userActivityStatisticalResultMap">
        select * from cyzh_user_activity_statistical where is_deleted = 0
    </select>

    <select id="selectPlayerList" resultType="org.springblade.modules.guosen.userActivityStatistical.entity.UserActivityStatistical">
        SELECT a.*
        FROM cyzh_user_activity_statistical as a
        LEFT JOIN cyzh_login_user as b on a.user_id = b.id
        WHERE b.user_type = 1 and b.is_deleted = 0
    </select>
</mapper>
