add customer list for GaoCustomerDailyStateView

This commit is contained in:
Timi
2026-09-11 23:52:43 +08:00
parent 94f3fbb867
commit 1d1009b121
6 changed files with 65 additions and 0 deletions
@@ -49,6 +49,12 @@
HAVING COUNT(DISTINCT `ta`.`tag_id`) = #{tagCount}
)
</if>
<if test="beginCreatedAt != null">
AND `c`.`created_at` &gt;= #{beginCreatedAt}
</if>
<if test="endCreatedAt != null">
AND `c`.`created_at` &lt;= #{endCreatedAt}
</if>
</sql>
<select id="countByQuery" resultType="long">
@@ -92,6 +98,19 @@
ORDER BY `dateValue` ASC
</select>
<select id="selectDailyNewCustomer" resultType="com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateCustomerView">
SELECT
`name`,
CAST(DATE_FORMAT(FROM_UNIXTIME(`created_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`
FROM `gao_customer`
WHERE
`store_id` = #{storeId}
AND `created_at` &gt;= #{beginCreatedAt}
AND `created_at` &lt;= #{endCreatedAt}
AND `deleted_at` IS NULL
ORDER BY `dateValue` ASC, `created_at` ASC, `id` ASC
</select>
<select id="countCreatedBefore" resultType="java.lang.Long">
SELECT
COUNT(1)