diff --git a/app/Admin/Controllers/User/IndexController.php b/app/Admin/Controllers/User/IndexController.php index 586fcf8..1de399e 100644 --- a/app/Admin/Controllers/User/IndexController.php +++ b/app/Admin/Controllers/User/IndexController.php @@ -97,7 +97,7 @@ class IndexController extends AdminController $grid->column('门店号')->display(function () { return $this->shop_id ?? '---'; - }); + })->help('银联pos机配置的门店号'); $grid->column('所属项目')->display(function () { return $this->type_text; diff --git a/app/Models/Coupon.php b/app/Models/Coupon.php index 8d5a322..d4493fe 100644 --- a/app/Models/Coupon.php +++ b/app/Models/Coupon.php @@ -79,7 +79,7 @@ class Coupon extends Model public function profit() { $log = AccountLog::where('source->coupon_id', $this->id)->first(); - if (!$log && $this->user) { + if (!$log && $this->user && $this->profit) { return $this->user->account->rule('freeze', $this->profit, false, [ 'coupon_id' => $this->id, 'redemptionCode' => $this->redemptionCode,