Files
huangjingfen/pro_v3.5.1/app/jobs/activity/card/CardJob.php
panchengyong c1e74d8e68 chore(php): 统一 ScottPan 文件头与注释域名替换
- 按 docs/renew-code-comment.md 将 PHP 文件头改为带边框的 Author 注释\n- 注释中的 crmeb.com 替换为 uj345.cn(代码字符串中的外链未改)\n- 新增 docs/renew-code-comment.md 说明

Made-with: Cursor
2026-03-29 11:22:58 +08:00

66 lines
1.6 KiB
PHP

<?php
// +----------------------------------------------------------------------
// | Author: ScottPan Team
// +----------------------------------------------------------------------
namespace app\jobs\activity\card;
use app\services\activity\card\CardBatchServices;
use app\services\activity\card\CardCodeServices;
use app\services\activity\card\CardGiftServices;
use app\services\activity\coupon\StoreCouponIssueServices;
use crmeb\basic\BaseJobs;
use crmeb\traits\QueueTrait;
/**
* 营销:礼品卡
* Class CardJob
* @package app\jobs\user
*/
class CardJob extends BaseJobs
{
use QueueTrait;
/**
* 卡密分配数量矫正
* @param $id
* @return bool
*/
public function allocationCode($id)
{
try {
app()->make(CardBatchServices::class)->allocationCode($id);
} catch (\Throwable $e) {
response_log_write([
'message' => '卡密分配数量统计失败:' . $e->getMessage(),
'file' => $e->getFile(),
'line' => $e->getLine()
]);
}
return true;
}
/**
* 校验使用数量
* @param $id
* @return true
* User: liusl
* DateTime: 2025/5/24 10:57
*/
public function allocationCardGift($id)
{
try {
app()->make(CardGiftServices::class)->allocationCardGift($id);
} catch (\Throwable $e) {
response_log_write([
'message' => '卡密分配数量统计失败:' . $e->getMessage(),
'file' => $e->getFile(),
'line' => $e->getLine()
]);
}
return true;
}
}