You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
617 B
31 lines
617 B
<?php
|
|
|
|
namespace app\mall\model;
|
|
|
|
use think\model\concern\SoftDelete;
|
|
|
|
class MallSpikeNotice extends Base
|
|
{
|
|
use SoftDelete;
|
|
|
|
/**
|
|
* 更新提醒信息
|
|
* @date 2021-03-01
|
|
*/
|
|
public function updateNotice($data)
|
|
{
|
|
$where = [
|
|
['user_agent', '=', $this->userAgent],
|
|
['user_id', '=', $data['user_id']],
|
|
['spike_id', '=', $data['spike_id']],
|
|
['status', '<>', 3]
|
|
];
|
|
$id = $this->getOneData($where, 'id');
|
|
|
|
if (!empty($id)) {
|
|
$data['id'] = $id;
|
|
}
|
|
|
|
return $this->dataUpdate($data);
|
|
}
|
|
} |