Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
e9d168bd
Commit
e9d168bd
authored
Sep 09, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 退款和取消订单增加log
parent
2f3e4998
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
MarketingPindanGoodsService.php
application/services/goods/MarketingPindanGoodsService.php
+14
-3
Tcc2Service.php
application/services/tcc/Tcc2Service.php
+2
-1
No files found.
application/services/goods/MarketingPindanGoodsService.php
View file @
e9d168bd
...
@@ -11,6 +11,8 @@ use Api\PhpServices\Sensitive\Sensitive;
...
@@ -11,6 +11,8 @@ use Api\PhpServices\Sensitive\Sensitive;
use
Api\PhpUtils\Common\BaseConvert
;
use
Api\PhpUtils\Common\BaseConvert
;
use
Api\PhpUtils\Common\GoodsSkuId
;
use
Api\PhpUtils\Common\GoodsSkuId
;
use
Api\PhpUtils\Http\HttpUtil
;
use
Api\PhpUtils\Http\HttpUtil
;
use
Api\PhpUtils\Lock\FrequencyLockUtil
;
use
Api\PhpUtils\Log\FileLog
;
use
App\Exception\custom\GoodsException
;
use
App\Exception\custom\GoodsException
;
use
App\Models\goods\mysql\Category
;
use
App\Models\goods\mysql\Category
;
use
App\Models\goods\mysql\GoodsOperationRecord
;
use
App\Models\goods\mysql\GoodsOperationRecord
;
...
@@ -481,6 +483,13 @@ class MarketingPindanGoodsService
...
@@ -481,6 +483,13 @@ class MarketingPindanGoodsService
throw
new
GoodsException
([
"cus"
=>
15
]);
throw
new
GoodsException
([
"cus"
=>
15
]);
}
}
//频率锁
$key
=
"bp_goods_refund_"
.
$params
[
"order_item_id"
];
$lock
=
FrequencyLockUtil
::
isLocked
(
$key
);
if
(
$lock
)
{
return
true
;
}
PindanGoodsSku
::
beginTransaction
();
PindanGoodsSku
::
beginTransaction
();
$records
=
GoodsRefundRecord
::
getRecordMaster
([
$records
=
GoodsRefundRecord
::
getRecordMaster
([
...
@@ -498,11 +507,13 @@ class MarketingPindanGoodsService
...
@@ -498,11 +507,13 @@ class MarketingPindanGoodsService
]);
]);
$row
=
PindanGoodsSku
::
save
([
$row
=
PindanGoodsSku
::
save
([
"total_amount_sold
"
=>
$sku
[
"total_amount_sold"
]
-
$params
[
"num"
],
"total_amount_sold
[-]"
=>
$params
[
"num"
],
"total_amount_order
"
=>
$sku
[
"total_amount_order"
]
-
$params
[
"num"
],
"total_amount_order
[-]"
=>
$params
[
"num"
],
"inventory_rest
"
=>
$sku
[
"inventory_rest"
]
+
$params
[
"num"
],
"inventory_rest
[+]"
=>
$params
[
"num"
],
],
[
"goods_sku_id"
=>
$sku
[
"goods_sku_id"
],
"total_amount_sold[>=]"
=>
$params
[
"num"
],
"total_amount_order[>=]"
=>
$params
[
"num"
]]);
],
[
"goods_sku_id"
=>
$sku
[
"goods_sku_id"
],
"total_amount_sold[>=]"
=>
$params
[
"num"
],
"total_amount_order[>=]"
=>
$params
[
"num"
]]);
FileLog
::
info
(
'goods_refund_log'
,
'json decode error raw:'
.
json_encode
(
$params
));
if
(
$row
<
1
){
if
(
$row
<
1
){
PindanGoodsSku
::
rollback
();
PindanGoodsSku
::
rollback
();
GoodsRefundRecord
::
save
([
GoodsRefundRecord
::
save
([
...
...
application/services/tcc/Tcc2Service.php
View file @
e9d168bd
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
App\Services\tcc
;
namespace
App\Services\tcc
;
use
Api\PhpUtils\Common\GoodsSkuId
;
use
Api\PhpUtils\Common\GoodsSkuId
;
use
Api\PhpUtils\Log\FileLog
;
use
App\Exception\custom\GoodsException
;
use
App\Exception\custom\GoodsException
;
use
App\Models\goods\mysql\GoodsSku
;
use
App\Models\goods\mysql\GoodsSku
;
use
App\Models\goods\mysql\PindanGoodsSku
;
use
App\Models\goods\mysql\PindanGoodsSku
;
...
@@ -491,7 +492,7 @@ class Tcc2Service
...
@@ -491,7 +492,7 @@ class Tcc2Service
}
}
}
}
}
}
FileLog
::
info
(
'goods_cancel_confirm_tcc'
,
'json decode error raw:'
.
$keys
);
if
(
$isPindan
)
{
if
(
$isPindan
)
{
return
self
::
pindanCancelConfirm
(
$goodsInfoList
);
return
self
::
pindanCancelConfirm
(
$goodsInfoList
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
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