Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
git test
Yii2 Shopwind
Commits
0bbe4d0f
Unverified
Commit
0bbe4d0f
authored
3 years ago
by
康宁
Committed by
Gitee
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
【修复】优惠券在多个订单中重复使用
parent
db5621f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/business/BaseOrder.php
+1
-1
common/business/BaseOrder.php
with
1 addition
and
1 deletion
+1
-1
common/business/BaseOrder.php
+
1
-
1
View file @
0bbe4d0f
...
...
@@ -611,7 +611,7 @@ class BaseOrder
{
foreach
(
$result
as
$store_id
=>
$order_id
)
{
if
(
isset
(
$coupon
[
$store_id
][
'coupon_sn'
]))
{
$query
=
CouponsnModel
::
find
()
->
select
(
'remain_times'
)
->
where
([
'coupon_sn'
=>
$coupon
[
$store_id
][
'coupon_sn'
]])
->
one
();
$query
=
CouponsnModel
::
find
()
->
where
([
'coupon_sn'
=>
$coupon
[
$store_id
][
'coupon_sn'
]])
->
one
();
if
(
$query
->
remain_times
>
0
)
{
$query
->
updateCounters
([
'remain_times'
=>
-
1
]);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment