send_type = $post['send_type']; $model->send_time = $sendTime; $model->message = $post['message']; $model->post_type = $post['post_type']; $model->account_ids = implode(',',$post['account_ids']); $model->image_video_url = $imageVideoUrl; $model->status = 0; $model->dist_id = getDistributorId(); $model->backup_field1 = json_encode([ 'youtube_category' => $post['youtube_category'], ]); $model->save(); return $model->id; } /* * 找出状态 0 的数据 */ public static function getWaitPost() { $model = new Model(); $model = $model->where('status',0)->get(); return $model; } public static function getPostById($id) { $model = new Model(); $model = $model->where('id',$id)->first(); return $model; } }