48 lines
1.5 KiB
PHP
48 lines
1.5 KiB
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
|
|
// +----------------------------------------------------------------------
|
|
// | Author: 萤火科技 <admin@yiovo.com>
|
|
// +----------------------------------------------------------------------
|
|
declare (strict_types=1);
|
|
|
|
namespace app\store\model;
|
|
|
|
use app\common\enum\order\OrderStatus as OrderStatusEnum;
|
|
use app\common\model\OrderGoods as OrderGoodsModel;
|
|
|
|
/**
|
|
* 订单商品模型
|
|
* Class OrderGoods
|
|
* @package app\store\model
|
|
*/
|
|
class OrderGoods extends OrderGoodsModel
|
|
{
|
|
/**
|
|
* 修改订单状态
|
|
* @param $where
|
|
* @param $field
|
|
* @return false|int
|
|
*/
|
|
public static function orderUpdate($where, $field)
|
|
{
|
|
return (new static())->where($where)->update($field) !== false;
|
|
}
|
|
/**
|
|
* 撤销分油,回收
|
|
* @param array $data
|
|
* @return bool
|
|
*/
|
|
public function cancelShare(array $data): bool
|
|
{
|
|
// 更新订单记录
|
|
return $this->save([
|
|
'order_status' => 20
|
|
]) !== false;
|
|
}
|
|
}
|