Files
oil/server-tp6/app/store/model/Notify.php
T
2026-09-01 22:15:50 +08:00

55 lines
1.1 KiB
PHP

<?php
declare (strict_types=1);
namespace app\store\model;
use think\Request;
use app\common\model\Notify as NotifyModel;
/**
* 通知管理
* Class Order
* @package app\store\model
*/
class Notify extends NotifyModel
{
/**
* 通知列表
* @return \think\Paginator
* @throws \think\exception\DbException
*/
public function getList()
{
// 获取数据列表
return $this->where('status', '=', 0)
->order(['create_time' => 'asc'])
->paginate(200);
}
/**
* 新增通知记录
* @param $order
* @return false|int
*/
public function add($order)
{
return $this->save([
'order_id' => $order['order_id'],
'notify_url' => $order['notify_url'],
'store_id' => 10001,
]);
}
/**
* 修改通知状态
* @param $data
* @return bool
*/
public function sureNotify($data)
{
return $this->save([
'status' => $data['status'],
'last_time' => time(),
]) !== false;
}
}