add GaoRegistrationEvent status and valid date range
This commit is contained in:
@@ -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` <= #{now})
|
||||
AND (`end_at` IS NULL OR #{now} <= `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`,
|
||||
|
||||
Reference in New Issue
Block a user