同一个券码,重复提交校验,3秒内视为同一笔订单
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/tests/
|
||||||
|
/.idea
|
||||||
|
/.env
|
||||||
|
/.editorconfig
|
||||||
@@ -154,10 +154,6 @@ class Init
|
|||||||
*/
|
*/
|
||||||
public function HasCheck()
|
public function HasCheck()
|
||||||
{
|
{
|
||||||
$code = $this->redemptionCode;
|
|
||||||
$total = $this->total;
|
|
||||||
$outletId = $this->outletId;
|
|
||||||
|
|
||||||
$info = Coupon::where('redemptionCode', $this->redemptionCode)
|
$info = Coupon::where('redemptionCode', $this->redemptionCode)
|
||||||
->where('outletId', $this->outletId)
|
->where('outletId', $this->outletId)
|
||||||
->where('total', $this->total)
|
->where('total', $this->total)
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ class Verification extends PingAnInit
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
'couponNo' => $coupon->redemptionCode,
|
'couponNo' => $coupon->redemptionCode,
|
||||||
'partnerOrderId' => date('ymdHis') . sprintf("%0" . strlen(999999) . "d", mt_rand(0, 999999)),
|
'partnerOrderId' => date('ymdHis') . sprintf("%0" . strlen(999999) . "d", mt_rand(0, 999999)),
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class YsdVerification extends Init
|
|||||||
return $this->query_coupon;
|
return $this->query_coupon;
|
||||||
}
|
}
|
||||||
|
|
||||||
//检查可核销次数,100元为1次
|
//检查可核销次数,100元为1次。
|
||||||
if ($this->query_coupon->activity && $this->query_coupon->activity->need_check) {
|
if ($this->query_coupon->activity && $this->query_coupon->activity->need_check) {
|
||||||
$ret = $this->CheckCount();
|
$ret = $this->CheckCount();
|
||||||
if ($ret !== true) {
|
if ($ret !== true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user