niucloud-admin/niucloud/addon/shop/app/job/goods/GoodsEvaluateStat.php
全栈小学生 abaa4201fb add shop
2026-01-13 09:16:43 +08:00

39 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace addon\shop\app\job\goods;
use addon\shop\app\service\admin\goods\EvaluateService;
use core\base\BaseJob;
use think\facade\Log;
/**
* 商品评价审核状态更新为无需审核调用
*/
class GoodsEvaluateStat extends BaseJob
{
/**
* 消费
* @return bool
*/
public function doJob($evaluate_ids)
{
//Log::write('商品评价审核批量修改, 批量更新评价统计数据' . var_export($evaluate_ids, true));
try {
//修改状态
(new EvaluateService())->updateGoodsEvaluateNumBach($evaluate_ids);
return true;
} catch (\Exception $e) {
return false;
}
}
}