From f1c9abf1876665cc3a64c83cf5157ffd4b1e5b09 Mon Sep 17 00:00:00 2001 From: xuanchen <122383162@qq.com> Date: Thu, 29 Oct 2020 10:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E5=88=B8=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/Activity/IndexController.php | 2 +- app/Models/Activity.php | 2 +- packages/coupon/src/Action/ysd/YsdGrant.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Admin/Controllers/Activity/IndexController.php b/app/Admin/Controllers/Activity/IndexController.php index b7b7e02..7309f65 100644 --- a/app/Admin/Controllers/Activity/IndexController.php +++ b/app/Admin/Controllers/Activity/IndexController.php @@ -204,7 +204,7 @@ class IndexController extends AdminController if ($request->total < 0) { $error = new MessageBag([ 'title' => '错误', - 'message' => '可发券总数必须大于0', + 'message' => '可发券总数必须大于0.', ]); return back()->withInput()->with(compact('error')); diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 426dd5a..c763c29 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -100,7 +100,7 @@ class Activity extends Model { try { - $code = 'YSD' . date('ymd') . mt_rand(100000, 999999); + $code = '66406' . date('ymd') . mt_rand(100000, 999999); if ($this->type == SELF::TYPE_EXTEND) { $start_at = now(); diff --git a/packages/coupon/src/Action/ysd/YsdGrant.php b/packages/coupon/src/Action/ysd/YsdGrant.php index c414d2d..509eefb 100644 --- a/packages/coupon/src/Action/ysd/YsdGrant.php +++ b/packages/coupon/src/Action/ysd/YsdGrant.php @@ -22,7 +22,7 @@ class YsdGrant extends Init if (!$activity->status) { return '发券失败,活动已经关闭。'; } - + if ($activity->type == Activity::TYPE_SCOPE && Carbon::now()->gt($activity->end_at)) { return '发券失败,此活动已经结束。'; }