| | |
| | | <result column="activity_content" property="activityContent" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="MyActivityResultMap" type="cn.lili.modules.lmk.domain.vo.MyActivityVo"> |
| | | <result column="activity_name" property="activityName" /> |
| | | <result column="activity_type" property="activityType"/> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="status" property="status" /> |
| | | <result column="cover" property="cover" /> |
| | | <result column="cover_type" property="coverType" /> |
| | | <result column="activity_location" property="activityLocation" /> |
| | | <result column="cancel" property="cancel"/> |
| | | <result column="activity_report_id" property="activityReportId"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="getMyActivityList" resultMap="MyActivityResultMap"> |
| | | SELECT |
| | | LA.id, |
| | | LA.activity_name, |
| | | LA.activity_type, |
| | | LA.start_time, |
| | | LA.end_time, |
| | | LA.status, |
| | | LA.cover, |
| | | LA.cover_type, |
| | | LA.activity_location, |
| | | LAR.cancel, |
| | | LA.id as activity_report_id |
| | | FROM lmk_activity_report LAR |
| | | 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 = #{userId} |
| | | AND LAR.cancel = #{query.cancel} |
| | | <if test="query.status == null or query.status == ''"> |
| | | AND LA.status != '已结束' |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | AND LA.status = #{query.status} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | |
| | | WHERE LAR.activity_id = #{query.id} |
| | | </select> |
| | | |
| | | <update id="batchUpdateActivities"> |
| | | UPDATE lmk_activity |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <trim prefix="status = CASE id" suffix="END,"> |
| | | <foreach collection="list" item="item"> |
| | | WHEN #{item.id} THEN #{item.status} |
| | | </foreach> |
| | | </trim> |
| | | </trim> |
| | | WHERE id IN |
| | | <foreach collection="list" item="item" open="(" separator="," close=")"> |
| | | #{item.id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | </mapper> |