作者 lyh

gx

... ... @@ -176,13 +176,16 @@ class BaseLogic extends Logic
*/
function updateNotify($data)
{
$param = [
'project_id'=>$data['project_id'],
'type'=>$data['type'],
'route'=>$data['route'],
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s')
];
return (new UpdateNotify())->insertGetId($param);
$updateNotifyModel = new UpdateNotify();
$info = $updateNotifyModel->read(['project_id'=>$data['project_id'],'route'=>$data['route'],'status'=>0]);
if($info === false){
$param = [
'project_id'=>$data['project_id'],
'type'=>$data['type'],
'route'=>$data['route'],
];
$updateNotifyModel->add($param);
}
return $this->success();
}
}
... ...