From 3901e8d14669b246dcdead77a6296608a4fbf699 Mon Sep 17 00:00:00 2001 From: xuanchen <122383162@qq.com> Date: Wed, 7 Apr 2021 15:13:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E5=88=B8=E7=A0=81=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/Models/Activity.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 304ddf0..6ed7d4e 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -108,7 +108,9 @@ class Activity extends Model if ($this->channel == self::CHANNEL_UNION) { $code = '66406' . date('ymdHi') . mt_rand(10000, 99999); } else { - $code = 'YSD' . substr(date('ymd'), 1) . mt_rand(100000000, 999999999); + // $code = 'YSD' . substr(date('ymd'), 1) . mt_rand(100000000, 999999999); + $code = 'YSD' . substr(date('ymdH'), 1) . mt_rand(10000, 99999); + } $exists = ActivityCoupon::where('code', $code)->exists();