回滚券码规则

This commit is contained in:
2021-04-07 15:13:05 +08:00
parent 477fec0b80
commit 3901e8d146

View File

@@ -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();