修改自动推广的相关任务

This commit is contained in:
wangjinlei
2026-04-24 16:26:48 +08:00
parent 13fd3af816
commit d21c33fcd0
3 changed files with 52 additions and 21 deletions

View File

@@ -1728,6 +1728,32 @@ class EmailClient extends Base
return jsonSuccess($result);
}
public function mytestg(){
$data = $this->request->post();
$rule = new Validate([
"id"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$service = new PromotionService();
$service->enqueuePrepareEmail($data['id']);
$service->log("dsadsadsad");
}
public function mytestqq(){
$data = $this->request->post();
$rule = new Validate([
"id"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$service = new PromotionService();
$service->prepareSingleEmail($data['id']);
}
/**
* 定时任务:为指定日期的任务预生成邮件(默认明天)
* 建议每天 22:00 执行curl .../EmailClient/prepareTasksForDate 或 prepareTasksForDate?date=2026-03-12