framework/src/main/resources/mapper/lmk/ActivityMapper.xml
@@ -32,10 +32,6 @@
        <result column="activity_report_id" property="activityReportId"/>
    </resultMap>
    <resultMap id="ActivityReportMap" type="cn.lili.modules.lmk.domain.vo.ActivityReportVO">
        <result column="activity_id" property="activityId"/>
        <result column="user_id" property="userId"/>
    </resultMap>
    <select id="getMyActivityList" resultMap="MyActivityResultMap">
@@ -55,7 +51,7 @@
                 LEFT JOIN lmk_activity LA ON LAR.activity_id = LA.id
        where  LA.delete_flag = 0
          AND LAR.delete_flag = 0
          AND LAR.user_id = #{query.id}
          AND LAR.user_id = #{userId}
          AND LAR.cancel = #{query.cancel}
        <if test="query.status == null or query.status == ''">
            AND LA.status != '已结束'
@@ -116,6 +112,32 @@
            <if test="query.reportStartTime != null">AND LA.report_start_time >= #{query.reportStartTime}</if>
            <if test="query.reportEndTime != null">AND LA.report_end_time &lt;= #{query.reportEndTime}</if>
    </select>
    <select id="getCanReportPage" resultMap="BaseResultMap">
        SELECT
        LA.id,
        LA.activity_name,
        LA.activity_type,
        LA.report_start_time,
        LA.report_end_time,
        LA.start_time,
        LA.end_time,
        LA.status,
        LA.recommend,
        LA.cover,
        LA.cover_type,
        LA.limit_user_num,
        LA.activity_location,
        LA.activity_content
        FROM
        lmk_activity LA
        WHERE
        LA.delete_flag = 0
        AND LA.status = '报名中'
    </select>
    <resultMap id="memberMap" type="cn.lili.modules.member.entity.vo.MemberVO">
        <id property="id" column="id"/>
@@ -148,19 +170,6 @@
        WHERE LAR.activity_id = #{query.id}
    </select>
    <update id="cancelActivity" >
        UPDATE
            lmk_activity_report LAR
        SET LAR.cancel = true where LAR.id = #{id}
    </update>
    <select id="getActivityReport" resultMap="ActivityReportMap">
        SELECT LAR.* FROM lmk_activity_report LAR
        WHERE LAR.user_id = #{query.userId} and LAR.activity_id = #{query.activityId}
    </select>
    <update id="batchUpdateActivities">
        UPDATE lmk_activity
        <trim prefix="SET" suffixOverrides=",">
@@ -175,4 +184,5 @@
            #{item.id}
        </foreach>
    </update>
</mapper>