dggzichahu/application/common/logic/OrderLogLogic.php

39 lines
1.0 KiB
PHP
Executable File

<?php
// +----------------------------------------------------------------------
// | 宏驰云科技开发团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | Author: HcyShop-kiki
// +----------------------------------------------------------------------
namespace app\common\logic;
use app\common\model\OrderLog;
/**
* 订单记录日志
* Class OrderLogLogic
* @package app\common\logic
*/
class OrderLogLogic
{
public static function record($type, $channel, $order_id, $handle_id, $content, $desc = '')
{
if (empty($content)) {
return true;
}
$log = new OrderLog();
$log->type = $type;
$log->order_id = $order_id;
$log->channel = $channel;
$log->handle_id = $handle_id;
$log->content = OrderLog::getLogDesc($content);
$log->create_time = time();
if ($desc != '') {
$log->content = OrderLog::getLogDesc($content) . '(' . $desc . ')';
}
$log->save();
}
}