| | |
| | | <if test="query.audit == true" >AND LAAR.audit != 0</if> |
| | | <if test="query.audit == false" >AND LAAR.audit = 0</if> |
| | | <if test="query.memberId !=null and query.memberId !=''">And LA.member_id = #{query.memberId}</if> |
| | | <if test="query.storeId !=null and query.storeId !=''">And LA.store_id = #{query.storeId}</if> |
| | | Order by LA.create_time DESC |
| | | </select> |
| | | |
| | | <select id="storeGetPage" 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, |
| | | LA.publish, |
| | | LAAR.audit as auditStatus |
| | | FROM |
| | | lmk_activity LA |
| | | LEFT JOIN |
| | | ( |
| | | SELECT |
| | | activity_id, |
| | | audit, |
| | | create_time |
| | | FROM ( |
| | | SELECT |
| | | activity_id, |
| | | audit, |
| | | create_time, |
| | | ROW_NUMBER() OVER (PARTITION BY activity_id ORDER BY create_time DESC) AS rn |
| | | FROM |
| | | lmk_activity_audit_record |
| | | WHERE |
| | | delete_flag = 0 |
| | | ) t |
| | | WHERE |
| | | rn = 1 |
| | | ) LAAR ON LA.id = LAAR.activity_id |
| | | WHERE |
| | | LA.delete_flag = 0 |
| | | <if test="query.activityName != null and query.activityName != ''">AND LA.activity_name LIKE CONCAT('%', #{query.activityName}, '%')</if> |
| | | <if test="query.activityType != null and query.activityType != ''">AND LA.activity_type LIKE CONCAT('%', #{query.activityType}, '%')</if> |
| | | <if test="query.recommend != null and query.recommend != ''">AND LA.recommend = #{recommend}</if> |
| | | <if test="query.reportStartTime != null">AND LA.report_start_time >= #{query.reportStartTime}</if> |
| | | <if test="query.reportEndTime != null">AND LA.report_end_time <= #{query.reportEndTime}</if> |
| | | <if test="query.memberId != null and query.memberId !=''">AND LA.member_id <= #{query.memberId}</if> |
| | | <if test="query.audit == true" >AND LAAR.audit != 0</if> |
| | | <if test="query.audit == false" >AND LAAR.audit = 0</if> |
| | | <if test="query.memberId !=null and query.memberId !=''">And LA.member_id = #{query.memberId}</if> |
| | | <if test="query.storeId !=null and query.storeId !=''">And LA.store_id = #{query.storeId}</if> |
| | | Order by LA.create_time DESC |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getCanReportPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | LA.id, |