修复 时间获取问题

This commit is contained in:
iVampireSP.com 2022-11-23 15:49:22 +08:00
parent 16153fcffa
commit 682ac79f9a
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -98,7 +98,7 @@ protected static function boot()
static::creating(function ($model) { static::creating(function ($model) {
$model->hour_at = now()->hour; $model->hour_at = now()->hour;
$model->minute_at = now()->minute_at; $model->minute_at = now()->minute;
if ($model->price !== null) { if ($model->price !== null) {
$model->price = round($model->price, 2); $model->price = round($model->price, 2);
@ -182,7 +182,8 @@ public function module(): BelongsToAlias
// } // }
public function getPrice() { public function getPrice(): float
{
return $this->managed_price ?? $this->price; return $this->managed_price ?? $this->price;
} }