改进 扣费
This commit is contained in:
parent
3035a57301
commit
47edd6cf73
@ -3,7 +3,6 @@
|
|||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Models\Module\Module;
|
use App\Models\Module\Module;
|
||||||
use App\Exceptions\CommonException;
|
|
||||||
use App\Models\WorkOrder\WorkOrder;
|
use App\Models\WorkOrder\WorkOrder;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
// use Illuminate\Database\Eloquent\SoftDeletes;
|
// use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
@ -114,7 +113,7 @@ public function cost($price = null)
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->price = intval(log10(abs($this->price)) / 3);;
|
$this->price = intval(log10(abs($this->price)) / 3);
|
||||||
|
|
||||||
Cache::decrement($cache_key, $this->price);
|
Cache::decrement($cache_key, $this->price);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user