同一个券码,重复提交校验,3秒内视为同一笔订单

This commit is contained in:
2020-08-08 14:32:34 +08:00
parent ac9d3d9a25
commit 09efc1e323
4 changed files with 5 additions and 6 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/tests/
/.idea
/.env
/.editorconfig

View File

@@ -154,10 +154,6 @@ class Init
*/
public function HasCheck()
{
$code = $this->redemptionCode;
$total = $this->total;
$outletId = $this->outletId;
$info = Coupon::where('redemptionCode', $this->redemptionCode)
->where('outletId', $this->outletId)
->where('total', $this->total)

View File

@@ -49,7 +49,6 @@ class Verification extends PingAnInit
}
try {
$params = [
'couponNo' => $coupon->redemptionCode,
'partnerOrderId' => date('ymdHis') . sprintf("%0" . strlen(999999) . "d", mt_rand(0, 999999)),

View File

@@ -34,7 +34,7 @@ class YsdVerification extends Init
return $this->query_coupon;
}
//检查可核销次数100元为1次
//检查可核销次数100元为1次
if ($this->query_coupon->activity && $this->query_coupon->activity->need_check) {
$ret = $this->CheckCount();
if ($ret !== true) {