v1.0.5
This commit is contained in:
@@ -259,6 +259,20 @@
|
||||
ORDER BY r.`registered_at` DESC, r.`created_at` DESC
|
||||
</select>
|
||||
|
||||
<select id="selectCalendarByRange" resultType="com.imyeyu.api.modules.gao.vo.GaoRegistrationEventRecordCalendarView">
|
||||
SELECT
|
||||
r.`id` AS `id`,
|
||||
r.`customer_id` AS `customerId`,
|
||||
c.`code` AS `customerCode`,
|
||||
c.`name` AS `customerName`,
|
||||
r.`registration_event_id` AS `registrationEventId`,
|
||||
r.`registered_at` AS `registeredAt`
|
||||
<include refid="rangeFrom"/>
|
||||
WHERE
|
||||
<include refid="rangeWhere"/>
|
||||
ORDER BY r.`registered_at` DESC, r.`created_at` DESC
|
||||
</select>
|
||||
|
||||
<select id="countByRange" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
@@ -267,9 +281,26 @@
|
||||
<include refid="rangeWhere"/>
|
||||
</select>
|
||||
|
||||
<select id="selectPageByRange" resultType="com.imyeyu.api.modules.gao.entity.GaoRegistrationEventRecord">
|
||||
<select id="selectPageByRange" resultType="com.imyeyu.api.modules.gao.vo.GaoRegistrationEventRecordListItemView">
|
||||
SELECT
|
||||
r.*
|
||||
r.`id` AS `id`,
|
||||
r.`customer_id` AS `customerId`,
|
||||
c.`name` AS `customerName`,
|
||||
(
|
||||
SELECT a.`id`
|
||||
FROM `attachment` a
|
||||
WHERE
|
||||
a.`biz_type` = 'GAO_CUSTOMER'
|
||||
AND a.`biz_id` = c.`id`
|
||||
AND a.`attach_type` = 'PHOTO'
|
||||
AND a.`deleted_at` IS NULL
|
||||
AND (a.`destroy_at` IS NULL OR UNIX_TIMESTAMP() < a.`destroy_at`)
|
||||
ORDER BY a.`created_at` ASC
|
||||
LIMIT 1
|
||||
) AS `customerPhotoAttachmentId`,
|
||||
r.`registration_event_id` AS `registrationEventId`,
|
||||
e.`name` AS `registrationEventName`,
|
||||
r.`registered_at` AS `registeredAt`
|
||||
<include refid="rangeFrom"/>
|
||||
WHERE
|
||||
<include refid="rangeWhere"/>
|
||||
|
||||
Reference in New Issue
Block a user