where('push_time', '>=', $params['start_time']); } if (isset($params['end_time']) && $params['end_time']) { $search_obj->where('push_time', '<=', $params['end_time']); } if (isset($params['appid']) && $params['appid']) { $search_obj->where('appid', $params['appid']); } return $search_obj->get(); } static function getAppids($start_time, $end_time) { return self::where('push_time', '>=', $start_time)->where('push_time', '<=', $end_time)->select('appid')->distinct()->get(); } static function updateInfos($id, $params = []) { return self::where('id', $id)->update($params); } static function getUnUpdatedInfos($params = []) { $search_obj = self::orderBy('id', 'desc'); if (isset($params['start_time']) && $params['start_time']) { $search_obj->where('push_time', '<=', $params['start_time']); } if (isset($params['is_one_day']) && $params['is_one_day']) { $search_obj->whereNull('recharge_in_one_day'); } if (isset($params['is_three_day']) && $params['is_three_day']) { $search_obj->whereNull('recharge_in_three_days'); } return $search_obj->get(); } }