1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Modules\Push\Models;
- use Illuminate\Database\Eloquent\Model;
- class QappPushTaskLogs extends Model
- {
- protected $table = 'qapp_push_task_logs';
- protected $fillable = ['task_id', 'app_id', 'num', 'status', 'push_time', 'push_result'];
- /**
- * @param $taskId
- * @return array
- */
- public static function getPushTaskLogsByTaskId($taskId): array
- {
- if (empty($taskId)) {
- return [];
- }
- $result = self::where('task_id', $taskId)->get();
- return $result ? $result->toArray() : [];
- }
- /**
- * @param $where
- * @param $data
- * @return bool
- */
- public static function updateData($where, $data)
- {
- if (empty($where) || empty($data)) {
- return false;
- }
- return self::where($where)->update($data);
- }
- }
|