v1.0.5
CI / build-deploy (pull_request) Successful in 21s
CI / notify-on-failure (pull_request) Has been skipped

This commit is contained in:
Timi
2026-08-01 16:51:53 +08:00
parent 1658be7d8d
commit 833a303bb6
24 changed files with 530 additions and 42 deletions
@@ -28,6 +28,18 @@
ORDER BY `created_at` DESC
</select>
<select id="selectByIdList" resultType="com.imyeyu.api.modules.gao.entity.GaoCustomer">
SELECT
*
FROM `gao_customer`
WHERE
`id` IN
<foreach collection="idList" item="id" open="(" separator="," close=")">
#{id}
</foreach>
AND `deleted_at` IS NULL
</select>
<select id="countSearch" resultType="java.lang.Long">
SELECT
COUNT(1)
@@ -65,6 +77,16 @@
AND `deleted_at` IS NULL
</select>
<update id="updateInvitedCountDelta">
UPDATE `gao_customer`
SET
`invited_count` = GREATEST(IFNULL(`invited_count`, 0) + #{delta}, 0),
`updated_at` = UNIX_TIMESTAMP() * 1000
WHERE
`id` = #{customerId}
AND `deleted_at` IS NULL
</update>
<select id="statDailyNewCustomer" resultType="com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStatView">
SELECT
CAST(DATE_FORMAT(FROM_UNIXTIME(`created_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`,
@@ -86,4 +108,14 @@
`created_at` &lt; #{beginCreatedAt}
AND `deleted_at` IS NULL
</select>
<select id="statGender" resultType="com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView">
SELECT
IFNULL(CAST(`gender` AS CHAR), 'UNKNOWN') AS `genderCode`,
COUNT(1) AS `count`
FROM `gao_customer`
WHERE
`deleted_at` IS NULL
GROUP BY IFNULL(CAST(`gender` AS CHAR), 'UNKNOWN')
</select>
</mapper>