Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6bc096f6
authored
May 16, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
暂时注释解锁和锁定库存
parent
198d79b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
app/Http/Controllers/OrderController.php
app/Http/Controllers/OrderController.php
View file @
6bc096f6
...
...
@@ -1305,18 +1305,19 @@ Class OrderController extends Controller
if
(
!
$update
)
return
[
'errcode'
=>-
1
,
'errmsg'
=>
'取消失败'
];
// 解锁库存
$info
=
$this
->
orderDetail
(
$request
,
$order_id
);
$sku
=
array
();
//
$info = $this->orderDetail($request, $order_id);
//
$sku = array();
foreach
(
$info
[
'order_items_info'
]
as
$v
)
{
$sku
[
$v
[
'rec_id'
]]
=
$v
[
'goods_number'
];
}
//
foreach ($info['order_items_info'] as $v) {
//
$sku[$v['rec_id']] = $v['goods_number'];
//
}
$res
=
json_decode
(
$this
->
unlockSku
(
$order_id
,
$sku
));
//
$res = json_decode($this->unlockSku($order_id, $sku));
if
(
$res
[
'errcode'
]
!=
0
)
return
[
'errcode'
=>-
1
,
'errmsg'
=>
'解锁库存失败'
];
//
if ($res['errcode'] != 0) return ['errcode'=>-1, 'errmsg'=>'解锁库存失败'];
return
[
'errcode'
=>
0
,
'errmsg'
=>
'取消成功并解锁库存'
];
// return ['errcode'=>0, 'errmsg'=>'取消成功并解锁库存'];
return
[
'errcode'
=>
0
,
'errmsg'
=>
'取消成功'
];
}
}
...
...
@@ -1352,18 +1353,18 @@ Class OrderController extends Controller
// 更新订单状态
DB
::
connection
(
'order'
)
->
table
(
'lie_order'
)
->
where
(
'order_id'
,
$order_id
)
->
update
([
'status'
=>
8
]);
$info
=
$this
->
orderDetail
(
$request
,
$order_id
);
$sku
=
array
();
//
$info = $this->orderDetail($request, $order_id);
//
$sku = array();
foreach
(
$info
[
'order_items_info'
]
as
$v
)
{
$sku
[
$v
[
'rec_id'
]]
=
$v
[
'goods_number'
];
}
//
foreach ($info['order_items_info'] as $v) {
//
$sku[$v['rec_id']] = $v['goods_number'];
//
}
$res
=
json_decode
(
$this
->
unlockSku
(
$order_id
,
$sku
,
true
));
//
$res = json_decode($this->unlockSku($order_id, $sku, true));
if
(
$res
[
'errcode'
]
!=
0
)
return
[
'errcode'
=>-
1
,
'errmsg'
=>
'锁定库存失败'
];
//
if ($res['errcode'] != 0) return ['errcode'=>-1, 'errmsg'=>'锁定库存失败'];
return
[
'errcode'
=>
0
,
'errmsg'
=>
'填写快递单成功并锁定库存'
];
//
return ['errcode'=>0, 'errmsg'=>'填写快递单成功并锁定库存'];
}
return
[
'errcode'
=>
0
,
'errmsg'
=>
'填写快递单成功'
];
...
...
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