From 6c68519b4c1e290b7d66daf63e44817ddca69172 Mon Sep 17 00:00:00 2001 From: xuanchen <122383162@qq.com> Date: Wed, 19 Jan 2022 16:13:18 +0800 Subject: [PATCH] test --- app/Models/Coupon.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Models/Coupon.php b/app/Models/Coupon.php index 9b5ee0a..6e4ea8c 100644 --- a/app/Models/Coupon.php +++ b/app/Models/Coupon.php @@ -4,12 +4,11 @@ namespace App\Models; use App\Models\Traits\BelongsToOutlet; use App\Models\Traits\BelongsToUser; -use GeneaLabs\LaravelModelCaching\Traits\Cachable; class Coupon extends Model { - use BelongsToUser, BelongsToOutlet,Cachable; + use BelongsToUser, BelongsToOutlet; protected $dates = [ 'paid_at', @@ -64,8 +63,9 @@ class Coupon extends Model /** * 是否可以分润 - * @author 玄尘 2020-03-13 + * * @return bool [type] [description] + * @author 玄尘 2020-03-13 */ public function canProfit() { @@ -74,13 +74,14 @@ class Coupon extends Model /** * 分润 - * @author 玄尘 2020-03-13 + * * @return bool|string [type] [description] + * @author 玄尘 2020-03-13 */ public function profit() { $log = AccountLog::where('source->coupon_id', $this->id)->first(); - if (!$log && $this->user && $this->profit) { + if (! $log && $this->user && $this->profit) { return $this->user->account->rule('freeze', $this->profit, false, [ 'coupon_id' => $this->id, 'redemptionCode' => $this->redemptionCode, @@ -94,6 +95,7 @@ class Coupon extends Model /** * Notes: 撤销 + * * @Author: 玄尘 * @Date : 2020/10/12 13:56 */ @@ -115,6 +117,7 @@ class Coupon extends Model /** * Notes: 撤销分润 + * * @Author: 玄尘 * @Date : 2020/10/9 14:07 */ @@ -133,8 +136,9 @@ class Coupon extends Model /** * 打款 - * @author 玄尘 2020-03-13 + * * @return bool|string [type] [description] + * @author 玄尘 2020-03-13 */ public function sendMoney() { @@ -161,6 +165,7 @@ class Coupon extends Model /** * Notes: 格式化时间 年-月-日 + * * @Author: 玄尘 * @Date : 2020/4/7 16:24 * @return mixed