generated from liutk/owl-admin-base
36 lines
874 B
PHP
36 lines
874 B
PHP
<?php
|
|
|
|
namespace App\Services\Admin;
|
|
|
|
use App\Models\UserGift;
|
|
use App\Models\Filters\UserGiftFilter;
|
|
use App\Traits\UploadTrait;
|
|
use Illuminate\Support\Arr;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
/**
|
|
* @method UserGift getModel()
|
|
* @method UserGift|\Illuminate\Database\Query\Builder query()
|
|
*/
|
|
class UserGiftService extends BaseService
|
|
{
|
|
use UploadTrait;
|
|
|
|
protected string $modelName = UserGift::class;
|
|
|
|
protected string $modelFilterName = UserGiftFilter::class;
|
|
|
|
protected array $withRelationships = ['user', 'gift', 'activity'];
|
|
|
|
public function shippingGift(UserGift $userGift, $params)
|
|
{
|
|
//更新状态,结果
|
|
$userGift->update([
|
|
'shipping_company' => $params['shipping_company'],
|
|
'shipping_number' => $params['shipping_number'],
|
|
'state' => 2,
|
|
]);
|
|
|
|
return true;
|
|
}
|
|
} |