This commit is contained in:
Alex-larget
2026-03-24 18:45:32 +08:00
parent dcb7961945
commit f3d74ce94a
68 changed files with 2461 additions and 2535 deletions

View File

@@ -233,6 +233,28 @@ func CronRetryOrderWebhooks(c *gin.Context) {
})
}
// CronRetryCkbLeads GET/POST /api/cron/retry-ckb-leads
// 重推存客宝失败留资记录,并更新 ckb_lead_records.push_status。
func CronRetryCkbLeads(c *gin.Context) {
limit := 100
if s := strings.TrimSpace(c.Query("limit")); s != "" {
if n, err := strconv.Atoi(s); err == nil && n > 0 && n <= 1000 {
limit = n
}
}
retried, success, err := RetryFailedCkbLeads(c.Request.Context(), limit)
if err != nil {
c.JSON(http.StatusOK, gin.H{"success": false, "error": err.Error()})
return
}
c.JSON(http.StatusOK, gin.H{
"success": true,
"retried": retried,
"pushed": success,
"limit": limit,
})
}
// CronUnbindExpired GET/POST /api/cron/unbind-expired
func CronUnbindExpired(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"success": true})