add GaoRegistrationEvent status and valid date range

This commit is contained in:
Timi
2026-08-03 11:41:33 +08:00
parent 7370b2fc98
commit d45bf11477
9 changed files with 100 additions and 23 deletions
@@ -18,4 +18,16 @@
</if>
AND `deleted_at` IS NULL
</select>
<select id="selectEnabledList" resultType="com.imyeyu.api.modules.gao.entity.GaoRegistrationEvent">
SELECT
*
FROM `gao_registration_event`
WHERE
(`status` IS NULL OR `status` = 'ACTIVE')
AND (`begin_at` IS NULL OR `begin_at` &lt;= #{now})
AND (`end_at` IS NULL OR #{now} &lt;= `end_at`)
AND `deleted_at` IS NULL
ORDER BY `sort` ASC, `created_at` ASC
</select>
</mapper>
@@ -42,6 +42,15 @@
AND `deleted_at` IS NULL
</select>
<select id="countByRegistrationEventId" resultType="java.lang.Long">
SELECT
COUNT(1)
FROM `gao_registration_event_record`
WHERE
`registration_event_id` = #{registrationEventId}
AND `deleted_at` IS NULL
</select>
<select id="statByRegistrationEventAndPeriodType" resultType="com.imyeyu.api.modules.gao.vo.GaoRegistrationEventPeriodStatView">
SELECT
`registration_event_id` AS `registrationEventId`,