dggzichahu/application/common/logic/AfterSaleLogLogic.php

40 lines
1.1 KiB
PHP
Executable File

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