add customer list for GaoCustomerDailyStateView
This commit is contained in:
@@ -49,6 +49,12 @@
|
||||
HAVING COUNT(DISTINCT `ta`.`tag_id`) = #{tagCount}
|
||||
)
|
||||
</if>
|
||||
<if test="beginCreatedAt != null">
|
||||
AND `c`.`created_at` >= #{beginCreatedAt}
|
||||
</if>
|
||||
<if test="endCreatedAt != null">
|
||||
AND `c`.`created_at` <= #{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` >= #{beginCreatedAt}
|
||||
AND `created_at` <= #{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)
|
||||
|
||||
Reference in New Issue
Block a user